archive: Fetch body, genesisHash and header#1560
Merged
Merged
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
niklasad1
reviewed
Sep 14, 2023
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
jsdw
reviewed
Sep 18, 2023
| /// | ||
| /// This method is unstable and subject to change in the future. | ||
| #[method(name = "archive_unstable_genesisHash")] | ||
| fn archive_unstable_genesis_hash(&self) -> RpcResult<String>; |
Contributor
There was a problem hiding this comment.
I raised paritytech/json-rpc-interface-spec#101 since I'd have thought we can remove this one :)
Contributor
There was a problem hiding this comment.
I think the conclusion there is to keep it still :)
Contributor
Author
There was a problem hiding this comment.
Yep, thanks for raising this. From my perspective, I forgot about the other discussions which removed similar genesis functions. And I would have opted to remove the archive_genesis.
I could see the benefit of this API not necessarily being implemented by nodes (light or full), but also by third-parties which may have access only to the underlying DB.
We'll keep this for now and keep an eye on the genesis discussion
skunert
approved these changes
Sep 19, 2023
lexnv
added a commit
that referenced
this pull request
Sep 28, 2023
This PR implements: - `archive_unstable_finalized_height`: Get the height of the most recent finalized block - `archive_unstable_hash_by_height`: Get the hashes (possible empty) of blocks from the given height - `archive_unstable_call`: Call into the runtime of a block Builds on top of: #1560 ### Testing Done - unit tests for the methods with custom block tree for different heights / forks Closes: #1510 Closes: #1513 Closes: #1511 @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this pull request
Mar 25, 2024
This PR lays the foundation for implementing the archive RPC methods. The methods implemented by this PR: - archive_unstable_body: Fetch the block's body (a vector of hex-encoded scale-encoded extrinsics) from a given block hash - archive_unstable_genesisHash: Fetch the genesis hash - archive_unstable_header: Fetch the header from a given block hash Added unit tests for the methods. This PR is implementing the methods without exposing them to the RPC layer; which are to be exposed by a follow-up PR. Closes: paritytech#1509 Closes: paritytech#1514 @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this pull request
Mar 25, 2024
This PR implements: - `archive_unstable_finalized_height`: Get the height of the most recent finalized block - `archive_unstable_hash_by_height`: Get the hashes (possible empty) of blocks from the given height - `archive_unstable_call`: Call into the runtime of a block Builds on top of: paritytech#1560 ### Testing Done - unit tests for the methods with custom block tree for different heights / forks Closes: paritytech#1510 Closes: paritytech#1513 Closes: paritytech#1511 @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR lays the foundation for implementing the archive RPC methods.
The methods implemented by this PR:
Added unit tests for the methods.
This PR is implementing the methods without exposing them to the RPC layer; which are to be exposed by a follow-up PR.
Closes: #1509
Closes: #1514
@paritytech/subxt-team