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

chainspec deployment config + chainspec ergonomics #265

Merged
merged 20 commits into from
Apr 28, 2022
Merged

Conversation

Voxelot
Copy link
Member

@Voxelot Voxelot commented Apr 15, 2022

Now that we are moving towards supporting fully validated utxos in deployed environments, we needed a way to configure a chainspec that has preconfigured spendable coins.

  • Setup a k8s configmap to load the chainspec into the container (this will have a 1mib cap)
  • Configures a conventional path for loading chainspecs from when using the deployment scripts
  • Exposes more options for running the node, making it possible to enable utxo validation from the deployment .env

misc fixes:

  • Make graphql API show the actual chain name from the chainspec instead of a hardcoded name
  • Allow hex numbers in the chainspec to be of variable length and automatically pad them.
  • Ensure line numbers are available in machine readable (JSON) logs
  • Make the pretty logs a little more compact
  • Improve error messages when the chainspec json isn't able to be parsed

This was deployed to node.swayswap.io where the genesis coin with value of 1<<50 can be seen with the following query:

curl 'https://node.swayswap.io/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://node.swayswap.io' --data-binary '{"query":"# Write your query or mutation here\n{\n  coins(first: 10, filter: {owner : \"0xf1e92c42b90934aa6372e30bc568a326f6e66a1a0288595e6e3fbd392a4f3e6e\", assetId:\"0x0000000000000000000000000000000000000000000000000000000000000000\"}) {\n    edges {\n      node {\n        amount,\n        assetId\n      }\n    }\n  }\n}"}' --compressed

@Voxelot Voxelot self-assigned this Apr 15, 2022
fuel-core/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

Looks fine to me on the dependencies end. Will defer to others for the infra stuff.

uberscott
uberscott previously approved these changes Apr 28, 2022
Copy link

@uberscott uberscott left a comment

Choose a reason for hiding this comment

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

It looks good. And I was hoping to find something to gripe about.

@rfuelsh rfuelsh self-requested a review April 28, 2022 18:02
Copy link
Member

@rfuelsh rfuelsh left a comment

Choose a reason for hiding this comment

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

great work on helm side!

@Voxelot Voxelot merged commit e252986 into master Apr 28, 2022
@Voxelot Voxelot deleted the helm-chainspec branch April 28, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants