rpc: Implement archive RPC API#12737
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>
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>
…l heights Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
…ical heights 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>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
archive RPC APIarchive RPC API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
melekes
left a comment
There was a problem hiding this comment.
👍 (code-wise; don't know enough to reason about business logic)
| return | ||
| } | ||
|
|
||
| let finalized_hash = client.info().finalized_hash; |
There was a problem hiding this comment.
what's the point of returning finalized blocks here if that's not what the client has asked for? shouldn't we return an error instead saying that "the block with the given height has not been finalized yet"?
There was a problem hiding this comment.
Thanks for having a look at this!
I seem to have lost this in notifications, the archive class is not really necessary for light-client integrations and there are a few things to decide before moving forward with this:
paritytech/json-rpc-interface-spec#26, paritytech/json-rpc-interface-spec#27, paritytech/json-rpc-interface-spec#30, paritytech/json-rpc-interface-spec#29
Regarding this, we are also exploring adding another method archive_finalizedBlock to make sure users are aware they can make queries to ancestor blocks of finalized. IIRC, I placed this to make sure they are not making a call to any children of the finalized.
| system_rpc_tx.clone(), | ||
| &config, | ||
| backend.offchain_storage(), | ||
| backend.clone(), |
There was a problem hiding this comment.
so previously we're only accessing offchain storage and now we need full storage, right?
|
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
This PR implements the archive methods.
The
archivemethods include:This PR also includes the unsubscribe methods.
Part of: #12071.
Testing Done
Manual Testing
Unit Tests
./src/archive/event.rsIntegration Tests
./src/archive/tests.rsCC: @paritytech/tools-team.