Skip to content
  1. Mar 29, 2021
  2. Mar 18, 2021
    • Shaun Wang's avatar
      Replace 'Module' with 'Pallet' in construct_runtime macro (#8372) · 2e552244
      Shaun Wang authored
      * Use 'Pallet' struct in construct_runtime.
      
      * Fix genesis and metadata macro.
      
      * Fix 'Pallet' type alias.
      
      * Replace 'Module' with 'Pallet' for all construct_runtime use cases.
      
      * Replace more deprecated 'Module' struct.
      
      * Bring back AllModules and AllPalletsWithSystem type, but deprecate them.
      
      * Replace deprecated 'Module' struct from merge master.
      
      * Minor fix.
      
      * Fix UI tests.
      
      * Revert UI override in derive_no_bound.
      
      * Fix more deprecated 'Module' use from master branch.
      
      * Fix more deprecated 'Module' use from master branch.
      2e552244
  3. Mar 17, 2021
  4. Mar 11, 2021
  5. Mar 10, 2021
    • asynchronous rob's avatar
      more clear randomness API for BABE (#8180) · e2960c38
      asynchronous rob authored
      
      
      * more clear randomness API for BABE
      
      * babe: move randomness utilities to its own file
      
      * node: use babe::RandomnessFromOneEpochAgo in random_seed implementation
      
      * frame-support: annotate randomness trait with block number
      
      * pallet-randomness-collective-flip: fix for new randomness trait
      
      * pallet-society: fix randomness usage
      
      * pallet-lottery: fix randomness usage
      
      * pallet-contracts: fix randomness usage
      
      * pallet-babe: fix randomness usage
      
      we need to track when the current and previous epoch started so that we
      know the block number by each existing on-chain was known
      
      * node: fix random_seed
      
      * node-template: fix random_seed
      
      * frame-support: extend docs
      
      * babe: add test for epoch starting block number tracking
      
      * babe: fix epoch randomness docs
      
      * frame: add todos for dealing with randomness api changes
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      e2960c38
    • Tomasz Drwięga's avatar
      Custom RPC for Merkle Mountain Range pallet (#8137) · f3d4355a
      Tomasz Drwięga authored
      * Add MMR custom RPC.
      
      * Change RuntimeApi to avoid hardcoding leaf type.
      
      * Properly implement the new RuntimeAPI and wire up RPC.
      
      * Extract Offchain DB as separate execution extension.
      
      * Enable offchain DB access for offchain calls.
      
      * Fix offchain_election tests.
      
      * Skip block initialisation for proof generation.
      
      * Fix integration test setup.
      
      * Fix offchain tests. Not sure how I missed them earlier 🤷.
      
      * Fix long line.
      
      * One more test missing.
      
      * Update mock for multi-phase.
      
      * Address review grumbbles.
      
      * Address review grumbles.
      
      * Fix line width of a comment
      f3d4355a
  6. Mar 09, 2021
    • Bastian Köcher's avatar
      Introduce new concept of "slot portion for proposing" (#8280) · 7599e0d6
      Bastian Köcher authored
      * Introduce new concept of "slot portion for proposing"
      
      Currently when building a block we actually give the proposer all of the
      time in the slot, while this is wrong. The slot is actually split in at
      least two phases proposing and propagation or in the polkadot case into
      three phases validating pov's, proposing and propagation. As we don't
      want to bring that much polkadot concepts into Substrate, we only
      support splitting the slot into proposing and propagation. The portion
      can now be passed as parameter to AuRa and BABE to configure this value.
      However, this slot portion for propagation doesn't mean that the
      proposer can not go over this limit. When we miss slots we still apply
      the lenience factor to increase the proposing time, so that we have
      enough time to build a heavy block.
      
      Besides all what was said above, this is especially required for
      parachains. Parachains have a much more constraint proposing window.
      Currently the slot duration is at minimum 12 seconds, but we only have
      around 500ms for proposing. So, this slot portion for proposing is
      really required to make it working without hacks.
      
      * Offgit feedback
      
      * Cast cast cast
      7599e0d6
  7. Mar 06, 2021
    • Bastian Köcher's avatar
      Do not use `Option` to wrap `GenesisConfig` fields (#8275) · b0ebf649
      Bastian Köcher authored
      Currently we wrap every `GenesisConfig` field in an `Option`, while
      we require `Default` being implemented for all pallet genesisconfigs.
      Passing `None` also results in the genesis not being initialized, which
      is a bug as seen from the perspective of a pallet developer?
      
      This pr changes the fields of the `GenesisConfig` to non `Option` types.
      b0ebf649
  8. Mar 05, 2021
    • Bastian Köcher's avatar
      AuRa improvements (#8255) · 1680422f
      Bastian Köcher authored
      
      
      * AuRa improvements
      
      Hot and fresh AuRa improvements. This pr does the following:
      
      - Move code belonging to the import queue etc to import_queue.rs
      - Introduce `ImportQueueParams` and `StartAuraParams` structs to make
      it more easier to understand what parameters we pass to AuRa.
      - Introduce `CheckForEquivocation` to tell AuRa if it should check for
      equivocation on block import. This is required for parachains, because
      they are allowed to equivocate when they build two blocks for the same
      slot, but for different relay chain parents.
      
      * Update client/consensus/aura/src/import_queue.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Fix compilation
      
      * AAA
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      1680422f
    • thiolliere's avatar
      Fix doc build with --all-features (#8277) · 9c4e4d45
      thiolliere authored
      * implement
      
      * make default pre/post_upgrade
      
      * simplify Cargo.toml
      
      * revert removal of outdated/private links
      
      * link in pallet-mmr
      9c4e4d45
  9. Mar 03, 2021
  10. Mar 02, 2021
  11. Feb 25, 2021
  12. Feb 19, 2021
    • Bastian Köcher's avatar
      Ensure we spawn the block import worker as an essential task (#8155) · 821e018d
      Bastian Köcher authored
      * Ensure we spawn the block import worker as an essential task
      
      This pr ensures that we spawn the block import worker as an essential
      task. This is quite important as we need to bring down the node when the
      block import is done. Besides that it adds some debug output to the
      block import worker.
      
      * Don't be stupid :D
      821e018d
  13. Feb 17, 2021
    • Cecile Tonglet's avatar
      Fix telemetry span not entering properly attempt 3 (#8043) · 27274c42
      Cecile Tonglet authored
      
      
      * Fix tracing tests (#8022)
      
      * Fix tracing tests
      
      The tests were not working properly.
      
      1. Some test was setting a global subscriber, this could lead to racy
      conditions with other tests.
      
      2. A logging test called `process::exit` which is completly wrong.
      
      * Update client/tracing/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Review comments
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Fix tracing spans are not being forwarded to spawned task (#8009)
      
      * Fix tracing spans are not being forwarded to spawned task
      
      There is a bug that tracing spans are not forwarded to spawned task. The
      problem was that only the telemetry span was forwarded. The solution to
      this is to use the tracing provided `in_current_span` to capture the
      current active span and pass the telemetry span explictely. We will now
      always enter the span when the future is polled. This is essentially the
      same strategy as tracing is doing with its `Instrumented`, but now
      extended for our use case with having multiple spans active.
      
      * More tests
      
      * Proper test for telemetry and prefix span
      
      * WIP
      
      * Fix test (need to create & enter the span at the same time)
      
      * WIP
      
      * Remove telemtry_span from sc_service config
      
      * CLEANUP
      
      * Update comment
      
      * Incorrect indent
      
      * More meaningful name
      
      * Dedent
      
      * Naming XD
      
      * Attempt to make a more complete test
      
      * lint
      
      * Missing licenses
      
      * Remove user data
      
      * CLEANUP
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * CLEANUP
      
      * Apply suggestion
      
      * Update bin/node/cli/tests/telemetry.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Wrapping lines
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarDavid <[email protected]>
      27274c42
  14. Feb 15, 2021
  15. Feb 10, 2021
  16. Feb 04, 2021
  17. Feb 03, 2021
  18. Jan 29, 2021
  19. Jan 27, 2021
  20. Jan 26, 2021
  21. Jan 20, 2021
  22. Jan 15, 2021
  23. Jan 14, 2021
    • Liu-Cheng Xu's avatar
      Add payment_queryFeeDetails RPC (#7692) · 65569620
      Liu-Cheng Xu authored
      
      
      * Return FeeDetails in compute_fee_raw()
      
      * Add payment_queryDetails rpc
      
      * Simplify serde attribute a bit
      
      * Fix line width check
      
      * Use saturating_add()
      
      * Move transaction payment rpc types to types.rs
      
      * Add file header
      
      * Fix test
      
      * Update Cargo.lock
      
      * Nit
      
      * Apply the review suggestions
      
      * .
      
      * .
      
      * Fix serde
      
      * Fix rust doc
      
      * .
      
      * Update frame/transaction-payment/src/types.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Use NumberOrHex in fee details RPC
      
      * Address review feedback
      
      * Nits
      
      * Update some docs
      
      * Address review
      
      * Update frame/transaction-payment/src/types.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Happy 2021
      
      * Nit
      
      * Address code review
      
      * Remove needless bound
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      65569620
  24. Jan 13, 2021
    • Bernhard Schuster's avatar
      make helper error types generics (#7878) · f7fccb31
      Bernhard Schuster authored
      
      
      * make helper error types generics
      
      * avoid From<io::Error> dep in runner helper logic
      
      * slip of the pen, bump futures to 0.3.9
      
      * more generics
      
      * generic var spaces
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * network-gossip: add metric for number of local messages (#7871)
      
      * network-gossip: add metric for number of local messages
      
      * grandpa: fix GossipEngine missing metrics registry parameter
      
      * network-gossip: increase known messages cache size
      
      * network-gossip: fix tests
      
      * grandpa: remove unnecessary clone
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      
      * network-gossip: count registered and expired messages separately
      
      * network-gossip: add comment on known messages cache size
      
      * network-gossip: extend comment with cache size in memory
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      
      * Clean-up pass in network/src/protocol.rs (#7889)
      
      * Remove statistics system
      
      * Remove ContextData struct
      
      * Remove next_request_id
      
      * Some TryFrom nit-picking
      
      * Use constants for peer sets
      
      * contracts: Don't read the previous value when overwriting a storage item (#7879)
      
      * Add `len` function that can return the length of a storage item efficiently
      
      * Make use of the new len function in contracts
      
      * Fix benchmarks
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Remove unused imports
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      
      * Fix clear prefix check to avoid erasing child trie roots. (#7848)
      
      * Fix clear prefix check to avoid erasing child trie roots.
      
      * Renaming and extend existing test with check.
      
      * last nitpicks.
      
      * use follow paths to std standarad components
      
      * line width
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      Co-authored-by: default avatarAndré Silva <[email protected]>
      Co-authored-by: default avatarMax Inden <[email protected]>
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      Co-authored-by: default avatarAlexander Theißen <[email protected]>
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      Co-authored-by: default avatarcheme <[email protected]>
      f7fccb31
  25. Jan 12, 2021
  26. Jan 07, 2021
    • Pierre Krieger's avatar
      Rework priority groups, take 2 (#7700) · 779c4f86
      Pierre Krieger authored
      
      
      * Rework priority groups
      
      * Broken tests fix
      
      * Fix warning causing CI to fail
      
      * [Hack] Try restore backwards-compatibility
      
      * Fix peerset bug
      
      * Doc fixes and clean up
      
      * Error on state mismatch
      
      * Try debug CI
      
      * CI debugging
      
      * [CI debug] Can I please see this line
      
      * Revert "[CI debug] Can I please see this line"
      
      This reverts commit 4b7cf7c1511f579cd818b21d46bd11642dfac5cb.
      
      * Revert "CI debugging"
      
      This reverts commit 9011f1f564b860386dc7dd6ffa9fc34ea7107623.
      
      * Fix error! which isn't actually an error
      
      * Fix Ok() returned when actually Err()
      
      * Tweaks and fixes
      
      * Fix build
      
      * Peerset bugfix
      
      * [Debug] Try outbound GrandPa slots
      
      * Another bugfix
      
      * Revert "[Debug] Try outbound GrandPa slots"
      
      This reverts commit d175b9208c088faad77d9f0ce36ff6f48bd92dd3.
      
      * [Debug] Try outbound GrandPa slots
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      
      * Use consts for hardcoded peersets
      
      * Revert "Try debug CI"
      
      This reverts commit 62c4ad5e79c03d561c714a008022ecac463a597e.
      
      * Renames
      
      * Line widths
      
      * Add doc
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      779c4f86
  27. Jan 04, 2021
    • Bastian Köcher's avatar
      Happy new year (#7814) · e3e651f7
      Bastian Köcher authored
      * Happy new year
      
      Updates the copyright years and fixes wrong license headers.
      
      * Fix the template
      
      * Split HEADER into HEADER-APACHE & HEADER-GPL
      e3e651f7
  28. Dec 30, 2020
  29. Dec 29, 2020
  30. Dec 28, 2020
    • Bastian Köcher's avatar
      Fix base-path handling in `key insert` (#7775) · 05ae24d9
      Bastian Köcher authored
      This fixes the handling of base-path when using `key insert`. Before
      the base-path wasn't setup correctly, as done when starting a node. This
      resulted in putting the keys into the wrong directory. This pr fixes
      this by creating the correct base-path/config dir for the keystore.
      Besides that it also removes the insert command from `subkey` as it
      doesn't make that much sense. If requested, we could bring it back later.
      05ae24d9
  31. Dec 09, 2020
    • Benjamin Kampmann's avatar
      Expand remote keystore interface to allow for hybrid mode (#7628) · 5ce8c333
      Benjamin Kampmann authored
      * update to latest master
      
      * updates on docs, license, meta
      
      * hide ssrs behind feature flag
      
      * implement remaining functions on the server
      
      * sign server line length fix
      
      * fix tests
      
      * fixup in-memory-keystore
      
      * adding failsafe
      
      * skipping ecdsa test for now
      
      * remote keystore param
      
      * remote sign urls made available
      
      * integrating keystore remotes features
      
      * don't forget the dependency
      
      * remove old cruft
      
      * reset local keystore
      
      * applying suggestions
      
      * Switch to single remote, minor grumbles
      
      * minor grumbles, docs
      5ce8c333
  32. Dec 08, 2020
    • Tomasz Drwięga's avatar
      Streamline frame_system weight parametrization (#6629) · 39a776cd
      Tomasz Drwięga authored
      
      
      * Basic weights builder.
      
      * Fixing WiP
      
      * Make the tests work.
      
      * Fix weights in node/runtime.
      
      * WiP.
      
      * Update pallets with new weights parameters.
      
      * Validate returns a Result now.
      
      * Count mandatory weight separately.
      
      * DRY
      
      * BREAKING: Updating state root, because of the left-over weight-tracking stuff
      
      * Update tests affected by Mandatory tracking.
      
      * Fixing tests.
      
      * Fix defaults for simple_max
      
      * Update frame/system/src/weights.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Rework the API a bit.
      
      * Fix compilation & tests.
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Add extra docs & rename few things.
      
      * Fix whitespace in ASCII art.
      
      * Update frame/system/src/limits.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fix max_extrinsic calculations.
      
      * Fix conflicts.
      
      * Fix compilation.
      
      * Fix new code.
      
      * re-remove generic asset
      
      * Fix usage.
      
      * Update state root.
      
      * Update proxy.
      
      * Fix tests.
      
      * Move weights validity to integrity_test
      
      * Remove redundant BlockWeights.
      
      * Add all/non_mandatory comment
      
      * Add test.
      
      * Remove fn block_weights
      
      * Make the macro prettier.
      
      * Fix some docs.
      
      * Make max_total behave more predictabily.
      
      * Add BlockWeights to metadata.
      
      * fix balances test
      
      * Fix utility test.
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      39a776cd
  33. Dec 02, 2020
    • Pierre Krieger's avatar
      Remove sc_network::NetworkService::register_notifications_protocol and... · 610585d1
      Pierre Krieger authored
      Remove sc_network::NetworkService::register_notifications_protocol and partially refactor Grandpa tests (#7646)
      
      * Remove sc_network::NetworkService::register_notifications_protocol
      
      * Missing calls to .into()
      
      * Wrong crate name
      
      * [WIP] Fix Grandpa tests
      
      * One more passing
      
      * One more. Two to go.
      
      * This one was actually already passing 🎉
      
      
      
      * Last one compiles
      
      * Progress
      
      * grandpa: fix voter_persists_its_votes test
      
      * Restore other tests
      
      * Try spawn future later
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      610585d1
  34. Nov 30, 2020