-
Notifications
You must be signed in to change notification settings - Fork 689
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
Modular block request handler #1524
Modular block request handler #1524
Conversation
3e6dd57
to
7096f91
Compare
I haven't looked at the changes yet but this may have to wait a little while since @dmitry-markin is doing refactoring on |
PR was out at the old repo since April, I was really hoping we can upstream this since it touches pretty fundamental internals and every time something changes upstream it is a bit of PITA to rebase it. |
Understandable and apologies for stalling with the review of the original PR. We've finally found time to start refactoring the syncing code which is long overdue and the idea is to convert @dmitry-markin can you give an estimate how much work is it to rebase your changes on top of these changes? |
I think we can merge this, the changes of this PR are mostly self contained and don't interfere in a bad way (and even simplify some things) with work on extracting request-responses. I'll just move the As a side note, the situation around this PR seems quite weird, because the original PR was approved a long time ago, just nobody pressed the "merge" button. |
Apologies on that. I had a hard time getting green on all three PRs (the main one + two in the companion repos) .. by the time I get green, something would have changed and had to resync/retry. At some point I got busy with other stuff and this went to the back burner. So glad that the companion repos have been consolidated into one repo now |
Patch the outstanding PRs from the old repos: paritytech/substrate#14014 paritytech/polkadot#7134 paritytech/cumulus#2489 These were already reviewed and approved, but not yet submitted.
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
3aeb10a
to
2fcbba7
Compare
@dmitry-markin @altonen Addressed the comments, please let me know what else is needed in order to merge the PR, thanks. |
bot fmt |
@dmitry-markin https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3704149 was started for your command Comment |
@dmitry-markin Command |
Thanks you for quick progress here! |
All is good, the PR is merged. Thanks for contributing! |
Thanks @dmitry-markin @altonen for the help in getting this merged |
* update dependencies * reflect paritytech/polkadot-sdk#1524
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-release-analysis-v1-2-0/4451/1 |
Introduced in paritytech/polkadot-sdk#1524
* Get `entropy-shared` compiling with updated deps * Fix `entropy-shared` build for `wasm-no-std` * Make `pallet-staking-extension` compile Starts introducing some of the changes brought in by paritytech/polkadot-sdk#1484. * Introduce staking changes from paritytech/substrate#12970 * Add RuntimeFreezeReason from paritytech/polkadot-sdk#1900 * Re-map errors in staking extension pallet * Bump `pallet-programs` * Missed a crate dep for staking extension * Remove commented out code * Get `pallet-relayer` compiling * Fix relayer test compilation * Fix `pallet-free-tx`'s tests * Reorder config types * Bump `pallet-propagation` dependencies * Bump `pallet-slashing` dependencies * Bump `pallet-transaction-pause` This includes the deprecation of `Balances::transfer` from paritytech/polkadot-sdk#1226. * TaploFmt * Use `StakingAccount` instead of `.into()` * Import `vec` macro in `pallet-slashing` * Import `vec` in other pallets * Bump TOML dependencies for runtime Haven't fixed the Rust code yet though * Self define types instead of using `node-primitives` * Update staking related configs Values were mostly taken from the Polkadot runtime config * Update `pallet-preimage` config Changes introduced in paritytech/polkadot-sdk#1363 * Add `MaxNominators` to `pallet_babe` Introduced in paritytech/substrate#14471 * Add `MaxNominators` to `pallet_grandpa` Also introduced in paritytech/substrate#14471 * Add `RuntimeFreezeReason` to `pallet_nomination_pools` * Add `MaxTipAmount` to `pallet_tips` Introduced in paritytech/polkadot-sdk#1709 * Add `IdentityInformation` to `pallet_identity` Introduced in paritytech/polkadot-sdk#1661 * finish runtime * Use `crates.io` packages in `entropy` TOML This doesn't compile yet * Remove reference to `node_primitives` * Move imports under correct dependency section These shouldn't be built-deps, my bad * Change `WarpSyncParams` import to come from `sc_network_sync` Change introduced here: paritytech/polkadot-sdk#1912 * Add missing `sc-consensus-babe` package * Remove second generic from `DefaultImportQueue` This was removed in paritytech/substrate#14612 * Add temporary cursed RPC bounds * Switch `sp-consensus-grandpa` to be from Crates * Add Grandpa justification period to service * Rename `justification_period to` `justification_generation_period` * Add missing `block_relay` param Introduced in paritytech/polkadot-sdk#1524 * Try to clean up runtime types * Add `opaque` types to runtime These match what was in `node-primitives`. In particular we're interested in the `Block` type which we were using in a lot of places, and I incorrectly changed to be `Unchechecked` instead of `Opaque`. * Use opaque block type in service * Add full session key impls * Remove cursed trait bounds for RPC * Convert some tabs to spaces Sorry, I had to * Import `Vec` from `sp_std` in benchmarks Turns out the issue responsible for this change is this: paritytech/polkadot-sdk#172 * Pull `TrackedStorageKey` from `sp_storage` From here: paritytech/substrate#14787 * Add `BenchmarkHelper` to treasury pallet * TaploFmt * change max freezes * Sort TOML imports in runtime manifest * Move `version` field to be first in runtime manifest * Organize imports in pallet manifests * Sort and organize imports for client * Address TODOs in `entropy-shared` * Remove TODOs related to `node-primitives` * Pull `substrate-wasm-builder` from crates.io * TaploFmt * Fix benchmarking import post-merge * Fix another program import port-merge * Import `Vec` to programs benches * Wrong vec import 🙃 * Poke CI * Bump node metadata --------- Co-authored-by: Jesse Abramowitz <jesse@entropy.xyz>
Submit the outstanding PRs from the old repos(these were already reviewed and approved before the repo rorg, but not yet submitted): Main PR: paritytech/substrate#14014 Companion PRs: paritytech/polkadot#7134, paritytech/cumulus#2489 The changes in the PR: 1. ChainSync currently calls into the block request handler directly. Instead, move the block request handler behind a trait. This allows new protocols to be plugged into ChainSync. 2. BuildNetworkParams is changed so that custom relay protocol implementations can be (optionally) passed in during network creation time. If custom protocol is not specified, it defaults to the existing block handler 3. BlockServer and BlockDownloader traits are introduced for the protocol implementation. The existing block handler has been changed to implement these traits 4. Other changes: [X] Make TxHash serializable. This is needed for exchanging the serialized hash in the relay protocol messages [X] Clean up types no longer used(OpaqueBlockRequest, OpaqueBlockResponse) --------- Co-authored-by: Dmitry Markin <dmitry@markin.tech> Co-authored-by: command-bot <>
* Setup deps * Remove Koi from account migration test * paritytech/polkadot-sdk#1495 * Bump * paritytech/polkadot-sdk#1524 * !! paritytech/polkadot-sdk#1363 * paritytech/polkadot-sdk#1492 * paritytech/polkadot-sdk#1911 * paritytech/polkadot-sdk#1900 Signed-off-by: Xavier Lau <xavier@inv.cafe> * paritytech/polkadot-sdk#1661 * paritytech/polkadot-sdk#2144 * paritytech/polkadot-sdk#2048 * paritytech/polkadot-sdk#1672 * paritytech/polkadot-sdk#2303 * paritytech/polkadot-sdk#1256 * Remove identity and vesting * Fixes * paritytech/polkadot-sdk#2657 * paritytech/polkadot-sdk#1313 * paritytech/polkadot-sdk#2331 * paritytech/polkadot-sdk#2409 part.1 * paritytech/polkadot-sdk#2767 * paritytech/polkadot-sdk#2521 Signed-off-by: Xavier Lau <xavier@inv.cafe> * paritytech/polkadot-sdk#1222 * paritytech/polkadot-sdk#1234 part.1 * Satisfy compiler * XCM V4 part.1 * paritytech/polkadot-sdk#1246 * Remove pallet-democracy part.1 * paritytech/polkadot-sdk#2142 * paritytech/polkadot-sdk#2428 * paritytech/polkadot-sdk#3228 * XCM V4 part.2 * Bump * Build all runtimes * Build node * Remove pallet-democracy Signed-off-by: Xavier Lau <xavier@inv.cafe> * Format * Fix pallet tests * Fix precompile tests * Format * Fixes * Async, remove council, common pallet config * Fix `ethtx-forward` test case (#1519) * Fix ethtx-forward tests * Format * Fix following the review * Fixes * Fixes * Use default impl * Benchmark helper * Bench part.1 * Bench part.2 * Bench part.3 * Fix all tests * Typo * Feat * Fix EVM tracing build * Reuse upstream `proof_size_base_cost()` (#1521) * Format issue * Fixes * Fix CI --------- Signed-off-by: Xavier Lau <xavier@inv.cafe> Co-authored-by: Bear Wang <boundless.forest@outlook.com>
Submit the outstanding PRs from the old repos(these were already reviewed and approved before the repo rorg, but not yet submitted):
Main PR: paritytech/substrate#14014
Companion PRs: paritytech/polkadot#7134, paritytech/cumulus#2489
The changes in the PR:
[X] Make TxHash serializable. This is needed for exchanging the serialized hash in the relay protocol messages
[X] Clean up types no longer used(OpaqueBlockRequest, OpaqueBlockResponse)