Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: update fuel explorer #946

Merged
merged 8 commits into from
May 25, 2023
Merged

Conversation

ra0x3
Copy link
Contributor

@ra0x3 ra0x3 commented May 23, 2023

  • Please add proper labels
  • If there is an issue associated with this PR, please link the issue (right-hand sidebar)
  • If there is not an issue associated with this PR, add this PR to the "Fuel Indexer" project (right-hand sidebar)

Description

  • PR does a few things:
    • Prevent usage of reserved names in GraphQL schema object names
    • Refactors the fuel-indexer-types module
      • Import structure was spaghetti 🍝
    • Removes namespacing types in codgen
      • We just import the types w/o a namespace, and use the reserved keyword check
    • Adds the initial implementation of Header, Block, and Conensus
      • I've left notes, as this work is a WIP.
        • It cannot be put on a feature branch because master needs some of these changes
    • Removes the explorer_indexer example
      • Now that we have our actual explorer, we don't need this
    • Updates tests accordingly
    • Adds custom indexer-specific HeaderData, and Genesis types

Testing steps

  • CI should pass
  • Rebuild your modules
  • Start the service connected to beta-3 using the fuel-explorer indexer
cargo run --bin fuel-indexer -- run --manifest examples/fuel-explorer/fuel-explorer/fuel_explorer.manifest.yaml --run-migrations --fuel-node-host beta-3.fuel.network --fuel-node-port 80
query {
  block {
    block_id
    header {
      block_id
      da_height
      transactions_count
      message_receipt_count
      transactions_root
      message_receipt_root
      height
      prev_root
      timestamp
      application_hash
    }
    consensus {
      label
      poa
      unknown
      genesis
    }
  }
}

Changelog

  • enhancement: update fuel explorer with initial type implementations

@ra0x3 ra0x3 self-assigned this May 23, 2023
@ra0x3 ra0x3 marked this pull request as draft May 23, 2023 22:49
@ra0x3 ra0x3 added fuel-explorer This PR is directly related to the block explorer and removed work in progress labels May 24, 2023
@ra0x3 ra0x3 marked this pull request as ready for review May 24, 2023 14:59
@ra0x3 ra0x3 force-pushed the rashad/update-fuel-explorer branch from 1ff822a to 7942ab6 Compare May 24, 2023 19:07
@ra0x3 ra0x3 requested a review from deekerno May 24, 2023 20:25
Copy link
Contributor

@deekerno deekerno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a first pass and everything looks pretty good. Left some comments; I'll approve once they're addressed/resolved.

packages/fuel-indexer/src/executor.rs Show resolved Hide resolved
packages/fuel-indexer-types/src/scalar.rs Show resolved Hide resolved
@ra0x3 ra0x3 merged commit 1ed35bc into master May 25, 2023
@ra0x3 ra0x3 deleted the rashad/update-fuel-explorer branch May 25, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuel-explorer This PR is directly related to the block explorer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants