Skip to content
  1. Mar 06, 2020
  2. Mar 05, 2020
    • Peter Goodspeed-Niklaus's avatar
      Get current relay block head without messing with signatures · f81b1f6a
      Peter Goodspeed-Niklaus authored
      Turns out we already had a client object available which implemented
      the necessary trait; the difficulty was just that I didn't know that
      a. the trait existed, or that
      b. the client in our possession implemented that trait.
      
      This does make things much neater; it just means propagating the
      trait bound backwards as implemented here.
      f81b1f6a
    • Peter Goodspeed-Niklaus's avatar
      WIP: add get_current_relay_block function args to one path back toward relay chain · 649fbe4d
      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?
      649fbe4d
    • Peter Goodspeed-Niklaus's avatar
      WIP: Add current_relay_block to ValidationParams, resolve circular dep · b4fb14bc
      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.
      b4fb14bc
  3. Feb 24, 2020
  4. Feb 21, 2020
  5. Feb 19, 2020
  6. Feb 18, 2020
  7. Feb 15, 2020
  8. Feb 13, 2020
    • Ashley's avatar
      Strip out old XCMP primitives (#823) · d9b4fc45
      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
      d9b4fc45
  9. Feb 12, 2020
  10. Feb 11, 2020
  11. Feb 10, 2020
    • asynchronous rob's avatar
      rewrite network code to use notifications_protocol APIs from Substrate (#788) · 07426539
      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
      07426539
    • Cecile Tonglet's avatar
      Fix invalid argument order (#832) · 1d21f773
      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
      ```
      1d21f773
    • Bastian Köcher's avatar
      Be specific about the `BitVec` generic arguments (#830) · 80d7e03c
      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`
      80d7e03c
    • Cecile Tonglet's avatar
      Test node exits properly (#831) · 8303f7d5
      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
      8303f7d5
    • asynchronous rob's avatar
      enable migrations in polkadot and kusama runtimes (#824) · 9ea614ef
      asynchronous rob authored
      * enable migrations in polkadot and kusama runtimes
      
      * bump runtime version
      9ea614ef
    • asynchronous rob's avatar
      Include parent head in `CandidateReceipt` (#826) · 52a5c8f7
      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
      52a5c8f7
  12. Feb 09, 2020
    • Gavin Wood's avatar
      Bump Substrate (#816) · 6a2092d6
      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: default avatarCecile Tonglet <[email protected]>
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      6a2092d6
  13. Feb 03, 2020
  14. Feb 01, 2020
  15. Jan 31, 2020
  16. Jan 30, 2020
  17. Jan 29, 2020
  18. Jan 28, 2020