1. 01 Aug, 2021 1 commit
    • Shaun W's avatar
      XCM simulator (#3538) · 4b2bd54a
      Shaun W authored
      * Add xcm-simulator and xcm-simulator-example.
      * Abstract xcmp and dmp handling.
      * Use mock message queue.
      * Xcm simulator example unit tests.
      * Use relay chain block number on sending msg.
      * Fix typo.
      * fmt
      * more fmt
      * Fix deps.
  2. 17 Jun, 2021 1 commit
  3. 12 Jun, 2021 1 commit
  4. 11 Jun, 2021 1 commit
  5. 03 Jun, 2021 1 commit
  6. 07 May, 2021 1 commit
  7. 09 Apr, 2021 1 commit
    • Shawn Tabrizi's avatar
      Introduce System Parachains into Registrar (#2858) · f1c42ce6
      Shawn Tabrizi authored
      * initial stuff
      * adjust deposit
      * remove unused
      * weight stuff
      * Update integration_tests.rs
      * Update paras_registrar.rs
      * Update paras_registrar.rs
      * add test
      * Update paras_registrar.rs
      Co-authored-by: parity-processbot <>
  8. 01 Apr, 2021 1 commit
    • thiolliere's avatar
      Ease parachain candidate code fetching (#2593) · 96dc1f7a
      thiolliere authored
      * code stored in para + modify CandidateDescriptor.
      * WIP: digest + some more impl
      * validation_code_hash in payload + check in inclusion
      * check in client + refator
      * tests
      * fix encoding indices
      * remove old todos
      * fix test
      * fix test
      * add test
      * fetch validation code inside collation-generation from the relay-chain
      * HashMismatch -> PoVHashMismatch + miscompilation
      * refactor, store hash when needed
      * storage rename: more specific but slightly too verbose
      * do not hash on candidate validation, fetch hash instead
      * better test
      * fix test
      * guide updates
      * don't panic in runtime
      Co-authored-by: asynchronous rob's avatarRobert Habermeier <rphmeier@gmail.com>
  9. 29 Mar, 2021 1 commit
  10. 16 Feb, 2021 1 commit
  11. 02 Feb, 2021 1 commit
    • Sergey Pepyakin's avatar
      Clean up PersistedValidationData (#2353) · aba42e4a
      Sergey Pepyakin authored
      * PVD: `block_number`->`relay_parent_number`
      * ValidationParams: `relay_chain_height`->`relay_parent_number`
      * Expose DMQ MQC hash as a well-known-key
      This way the relay storage merkle proofs will be able to obtain the DMQ
      MQC hash and we will be able to remove the it from the
      PersistedValidationData struct.
      * PersistedValidationData: Remove HRMP MQC heads
      * PersistedValidationData: Remove `dmq_mqc_head`
      * Expose the HRMP ingress channel index as a well-known-key
      This way a parachain (PVF and collator) can find all the parachains that
      have an outbound channel to the given one. That allows in turn to find
      all the inbound channels for the given para.
      Having access to that allows the parachain to get the same information
      as the hrmp_mqc_heads now provide.
      * Rename `relay_storage_root` to `relay_parent_storage_root`
  12. 26 Jan, 2021 1 commit
  13. 25 Jan, 2021 1 commit
  14. 13 Jan, 2021 1 commit
    • Sergey Pepyakin's avatar
      HRMP channel deposits (#2225) · 4489b528
      Sergey Pepyakin authored
      * Drive by fixes
      The visibility modifiers are remnants of the previous structure where
      HRMP wasn't a standalone module, by rather a submodule of the router
      * Add Currency assoc type to Config
      This would allow us to reserve balance for deposits. This commit also
      integrates the HRMP module in rococo, test-runtime and mocks to use the
      balances pallet.
      * Fix a bug that doesn't increment the age
      In case the request is not confirmed, the age would be incremented but
      not persisted.
      * Fix cleaning the indexes
      Before that change, the cleaning of the channel indexes was wrong, because it
      naively removed entire rows that was pertaining to the para we delete.
      This approach is flawed because it doesn't account for the rows that are
      pertaining to other paras that contain the outgoing one.
      This clearly violates the invariant imposed on the indexes, that all
      the index rows must contain alive paras, but apart from that it also
      lead to the situation where ingress index would contain the a different
      set of channels that an egress have.
      * Reserve currency for opening the channels
      Note the ugly `unique_saturated_into` calls. The reason for them is the
      currency trait accepts and defines the `Balance` associated type and the
      deposit values are coming from the `HostConfiguration` where they are
      defined using the `Balance`.
      I figured that parameterising `HostConfiguration` would be annoying. On
      the other hand, I don't expect these `unique_saturated_into` calls to
      give us problems since it seems to be a reasonable assumption that this
      module will be instantiated within a runtime where the Currency provided
      will have a Balance that matches the one used in the configuration.
      * Tests: Adapt `run_to_block` so that it submits a proper config
      * Tests: exercise the deposit logic
  15. 11 Jan, 2021 1 commit
  16. 17 Nov, 2020 2 commits
    • Shawn Tabrizi's avatar
      patches (#1965) · 48849be5
      Shawn Tabrizi authored
    • Andronik Ordian's avatar
      update most of the dependencies (#1946) · 31fb8fed
      Andronik Ordian authored
      * update tiny-keccak to 0.2
      * update deps except bitvec and shared_memory
      * fix some warning after futures upgrade
      * remove useless package rename caused by bug in cargo-upgrade
      * revert parity-util-mem *
      * remove unused import
      * cargo update
      * remove all renames on parity-scale-codec
      * remove the leftovers
      * remove unused dep
  17. 06 Nov, 2020 1 commit
    • Sergey Pepyakin's avatar
      Implement HRMP (#1900) · 73553661
      Sergey Pepyakin authored
      * HRMP: Update the impl guide
      * HRMP: Incorporate the channel notifications into the guide
      * HRMP: Renaming in the impl guide
      * HRMP: Constrain the maximum number of HRMP messages per candidate
      This commit addresses the HRMP part of https://github.com/paritytech/polkadot/issues/1869
      * XCM: Introduce HRMP related message types
      * HRMP: Data structures and plumbing
      * HRMP: Configuration
      * HRMP: Data layout
      * HRMP: Acceptance & Enactment
      * HRMP: Test base logic
      * Update adder collator
      * HRMP: Runtime API for accessing inbound messages
      Also, removing some redundant fully-qualified names.
      * HRMP: Add diagnostic logging in acceptance criteria
      * HRMP: Additional tests
      * Self-review fixes
      * save test refactorings for the next time
      * Missed a return statement.
      * a formatting blip
      * Add missing logic for appending HRMP digests
      * Remove the channel contents vectors which became empty
      * Tighten HRMP channel digests invariants.
      * Apply suggestions from code review
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
      * Remove a note about sorting for channel id
      * Add missing rustdocs to the configuration
      * Clarify and update the invariant for HrmpChannelDigests
      * Make the onboarding invariant less sloppy
      Namely, introduce `Paras::is_valid_para` (in fact, it already is present
      in the implementation) and hook up the invariant to that.
      Note that this says "within a session" because I don't want to make it
      super strict on the session boundary. The logic on the session boundary
      should be extremely careful.
      * Make `CandidateCheckContext` use T::BlockNumber for hrmp_watermark
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
  18. 02 Nov, 2020 1 commit
  19. 31 Oct, 2020 1 commit
    • Bastian Köcher's avatar
      Adds test parachain adder collator (#1864) · 8cadebb7
      Bastian Köcher authored
      * start working on building the real overseer
      Unfortunately, this fails to compile right now due to an upstream
      failure to compile which is probably brought on by a recent upgrade
      to rustc v1.47.
      * fill in AllSubsystems internal constructors
      * replace fn make_metrics with Metrics::attempt_to_register
      * update to account for #1740
      * remove Metrics::register, rename Metrics::attempt_to_register
      * add 'static bounds to real_overseer type params
      * pass authority_discovery and network_service to real_overseer
      It's not straightforwardly obvious that this is the best way to handle
      the case when there is no authority discovery service, but it seems
      to be the best option available at the moment.
      * select a proper database configuration for the availability store db
      * use subdirectory for av-store database path
      * apply Basti's patch which avoids needing to parameterize everything on Block
      * simplify path extraction
      * get all tests to compile
      * Fix Prometheus double-registry error
      for debugging purposes, added this to node/subsystem-util/src/lib.rs:472-476:
      Some(registry) => Self::try_register(registry).map_err(|err| {
      	eprintln!("PrometheusError calling {}::register: {:?}", std::any::type_name::<Self>(), err);
      That pointed out where the registration was failing, which led to
      this fix. The test still doesn't pass, but it now fails in a new
      and different way!
      * authorities must have authority discovery, but not necessarily overseer handlers
      * fix broken SpawnedSubsystem impls
      detailed logging determined that using the `Box::new` style of
      future generation, the `self.run` method was never being called,
      leading to dropped receivers / closed senders for those subsystems,
      causing the overseer to shut down immediately.
      This is not the final fix needed to get things working properly,
      but it's a good start.
      * use prometheus properly
      Prometheus lets us register simple counters, which aren't very
      interesting. It also allows us to register CounterVecs, which are.
      With a CounterVec, you can provide a set of labels, which can
      later be used to filter the counts.
      We were using them wrong, though. This pattern was repeated in a
      variety of places in the code:
      // panics with an cardinality mismatch
      let my_counter = register(CounterVec::new(opts, &["succeeded", "failed"])?, registry)?;
      The problem is that the labels provided in the constructor are not
      the set of legal values which can be annotated, but a set of individual
      label names which can have individual, arbitrary values.
      This commit fixes that.
      * get av-store subsystem to actually run properly and not die on first signal
      * typo fix: incomming -> incoming
      * don't disable authority discovery in test nodes
      * Fix rococo-v1 missing session keys
      * Update node/core/av-store/Cargo.toml
      * try dummying out av-store on non-full-nodes
      * overseer and subsystems are required only for full nodes
      * Reduce the amount of warnings on browser target
      * Fix two more warnings
      * InclusionInherent should actually have an Inherent module on rococo
      * Ancestry: don't return genesis' parent hash
      * Update Cargo.lock
      * fix broken test
      * update test script: specify chainspec as script argument
      * Apply suggestions from code review
      Co-authored-by: default avatarBastian Köcher <bkchr@users.noreply.github.com>
      * Update node/service/src/lib.rs
      Co-authored-by: default avatarBastian Köcher <bkchr@users.noreply.github.com>
      * node/service/src/lib: Return error via ? operator
      * post-merge blues
      * add is_collator flag
      * prevent occasional av-store test panic
      * simplify fix; expand application
      * run authority_discovery in Role::Discover when collating
      * distinguish between proposer closed channel errors
      * add IsCollator enum, remove is_collator CLI flag
      * improve formatting
      * remove nop loop
      * Fix some stuff
      * Adds test parachain adder collator
      * Add sudo to Rococo, change session length to 30 seconds and some renaming
      * Update to the latest changes on master
      * Some fixes
      * Fix compilation
      * Update parachain/test-parachains/adder/collator/src/lib.rs
      Co-authored-by: Sergey Pepyakin's avatarSergei Shulepov <sergei@parity.io>
      * Review comments
      * Downgrade transaction version
      * Fixes
      * MOARE
      * Register notification protocols
      * utils: remove unused error
      * av-store: more resilient to some errors
      * address review nits
      * address more review nits
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <peter.r.goodspeedniklaus@gmail.com>
      Co-authored-by: Andronik Ordian's avatarAndronik Ordian <write@reusable.software>
      Co-authored-by: Fedor Sakharov's avatarFedor Sakharov <fedor.sakharov@gmail.com>
      Co-authored-by: default avatarRobert Habermeier <robert@Roberts-MBP.lan1>
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
      Co-authored-by: default avatarMax Inden <mail@max-inden.de>
      Co-authored-by: default avatarSergey Shulepov <s.pepyakin@gmail.com>
      Co-authored-by: Sergey Pepyakin's avatarSergei Shulepov <sergei@parity.io>
  20. 28 Oct, 2020 1 commit
    • Sergey Pepyakin's avatar
      Downward Message Processing implementation (#1859) · ed759c75
      Sergey Pepyakin authored
      * DMP: data structures and plumbing
      * DMP: Implement DMP logic in the router module
      DMP: Integrate DMP parts into the inclusion module
      * DMP: Introduce the max size limit for the size of a downward message
      * DMP: Runtime API for accessing inbound messages
      * OCD
      Small clean ups
      * DMP: fix the naming of the error
      * DMP: add caution about a non-existent recipient
  21. 07 Oct, 2020 1 commit
  22. 18 Aug, 2020 1 commit
    • asynchronous rob's avatar
      Implement validation data refactor (#1585) · 8c881e45
      asynchronous rob authored
      * update primitives
      * correct parent_head field
      * make hrmp field pub
      * refactor validation data: runtime
      * refactor validation data: messages
      * add arguments to full_validation_data runtime API
      * port runtime API
      * mostly port over candidate validation
      * remove some parameters from ValidationParams
      * guide: update candidate validation
      * update candidate outputs
      * update ValidationOutputs in primitives
      * port over candidate validation
      * add a new test for no-transient behavior
      * update util runtime API wrappers
      * candidate backing
      * fix missing imports
      * change some fields of validation data around
      * runtime API impl
      * update candidate validation
      * fix backing tests
      * grumbles from review
      * fix av-store tests
      * fix some more crates
      * fix provisioner tests
      * fix availability distribution tests
      * port collation-generation to new validation data
      * fix overseer tests
      * Update roadmap/implementers-guide/src/node/utility/candidate-validation.md
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
  23. 10 Aug, 2020 1 commit
  24. 23 Jul, 2020 1 commit
    • Peter Goodspeed-Niklaus's avatar
      implement bitfield signing subsystem (#1364) · 8217ca67
      Peter Goodspeed-Niklaus authored
      * update guide to reduce confusion and TODOs
      * work from previous bitfield signing effort
      There were large merge issues with the old bitfield signing PR, so
      we're just copying all the work from that onto this and restarting.
      Much of the existing work will be discarded because we now have better
      tools available, but that's fine.
      * start rewriting bitfield signing in terms of the util module
      * implement construct_availability_bitvec
      It's not an ideal implementation--we can make it much more concurrent--
      but at least it compiles.
      * implement the unimplemented portions of bitfield signing
      * get core availability concurrently, not sequentially
      * use sp-std instead of std for a parachain item
      * resolve type inference failure caused by multiple From impls
      * handle bitfield signing subsystem & Allmessages variant in overseer
      * fix more multi-From inference issues
      * more concisely handle overflow
      Co-authored-by: Andronik Ordian's avatarAndronik Ordian <write@reusable.software>
      * Revert "resolve type inference failure caused by multiple From impls"
      This reverts commit 7fc77805.
      * Revert "fix more multi-From inference issues"
      This reverts commit f14ffe58
      * impl From<i32> for ParaId
      * handle another instance of AllSubsystems
      * improve consistency when returning existing options
      Co-authored-by: Andronik Ordian's avatarAndronik Ordian <write@reusable.software>
  25. 01 Jul, 2020 1 commit
  26. 13 Apr, 2020 1 commit
  27. 06 Apr, 2020 1 commit
    • asynchronous rob's avatar
      Upgradeable validation functions (#918) · ed2c4cab
      asynchronous rob authored
      * upgrade primitives to allow changing validation function
      * set up storage schema for old parachains code
      * fix compilation errors
      * fix test compilation
      * add some tests for past code meta
      * most of the runtime logic for code upgrades
      * implement old-code pruning
      * add a couple tests
      * clean up remaining TODOs
      * add a whole bunch of tests for runtime functionality
      * remove unused function
      * fix runtime compilation
      * extract some primitives to parachain crate
      * add validation-code upgrades to validation params and result
      * extend validation params with code upgrade fields
      * provide maximums to validation params
      * port test-parachains
      * add a code-upgrader test-parachain and tests
      * fix collator tests
      * move test-parachains to own folder to work around compilation errors
      * fix test compilation
      * update the Cargo.lock
      * fix parachains tests
      * remove dbg! invocation
      * use new pool in code-upgrader
      * bump lockfile
      * link TODO to issue
  28. 13 Mar, 2020 1 commit
    • Shawn Tabrizi's avatar
      Benchmark Polkadot Claims Pallet (#876) · 2f44ce41
      Shawn Tabrizi authored
      * fix
      * Starting to add benchmarks
      * make compile
      * add benchmarks
      * Make work with Substrate master
      * Bench validate unsigned
      * back to polkadot master
      * starting to add cli with feature flag
      * more stuff
      * Add to kusama
      * Update Cargo.lock
      * fix dev dep
      * bump wasm builder
      * Remove encode from keccak benchmark
      * bump spec
      * Add weight documentation
      * Update Cargo.lock
      * Update check_runtime.sh
      * Update publish_draft_release.sh
      * Update Cargo.lock
      Co-authored-by: thiolliere's avatarthiolliere <gui.thiolliere@gmail.com>
  29. 19 Feb, 2020 1 commit
  30. 13 Feb, 2020 1 commit
    • 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
  31. 11 Feb, 2020 1 commit
  32. 08 Jan, 2020 1 commit
  33. 05 Jan, 2020 1 commit
  34. 02 Dec, 2019 1 commit
  35. 23 Oct, 2019 1 commit
  36. 19 Oct, 2019 1 commit
  37. 11 Oct, 2019 1 commit
    • Gavin Wood's avatar
      Introduce Parathreads (runtime) (#341) · 2213e91d
      Gavin Wood authored
      * Rest of parathread draft implementation, parachain permissioning.
      * Update Substrate
      * Update Substrate again
      * Integrate weight/fee stuff.
      * Council
      * Build fixes
      * More fixes
      * Minor additions
      * fix some small errors
      * Revert "fix some small errors"
      This reverts commit 4fb52c82
      * Merge fix.
      * do_swap -> on_swap
      * Update depdendency to polkadot-master
      * Fix more merge problems
      * Some patching of errors
      * Fix storage closure
      * Actually fix storage. It builds!
      * Tests run... but not successfully.
      * Add `run_to_block` to get parachains active to start
      * More `run_to_block`
      * Fix build
      * Queue up changes to threads
      * Move registration test
      * Fix regsiter/deregister test
      * Retry queue.
      * Minor refactor
      * Refactor to avoid heavy storage items
      * Make tests pass
      * remove para on deregister, add events
      * Remove println
      * Fix register/deregister parathread test
      * fix merge
      * Parathread can be activated test
      * Test auction
      * Add `Debtors` storage item
      I considered putting the debtor information in `ParaInfo`, but it did not make sense to me since this information only applies to parathreads, not `paras` in general.
      * remove comment code
      * Some new tests
      * Fixes for removing threads when scheduled. Tests.
      * Test progression of threads.
      * Test that reschedule queuing works properly.
      * Make test slightly more interesting
      * whitespace
      * Swap works properly.
      * Update locks
      * Build
      * Rename can_swap
      * Add test for funds to be correctly returned after a swap
      Swap does not seem to have logic which correctly swaps the debtor account to the new parathread.
      * Make tests consistant
      * Add check that `PendingSwap` is cleaned up
      * Update runtime/src/parachains.rs
      Co-Authored-By: asynchronous rob's avatarRobert Habermeier <rphmeier@gmail.com>
      * Update runtime/src/registrar.rs
      Co-Authored-By: asynchronous rob's avatarRobert Habermeier <rphmeier@gmail.com>
      * Some fixes/suggestions from review
      * Docs
      * Apply suggestions from code review
      Co-Authored-By: asynchronous rob's avatarRobert Habermeier <rphmeier@gmail.com>
      Co-Authored-By: Shawn Tabrizi's avatarShawn Tabrizi <shawntabrizi@gmail.com>
      * Update network/src/gossip.rs
      Co-Authored-By: asynchronous rob's avatarRobert Habermeier <rphmeier@gmail.com>
      * Rename OnSwap
      * Add missing `]`
      * Rejig ordering semantics, making everything a bit slower but correct.
      * Some Fixes to Parathread Compile (#470)
      * Some Fixes
      * Fix queue_upward_messages
      * Change back to const
      * Build fixes
      * Fix tests
  38. 12 Aug, 2019 1 commit
    • Kian Paimani's avatar
      Update to latest Substrate master. (#353) · af0d87af
      Kian Paimani authored
      * Integrate srml/im-online
      * Fix all build errors with old aura.
      * Fix most of the build errors.
      * Builds and tests seem to pass (I will not trust this commit yet)
      * Apply suggestions from code review
      Co-Authored-By: asynchronous rob's avatarRobert Habermeier <rphmeier@gmail.com>
      * Kill some warnings.
      * fix panics on 0 validators
      * Fix dev chain.
      * Fix author stuff
      * fix im online integration.
      * Some tweaks
      * Introduce app-crypto
      * Initial build work
      * codec update / tweaks
      * patch polkadot-erasure-coding input
      * More fixes for new crypto
      * More fixes
      * Update parachains module
      * evamp parachain crypto
      * More crypto work.
      * Chain spec and service.
      * ChainSpec stuff
      * Last bits for a clean build
      * Tweak coment
      * adapt polkadot-validation to the new keystore
      * polkadot-network compiles, but tests don't
      * Integrate the new parachain validation stuff
      * delete message_routing file
      * make polkadot-network tests compile and pass
      * runtime tests compile and pass
      * update substrate ref
      * service compiles
      * all tests pass
      * Add TODO, change branch back to polkadot-master
      * Lock file
      * TODOs done
      * Issue number
      * Remove old tODO
      * Remove commented code
  39. 23 Jul, 2019 1 commit