-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update Pendulum metadata #485
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0ef02be
Change path to metadata file for `pendulum` feature
ebma 9134aed
Bump rust-toolchain version
ebma db17233
Update subxt instructions in README
ebma 8a3efc6
Bump existing metadata files
ebma 4a4eb1c
Add metadata files for pendulum
ebma ca8ac0e
Amend README
ebma 9477b4b
Revert rust-toolchain update
ebma e5f0bbc
Amend README
ebma 651fa45
Update relay versions
ebma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ To run the vault directly with the provided standalone chain use: | |
``` | ||
cargo run --bin vault --features standalone-metadata -- --keyring alice --stellar-vault-secret-key-filepath <secret_key_file_path> --stellar-overlay-config-filepath <cfg_file_path> | ||
``` | ||
|
||
To see examples of the config file, check [here](stellar-relay-lib/resources/config). | ||
An example of the secret key file path is found [here](stellar-relay-lib/resources/secretkey). | ||
|
||
|
@@ -80,28 +81,32 @@ cargo test --test '*' --package vault --features integration-test | |
* ``` | ||
ERROR vault::redeem: Error while sending request: error sending request for url (https://horizon-testnet.stellar.org/accounts/GA6ZDMRVBTHIISPVD7ZRCVX6TWDXBOH2TE5FAADJXZ52YL4GCFI4HOHU): error trying to connect: dns error: cancelled | ||
``` | ||
* but this does not mean that the test fails. | ||
The `test_redeem` integration test only checks if a `RedeemEvent` was emitted and terminates afterwards. | ||
This stops the on-going withdrawal execution the vault client started leading to that error. | ||
The withdrawal execution is tested in the `test_execute_withdrawal` unit test instead. | ||
* but this does not mean that the test fails. | ||
The `test_redeem` integration test only checks if a `RedeemEvent` was emitted and terminates afterwards. | ||
This stops the on-going withdrawal execution the vault client started leading to that error. | ||
The withdrawal execution is tested in the `test_execute_withdrawal` unit test instead. | ||
|
||
* ``` | ||
ERROR offchain-worker::http: Requested started id=1630 method=POST uri=https://dia-00.pendulumchain.tech:8070/currencies | ||
ERROR dia_oracle::pallet: Failed to Update Prices HttpRequestFailed | ||
``` | ||
* these errors can be ignored | ||
* these errors can be ignored | ||
|
||
## Updating the metadata | ||
|
||
When any changes are made to elements associated with the pallets, such as extrinsic names or parameters, it is necessary to regenerate the metadata. Subxt is employed specifically for this purpose. | ||
When any changes are made to elements associated with the pallets, such as extrinsic names or parameters, it is | ||
necessary to regenerate the metadata. Subxt is employed specifically for this purpose. | ||
Note: The `--version 14` flag is required when connecting to runtime nodes that are running older Substrate | ||
dependencies. | ||
|
||
``` | ||
cargo install [email protected] | ||
|
||
// fetching from an automatically detected local chain | ||
subxt metadata -f bytes > runtime/metadata-{your-chain-name}.scale | ||
subxt metadata -f bytes > runtime/metadata-{your-chain-name}.scale --version 14 | ||
|
||
// fetching from a specific chain | ||
subxt metadata -f bytes --url http://{chain-url} > runtime/metadata-{your-chain-name}.scale | ||
subxt metadata -f bytes --url http://{chain-url} > runtime/metadata-{your-chain-name}.scale --version 14 | ||
``` | ||
|
||
### Updating the standalone-metadata file | ||
|
@@ -118,6 +123,25 @@ Once the local node is running, run this command from the clients directory: | |
subxt metadata -f bytes > runtime/metadata-standalone.scale --version 14 | ||
``` | ||
|
||
### Updating the metadata of the supported runtimes (Pendulum/Amplitude/Foucoco) | ||
|
||
To update the metadata of the supported parachains, run the following commands: | ||
|
||
``` | ||
subxt metadata -f bytes --url wss://rpc-pendulum.prd.pendulumchain.tech:443 > runtime/metadata-parachain-pendulum.scale --version 14 | ||
subxt metadata -f bytes --url wss://rpc-amplitude.pendulumchain.tech:443 > runtime/metadata-parachain-amplitude.scale --version 14 | ||
subxt metadata -f bytes --url wss://rpc-foucoco.pendulumchain.tech:443 > runtime/metadata-parachain-foucoco.scale --version 14 | ||
``` | ||
|
||
To facilitate comparison of changes in metadata, it is recommended to also convert the metadata to JSON format. This can | ||
be done using the following commands: | ||
|
||
``` | ||
subxt metadata -f json --url wss://rpc-pendulum.prd.pendulumchain.tech:443 > runtime/metadata-parachain-pendulum.json --version 14 | ||
subxt metadata -f json --url wss://rpc-amplitude.pendulumchain.tech:443 > runtime/metadata-parachain-amplitude.json --version 14 | ||
subxt metadata -f json --url wss://rpc-foucoco.pendulumchain.tech:443 > runtime/metadata-parachain-foucoco.json --version 14 | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
### Invalid spec version | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe need a definition of what "old" is.
Substrate v0.9.42 and below? Below Substrate version 1.0?
Or
old repo vs new repo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this commit is the relevant one and it seems to only be included starting with polkadot-v1.0.0 and not even
polkadot-v0.9.43
. I updated the description.