- Mar 05, 2020
-
-
Peter Goodspeed-Niklaus authored
The parachain validation logic trends heavily toward functions, not structs with methods. This is probably a good thing for efficiency, but does make it harder to incorporate an external piece of state like the current relay chain block number: we have to change several functions signatures and their call sites, not just add a field to a struct. This commit partially traces back one of the chains of compilation errors resulting from missing function parameters, adding parameters to parent functions appropriately. At `validation::collation::collation_fetch`, the parameters change from type `BlockNumber` to type `F: Fn() -> BlockNumber`, because that loop looks like a place where the relay chain might potentially change during execution. Unfortunately, this doesn't work as-is right now, because within `validation::validation_service::launch_work`, we get errors that `get_current_relay_block` may not live long enough. The compiler suggests requiring a `'static` lifetime, which feels like a strategy which won't work unless the struct where the relay chain block number is actually stored is also `'static`. Adding a `'a` lifetime tied to `&'a self` doesn't work either. It looks like the restriction comes from `futures::task::Spawn`, whose future must apparently conform to `'static`. We could just pass the current block number all the way from the top of the function chain, but it's not yet obvious how these functions are called by the relay chain, and at what points the current block might change during execution. Therefore, questions: - Can we assume that the relay chain current block will not change during execution of this function chain? If yes, we can just pass the block number, which is `Copy` and therefore in `'static`. - If no, is there a reasonable way to get a `'static` function from the relay chain so we can still use this strategy to get the current relay block number? - If no, how should we propagate this data? Channels maybe? - If we retain the closure strategy, is it a problem to call the non-async function `get_current_relay_block` within `async fn collation_fetch`? Given that async closures are not yet stable, do we have the option not to?
-
Peter Goodspeed-Niklaus authored
Resolving the circular dependency was relatively simple: just move a bunch of parachain-specific stuff from the parachain package into the primitives package, then fix up the Cargo manifests. Then, publicly import all the stuff which was moved so that we don't break any external packages which depend on parachain. We have a deprecation notice on that `pub use` statement because downstream consumers should depend on items in the right place. Unfortunately, it doesn't actually do anything due to https://github.com/rust-lang/rust/issues/47236. Still, we'll leave it in against the day that bug gets fixed. Adding current_relay_block to ValidationParams is only part of the work, of course: we now need to go back to where that struct is instantiated, and insert it there, tracing it back until we get to some kind of relay chain instance from which we can get the actual current value and insert it appropriately.
-
- Feb 24, 2020
-
-
Bastian Köcher authored
-
-
This leaves the opportunity to cumulus to run the service by itself.
-
Bastian Köcher authored
-
- Feb 21, 2020
-
-
Pierre Krieger authored
-
- Feb 19, 2020
-
-
Shawn Tabrizi authored
* Separate `WeightToFee` calculation for Kusama and Polkadot * Bump spec
-
André Silva authored
-
Nikolay Volf authored
* try to update * latest updates * final fixes * Fix claim w/ vesting logic * Make claim tests a bit better Co-authored-by: Shawn Tabrizi <[email protected]>
-
Ashley authored
* Remove TargetedMessage * Nitpicks
-
- Feb 18, 2020
-
-
s3krit authored
* CI: Split common functions into lib.sh and make... ... alert_pending_release.sh check the substrate changes for various labels. If labelled, will be included in the changelog, otherwise will silently be left out. * replace non-standard /bin/bash with /usr/bin/env bash * CI: make lib.sh /bin/sh-compatible
-
- Feb 15, 2020
-
-
Shawn Tabrizi authored
-
- Feb 13, 2020
-
-
Ashley authored
* WIP * WIp * Mostly get tests to compile * Fix adder collator * Remove more stuff * Revert some changes to av store * Fix av store tests * Nitpicks * Restore some things * Small changes * Remvoe unused error variants
-
- Feb 12, 2020
-
-
Bastian Köcher authored
* Revert e2dc9371 * Make it work
-
- Feb 11, 2020
-
-
Bastian Köcher authored
-
asynchronous rob authored
* add a maximum code size and head data size * get existing tests passing * add tests for slots logic * test registrar behavior * introduce maximums and bump versions * address review grumbles * work around publicizing derive * remove unneeded and wrong doc
-
- Feb 10, 2020
-
-
asynchronous rob authored
* extract all network code to legacy submodule * update references to legacy proto * skeleton of futures-based protocol * refactor skeleton to use background task * rename communication_for to build_table_router * implement internal message types for validation network * basic ParachainNetwork and TableRouter implementations * add some module docs * remove exit-future from validation * hack: adapt legacy protocol to lack of exit-future * generalize RegisteredMessageValidator somewhat * instantiate and teardown table routers * clean up RouterInner drop logic * implement most of the statement import loop * implement statement loop in async/await * remove unneeded TODO * most of the collation skeleton * send session keys and validator roles * also send role after status * use config in startup * point TODO to issue * fix test compilation
-
Cecile Tonglet authored
Make sure that --dev purge-chain is rejected ``` [0] [11:24:02] ~/r/polkadot master > ./target/debug/polkadot purge-chain --dev -y "/home/cecile/.local/share/polkadot/chains/dev/db" did not exist. [0] [11:25:36] ~/r/polkadot cecton-fix-invalid-argument-order > ./target/debug/polkadot --dev purge-chain -y error: Found argument 'purge-chain' which wasn't expected, or isn't valid in this context USAGE: polkadot --dev For more information try --help ```
-
Bastian Köcher authored
* Be specific about the `BitVec` generic arguments Currently we use the default generic arguments for `BitVec`. This means we use `BigEndian` and `u8`. These default values are not stable, with `0.17` of the `BitVec` crate this changes. To make sure we don't break anything in the future, make sure we explictly set the generics. * Update `spec_version`
-
Cecile Tonglet authored
* Initial commit Forked at: 6a2092d6 Parent branch: origin/master * Test running node and interrupts * WIP Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750 Parent branch: origin/cumulus-branch * Update Cargo.lock * WIP Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750 Parent branch: origin/cumulus-branch * WIP Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750 Parent branch: origin/cumulus-branch * WIP Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750 Parent branch: origin/cumulus-branch
-
asynchronous rob authored
* enable migrations in polkadot and kusama runtimes * bump runtime version
-
asynchronous rob authored
* runtime: candidate receipt must pass parent head * construct parachain candidates using correct parent_head * validate that the parent header is correct in candidate receipt * fix test fallout * bump runtime versions
-
- Feb 09, 2020
-
-
Gavin Wood authored
* Amalgamate pieces of balance module * Fixes for vesting split * Refactoring for vesting/balances split * Build fixes * Remove on_free_balance_zero and some docs. * Indentation. * Revert branch * Fix. * Update substrate: fixes after CLI refactoring * Reverting removal of exit * Removed too much again * Update Cargo.lock * Cargo.lock * Update Substrate, ready for #4820 * Fixes * Update to latest substrate master * Fix network tests * Update lock * Fix tests * Update futures to get bug fixes * Fix tests for new balances/vesting logic * Cargo fix * Another fix Co-authored-by: Cecile Tonglet <[email protected]> Co-authored-by: Robert Habermeier <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Feb 03, 2020
-
-
Pierre Krieger authored
-
gabriel klawitter authored
-
Bastian Köcher authored
-
- Feb 01, 2020
-
-
Ashley authored
* Fix browser.rs * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]>
-
- Jan 31, 2020
-
-
Gavin Wood authored
* Bump runtime version * Bump runtime version
-
Bastian Köcher authored
-
Gavin Wood authored
* Update to latest Substrate master * upgrade decl_storage declaration * Companion PR to Substrate#4752 * Substrate update: Identity should bound additional fields (#4770) Substrate commit: 2c9ce7296b19934b1ffd50150be2fdb2ddf81a4e * WIP * WIP * Updated substrate and fixes * Fix compilation and switch to latest wasm-builder-runner * Fixed missing doc * Update collator/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: thiolliere <[email protected]> Co-authored-by: Pierre Krieger <[email protected]> Co-authored-by: Cecile Tonglet <[email protected]>
-
- Jan 30, 2020
-
-
Pierre Krieger authored
-
Toralf Wittner authored
-
- Jan 29, 2020
-
-
Gavin Wood authored
* Update to latest Substrate master * upgrade decl_storage declaration * Companion PR to Substrate#4752 Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: thiolliere <[email protected]> Co-authored-by: Pierre Krieger <[email protected]>
-
Gavin Wood authored
-
Ashley authored
* upgrade tokio again * Remove WrappedExecutor * switch to spawn_blocking
-
- Jan 28, 2020
-
-
Muhammad Altabba authored
* Update docker.md Few Edits: - Use the `latest` version of polkadot. - Add a missing `--` when reporting the version. * Update docker.md use `westend` chain > Alex doesn't exist anymore, the current test net is `westend`. According to https://github.com/paritytech/polkadot/issues/803
-
- Jan 24, 2020