- Dec 20, 2022
-
-
Michal Kucharczyk authored
* BlockId removal: refactor: HeaderBackend::header It changes the arguments of: - `HeaderBackend::header`, - `Client::header`, - `PeersClient::header` - `ChainApi::block_header` methods from: `BlockId<Block>` to: `Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * non-trivial usages of haeder(block_id) refactored This may required introduction of dedicated function: header_for_block_num * fmt * fix * doc fixed * ".git/.scripts/fmt.sh" * BlockId removal: refactor: HeaderBackend::expect_header It changes the arguments of `HeaderBackend::expect_header` method from: `BlockId<Block>` to: `Block::Hash` * ".git/.scripts/fmt.sh" * readme updated * ".git/.scripts/fmt.sh" * fix Co-authored-by: parity-processbot <>
-
- Dec 19, 2022
-
-
Alexandru Vasile authored
* rpc/chain_head: Add event structure for serialization Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Add tests for events Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Add API trait for `chainHead` Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Add RPC errors Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Manage subscription ID tracking for pinned blocks Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Add tests for subscription management Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Constructor for the API Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Placeholders for API implementation Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Accept RPC subscription sink Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Generate the runtime API event Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement the `follow` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement the `body` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement the `header` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement the `storage` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement the `call` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement the `unpin` method Signed-off-by: Alexandru Vasile <[email protected]> * Update `Cargo.lock` Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement `getGenesis` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Fix clippy Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Parse params from hex string Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Constuct API with genesis hash Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Add the finalized block to reported tree route Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Export the API and events for better ergonomics Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Add test module with helper functions Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Test block events from the `follow` pubsub Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Test `genesisHash` getter Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Test `header` method Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Test `body` method Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Test calling into the runtime API Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Test runtime for the `follow` method Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Add runtime code changes for `follow` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Remove space from rustdoc Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Use the `child_key` for storage queries Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Test `storage` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Test child trie query for `storage` method Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Event serialization typo Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Remove subscription aliases Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Add `NetworkConfig` parameter Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Named parameters as camelCase if present Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Implement From<ApiError> for RuntimeEvents Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Handle pruning of the best block in finalization window Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Generate initial block events Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Verify that initial in-memory blocks are reported Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Verify the finalized event with forks and pruned blocks Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Fix clippy Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Separate logic for generating initial events Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Handle stopping a subscription ID Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Submit events until the "Stop" event is triggered Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Separate logic for handling new and finalized blocks Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Extend subscription logic with subId handle Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Adjust to the new subscription mngmt API Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Refuse RuntimeAPI calls without the runtime flag Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Verify RuntimeAPI calls without runtime flag Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Add best block per subscription Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Check storage keys for prefixes Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Check storage queries with invalid prefixes Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Allow maximum number of pinned blocks Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Test the maximum number of pinned blocks Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Adjust to origin/master and apply clippy Signed-off-by: Alexandru Vasile <[email protected]> * client/service: Enable the `chainHead` API Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Stop subscription on client disconnect and add debug logs Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Fix sending `Stop` on subscription exit Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Check best block is descendent of latest finalized Signed-off-by: Alexandru Vasile <[email protected]> * chain_head/tests: Report events before pruning the best block Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Nonrecursive initial block generation Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Generate initial events on subscription executor Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Reduce dev-dependencies for tokio Signed-off-by: Alexandru Vasile <[email protected]> * Apply suggestions from code review Co-authored-by: Sebastian Kunert <[email protected]> * rpc/chain_head: Accept empty parameters Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Use debug of `HexDisplay` for full format Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Enable subscription ID Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Use jsonrpsee 16.2 camelCase feature for paramaters Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Use `NonZeroUsize` for `NetworkConfig` param Signed-off-by: Alexandru Vasile <[email protected]> * rpc/chain_head: Rename `runtime_updates` to `has_runtime_updates` Signed-off-by: Alexandru Vasile <[email protected]> Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]>
-
Liu-Cheng Xu authored
* Set genesis block data using the built genesis block * Make resolve_state_version_from_wasm a separate function and some small refactorings Useful for the commit following. * Introduce trait BuildGenesisBlock Substrate users can use this trait to implement their custom genesis block when constructing the client. * Make call_executor test compile * cargo +nightly fmt --all * Fix test * Remove unnecessary clone * FMT * Apply review suggestions * Revert changes to new_full_client() and new_full_parts() signature * Remove needless `Block` type in `resolve_state_version_from_wasm`
-
Michal Kucharczyk authored
* sc-network-test::Peer: block push methods return hashes vec This commit reworks the block generation/push methods in sc-network-test::Peer. Now methods are providing the vector of hashes that were built. This allows to get rid of redundant `block_hash_from_id` call, as all hashes are known just after being built. Similar approach was taken in BeefyTestNet::generate_blocks_and_sync method. This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * fix * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Qinxuan Chen authored
* *: update rand to v0.8.5 * *: remove useless deps from Cargo.toml * fix pallet-session-benchmarking * fix pallet-election-provider-support test * remove useless rand from dev-dependencies
-
- Dec 17, 2022
-
-
Bastian Köcher authored
-
- Dec 16, 2022
-
-
Bastian Köcher authored
* Fix missing block number issue on forced canonicalization There is this issue about missing block numbers on forced canonicalization. I looked over the code now 10000 times and there are possible ways this can be triggered, but I don't really know how this is triggered. So, this pr is going to solve the symptom and not the cause. The block number to hash mapping is set when we import a new best block. Forced canonicalization will now stop at the best block and it will canonicalize the other blocks later when the best block moved. As the error reports indicated that this issue mainly happened on major sync, there should not be any forks, so not doing the canonicalization directly shouldn't be that harmful. All known implementations should import all blocks as best block on major sync anyway (I mean somewhere there is the bug, but I didn't yet found it). I will also do some changes to Cumulus around some potential culprit for this issue. Closes: https://github.com/paritytech/substrate/issues/12613 * Add some docs * Fix fix * Review comments * Review comments
-
Dmitry Markin authored
-
Bernardo A. Rodrigues authored
* improve ocw validator/collator CLI description * rename WhenValidating to WhenAuthoring * Update client/cli/src/arg_enums.rs Co-authored-by: Alexandru Vasile <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]>
-
- Dec 15, 2022
-
-
Adrian Catangiu authored
* beefy: add BEEFY 'spec' * Apply suggestions from code review Signed-off-by: Adrian Catangiu <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: André Silva <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]> Co-authored-by: parity-processbot <>
-
- Dec 14, 2022
-
-
Davide Galassi authored
* Use shared LOG_TARGET in consensus related crates * Rename target from "afg" to "grandpa"
-
Arkadiy Paronyan authored
* Pin all canonicalized blocks * Added a test * Docs
-
- Dec 12, 2022
-
-
Arkadiy Paronyan authored
-
Niklas Adolfsson authored
* jsonrpsee v0.16 add backwards compatibility run old http server on http only * cargo fmt * update jsonrpsee 0.16.1 * less verbose cors log * fix nit in log: WS -> HTTP * revert needless changes in Cargo.lock * remove unused features in tower * fix nits; add client-core feature * jsonrpsee v0.16.2
-
- Dec 10, 2022
-
-
Bastian Köcher authored
* Ensure that we inform all tasks to stop before starting the 60 seconds shutdown The change of waiting in maximum 60 seconds for the node to shutdown actually introduced a bug. We were actually waiting always 60 seconds as we didn't informed our tasks to shutdown. The solution to this problem is to drop the task manager as this will then inform all tasks to end. It also adds tests to ensure that the behaviors work as expected. (This should already have been done in the first pr! :() * ".git/.scripts/fmt.sh" 1 Co-authored-by: command-bot <>
-
- Dec 09, 2022
-
-
tgmichel authored
* Trace result in default `jsonrpsee` middleware * `rpc_metrics::extra` Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Aaro Altonen authored
* Move import queue out of `sc-network` Add supplementary asynchronous API for the import queue which means it can be run as an independent task and communicated with through the `ImportQueueService`. This commit removes removes block and justification imports from `sc-network` and provides `ChainSync` with a handle to import queue so it can import blocks and justifications. Polling of the import queue is moved complete out of `sc-network` and `sc_consensus::Link` is implemented for `ChainSyncInterfaceHandled` so the import queue can still influence the syncing process. * Fix tests * Apply review comments * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * Update client/network/sync/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Bastian Köcher authored
* Don't indefinitely on shutting down Tokio Now we wait in maximum 60 seconds before we shutdown the node. Tasks are may be leaked and leading to some data corruption. * Drink less
🤔
-
- Dec 08, 2022
-
-
Alexandru Vasile authored
* cli: Improve pruning documentation Signed-off-by: Alexandru Vasile <[email protected]> * cli: Keep `finalized` notation and remove `canonical` one * cli: Fix cargo doc * cli: `PruningModeClap` IR enum Signed-off-by: Alexandru Vasile <[email protected]> * cli: Convert PruningModeClap into pruning modes Signed-off-by: Alexandru Vasile <[email protected]> * cli: Use `PruningModeClap` Signed-off-by: Alexandru Vasile <[email protected]> * cli: Rename to `DatabasePruningMode` Signed-off-by: Alexandru Vasile <[email protected]> * cli: Implement `FromStr` instead of `clap::ValueEnum` Signed-off-by: Alexandru Vasile <[email protected]> * Update client/cli/src/params/pruning_params.rs Co-authored-by: Bastian Köcher <[email protected]> * Fix clippy Signed-off-by: Alexandru Vasile <[email protected]> * cli: Add option documentation back Signed-off-by: Alexandru Vasile <[email protected]> * Apply suggestions from code review Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Dec 07, 2022
-
-
João Paulo Silva de Souza authored
* implement crate publishing from CI * fix indentation * use resource_group for job exclusivity ensure that at most one instance of the publish-crates job is running at any given time to prevent race conditions * correct publish = false * Remove YAML anchors as GitLab's `extends:` doesn't need it * Temporarily force cache upload for the new jobs * Revert `RUSTY_CACHIER_FORCE_UPLOAD` * pin libp2p-tcp=0.37.0 for sc-telemetry * Revert "pin libp2p-tcp=0.37.0 for sc-telemetry" This reverts commit 29146bfad6c31e8cf0e2f17ad92a71bb81a373af. * always collect generated crates * increase timeout for publish-crates-template * Force upload the new job cache again * Revert "Force upload the new job cache again" This reverts commit 5a5feee1b2c51fdef768b25a76be4c3949ec1c99. * reformat * improve timeout explanation * s/usual/average Co-authored-by: Vladimir Istyufeev <[email protected]>
-
Alexander Theißen authored
* Remove sandboxing interface * Remove unused struct
-
Adrian Catangiu authored
client/mmr: persisting gadget state across runs Fixes #12780 * client/mmr: on init do canonicalization catch-up * client/mmr: add more tests * client/mmr: persist gadget progress in aux db * client/mmr: add more tests * client/mmr: replace async_std with tokio * remove leftover comment * address review comments Signed-off-by: acatangiu <[email protected]>
-
- Dec 06, 2022
-
-
Marcin S. authored
* Remove mem_info and some references to parity-util-mem * [Draft] Finish removing references to `parity-util-mem` * Upgrade dependencies * Update scripts/ci/deny.toml Co-authored-by: ordian <[email protected]> * Fix Cargo.lock (remove unwanted dependency changes) * Removed unused argument * Run cargo fmt (didn't have pre-commit set up) * Fix some CI errors * Fix another CI error * Remove unused dependency Co-authored-by: ordian <[email protected]>
-
João Paulo Silva de Souza authored
* rename some crates for publishing to crates.io * s/remote-ext/frame-remote-externalities
-
- Dec 05, 2022
-
-
dharjeezy authored
Introduce bounds on the justifications and votes queues, so they do not grow forever if voter cannot make progress and consume from them. When bounds are hit, new votes or justifications get dropped. * use a BTreeMap and check for bounds * cargo fmt * use usize Co-authored-by: Adrian Catangiu <[email protected]>
-
Dmitry Markin authored
* Replace deprecated libp2p feature specs with correct ones * Bump tokio to 1.21.2 * Replace async-std libp2p primitives with tokio ones * minor: rustfmt * Fix TestNet to run initialization in the tokio context * Convert telemetry test from async-std to tokio * Convert notifications tests from async-std to tokio * Convert chain sync tests from async-std to tokio * Ditch async-std completely * Make executor mandatory * Bump tokio to 1.22.0 * minor: rustfmt * Explicitly use tokio runtime in tests * Move more tests to explicit tokio runtime * Explicitly set multithreaded runtime in tokio test * minor: rustfmt * minor: fix comment * Replace async-std with tokio in MMR tests
-
- Dec 01, 2022
-
-
alexgparity authored
* Move create_inherent_data call to use side * Make provide_inherent_data async * Fix tests * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * Log errors * Fix test * Fix test * fix * Deduplicate test code * fix * flag * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Revert "Deduplicate test code" This reverts commit ba46adbe089329c78cd69ccdb08e27ed67bd77cf. * Fix test * remove commented out code * minor to start CI run * start CI * Update client/consensus/slots/src/lib.rs Co-authored-by: Marcin S. <[email protected]> * Apply PR suggestions * Apply PR suggestions * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * minor * kickoff CI * PR suggestions * Compute remaining duration instead of using slot_info.duration * Don't rely on sub implementation for Instant * Apply PR suggestions * Use saturating_duration_since Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Marcin S. <[email protected]> Co-authored-by: parity-processbot <>
-
- Nov 30, 2022
-
-
Aaro Altonen authored
* Fix syncing test * cargo fmt * Fix test
-
Bastian Köcher authored
This fixes some potential crashes in the stream handling in `sc-transaction-handler`.
-
Adrian Catangiu authored
* mmr: move MMR RPC from frame/ to client/ Signed-off-by: Adrian Catangiu <[email protected]> * client/mmr: adjust logging levels to avoid spam * cargo fmt * remove unused imports Signed-off-by: Adrian Catangiu <[email protected]>
-
- Nov 29, 2022
-
-
Oliver Tale-Yazdi authored
* Typo Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Move rust feature check to docker and require not to fail Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add .docker-env Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Move test-rust-features check back to kubernetes Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
Serban Iorga authored
* Move MMR utils methods from pallet to primitives Signed-off-by: Serban Iorga <[email protected]> * Add method to MmrApi * Move forks expanding logic from babe to primitives * Implement MMR gadget * Remove prunning logic from the MMR pallet * Code review changes: 1st iteration * Replace MaybeCanonEngine with CanonEngineBuilder * fix mmr_leaves_count() for kitchen sink demo * Update client/merkle-mountain-range/src/canon_engine.rs Co-authored-by: Adrian Catangiu <[email protected]> * Code review changes: 2nd iteration * fix INDEXING_PREFIX * impl review comments * add documentation and minor rename Signed-off-by: Serban Iorga <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
-
- Nov 28, 2022
-
-
Adrian Catangiu authored
* client/beefy: fix on-demand justif sync for old blocks When receiving BEEFY justifications for old blocks the state might be pruned for them, in which case justification verification fails because BEEFY validator set cannot be retrieved from runtime state. Fix this by having the voter give the validator set to the `OnDemandJustificationsEngine` as request information. On receiving a BEEFY justification for requested block, the provided validator set will be used to validate the justification. Signed-off-by: acatangiu <[email protected]> * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * impl review suggestions * client/beefy: fail initialization if state unavailable * beefy: remove spammy log Signed-off-by: acatangiu <[email protected]> Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <[email protected]>
-
- Nov 27, 2022
-
-
Bastian Köcher authored
* ed25519_verify: Support using dalek for historical blocks The switch from `ed25519-dalek` to `ed25519-zebra` was actually a breaking change. `ed25519-zebra` is more permissive. To support historical blocks when syncing a chain this pull request introduces an externalities extension `UseDalekExt`. This extension is just used as a signaling mechanism to `ed25519_verify` to use `ed25519-dalek` when it is present. Together with `ExtensionBeforeBlock` it can be used to setup a node in way to sync historical blocks that require `ed25519-dalek`, because they included a transaction that verified differently as when using `ed25519-zebra`. This feature can be enabled in the following way. In the chain service file, directly after the client is created, the following code should be added: ``` use sc_client_api::ExecutorProvider; client.execution_extensions().set_extensions_factory( sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED) ); ``` * Fix doc * More fixes * Update client/api/src/execution_extensions.rs Co-authored-by: André Silva <[email protected]> * Fix merge and warning * Fix docs Co-authored-by: André Silva <[email protected]>
-
- Nov 25, 2022
-
-
Oliver Tale-Yazdi authored
* Fix table formatting Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix sp-runtime-interface table Using HTML now since multi-line tables are not a thing and fmt destroys them. Signed-off-by: Oliver Tale-Yazdi <[email protected]> * More rustdoc fixes Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fix tags Signed-off-by: Oliver Tale-Yazdi <[email protected]> * More fixes... Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use Bastis patch Co-authored-by: Bastian Köcher <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Add more backticks Signed-off-by: Oliver Tale-Yazdi <[email protected]> * change ci image Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: alvicsam <[email protected]>
-
- Nov 23, 2022
-
-
Adrian Catangiu authored
* client/beefy: remove high-freq network events from main loop Network events are many and very frequent, remove the net-event-stream from the main voter loop and drastically reduce BEEFY voter task 'wakeups'. Instead have the `GossipValidator` track known peers as it already has callbacks for that coming from `GossipEngine`. Signed-off-by: acatangiu <[email protected]>
-
Davide Galassi authored
* Prevent epochs pruning while on epoch 0
-
- Nov 22, 2022
-
-
Aaro Altonen authored
* Move block/state/warpc sync requests/responses to `ChainSync` * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * Apply review suggestions * cargo-fmt + doc fix * Fix tests Co-authored-by: Bastian Köcher <[email protected]>
-
- Nov 21, 2022
-
-
Adrian Catangiu authored
* client/beefy: prepare worker for persisting state * client/beefy: persist voter state * client/beefy: initialize persistent state * client/beefy: try to vote from the very beginning Now that voter is initialized from persistent state, it makes sense that it can attempt voting right away. This also helps the genesis case when we consider block `One` as mandatory. * client/beefy: add tests for voter state db * client/beefy: persist voter state as soon as initialized * client/beefy: make sure min-block-delta is at least 1 * client/beefy: persist state after voting Persist state after handling self vote to avoid double voting in case of voter restarts. * client/beefy: persist state after handling mandatory block vote For mandatory blocks we want to make sure we're not losing votes in case of crashes or restarts, since voter will not make further progress without finalizing them. * frame/beefy: use GENESIS_AUTHORITY_SET_ID on pallet genesis * client/beefy: initialize voter at either genesis or last finalized To guarantee unbroken chain of mandatory blocks justifications, voter will always resume from either last BEEFY-justified block or `pallet-beefy` genesis, whichever is more recent. Initialization walks back the chain from latest GRANDPA finalized block looking for one of the above. Along the way, it also records and enqueues for processing any BEEFY mandatory blocks that have been already GRANDPA finalized but not BEEFY finalized. * client/beefy: decouple voter init from aux db state load * client/beefy: fix voter init tests * remove debug prints * gadget future must be type () * fix init from last justification Signed-off-by: Adrian Catangiu <[email protected]>
-
- Nov 18, 2022
-
-
Pierre Krieger authored
* Fix the light client protocol protobuf schema * Add another test * Remove unused protobuf struct * Ok you have to use the nightly rustfmt apparently
-