-
Notifications
You must be signed in to change notification settings - Fork 123
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
feat: add ledger sync protocol #529
Conversation
Please signoff on all commits with your name, email and gpg key for the Developer's Certificate of Origin. |
Signed-off-by: Brandon H. Gomes <[email protected]>
64084ed
to
36504f4
Compare
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
fcfbb3c
to
792f66e
Compare
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
Signed-off-by: Brandon H. Gomes <[email protected]>
When runtime team integrate v0.9.22(jsonrpsee), we better mark storage method as |
Indeed. Some context here: paritytech/substrate#11401 |
* manual rpc test works Signed-off-by: Shumo Chu <[email protected]> * clean up Signed-off-by: Shumo Chu <[email protected]>
14672e4
to
04bedc4
Compare
Signed-off-by: Shumo Chu <[email protected]>
Signed-off-by: Shumo Chu <[email protected]>
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.
LGTM!
Signed-off-by: Shumo Chu <[email protected]>
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.
Partial review, I did not look at node and tests changes yet.
As a note for the future, there are a lot of unrelated clippy/style improvements (e.g. in collator-selection) interspersed with the feature changes
In a big PR like this, I'd recommend to separate these out into a separate "cleanup" PR to contain the scope of changes and in this case, make the actual rpc change easier to locate and reason about.
@Dengjianping : manta-pay
looks like it's gonna need a rewrite for the 0. 9.22 jsonrpsee migration.
Correct, I just added a comment to #571. |
@Garandor You just reminded me that we might do storage migration for manta-pay, but I didn't find the feature Can we add this feature to manta-pay? |
Finished looking through the rest of the code. The node looks great, thanks for the extensible design and all your refactoring of the messy code in service @bhgomes and/or @stechu |
Agree, it should be added along with the migration. |
Signed-off-by: Shumo Chu <[email protected]>
Signed-off-by: Shumo Chu <[email protected]>
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.
one more question, then LGTM
I logged a followup to re-align the chainspec files across all runtimes
#581
One more question: The unit tests @bhgomes describes are not really implemented here. Is there a tracking issue to follow up? |
Signed-off-by: Shumo Chu <[email protected]>
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.
thanks for the new naming, it all LGTM except for the migration issue.
@Dengjianping actually alluded to that before that we should add the try_runtime
feature to manta-pay
so we can verify the runtime upgrade will succeed before actually issuing it to the chain.
I'll give it a shot to implement it so we can merge this PR today
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.
After discussion, migration of asset_manager will be discussed in #572, so this is good to go
Description
This PR adds the
pull
method for use by wallets to request the diff from the latest state.Unit Test Spec
Use
sudo
to set the storage to random UTXO and void numbers: for each round add random number (1 to 2) of random(UTXO, EncryptedNote)
pairs and a random number (0 to 2) of randomVoidNumber
s:Shards
: Add random(UTXO, EncryptedNote)
pairs with a random first key and increasing second keyInsertionOrderedVoidNumbers
: Add randomVoidNumber
s with increasing keyCheckpoint Description:
receiver_index: [usize; 256]
: Lengths of each first key inShards
sender_index: usize
: Length ofInsertionOrderedVoidNumber
Testing correctness of Normal Usage:
should_continue == true
thenpull
should be called again with the returned checkpoint (GOTO step 3)Testing correctness of Abnormal Usage: Same as the previous test except try to get from a checkpoint later than the current one. The
pull
should return nothing.TODO
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
<branch>/CHANGELOG.md
Files changed
in the Github PR explorer.authoring_version
: The version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.spec_version
: The version of the runtime specification. A full node will not attempt to use its native runtime in substitute for the on-chain Wasm runtime unless all of spec_name, spec_version, and authoring_version are the same between Wasm and native.impl_version
: The version of the implementation of the specification. Nodes are free to ignore this; it serves only as an indication that the code is different; as long as the other two versions are the same then while the actual code may be different, it is nonetheless required to do the same thing. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the impl_version changing.transaction_version
: The version of the extrinsics interface. This number must be updated in the following circumstances: extrinsic parameters (number, order, or types) have been changed; extrinsics or pallets have been removed; or the pallet order in the construct_runtime! macro or extrinsic order in a pallet has been changed. You can run themetadata_diff.yml
workflow for help. If this number is updated, then thespec_version
must also be updatedBaseFilter
. Ensure every extrinsic works from front-end. If there's corresponding tool, ensure both work for each other.try-runtime
. This includes migrations inherited from upstream changes, and you can search the diffs for modifications of#[pallet::storage]
items to check for any.