Skip to content
  1. May 03, 2021
    • Bastian Köcher's avatar
      Rework inherent data client side (#8526) · 2675741a
      Bastian Köcher authored
      
      
      * Lol
      
      * Yeah
      
      * Moare
      
      * adaasda
      
      * Convert AURA to new pallet macro
      
      * AURA: Switch to `CurrentSlot` instead of `LastTimestamp`
      
      This switches AURA to use `CurrentSlot` instead of `LastTimestamp`.
      
      * Add missing file
      
      * Update frame/aura/src/migrations.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Remove the runtime side provide inherent code
      
      * Use correct weight
      
      * Add TODO
      
      * Remove the Inherent from AURA
      
      * 🤦
      
      
      
      * Remove unused stuff
      
      * Update primitives authorship
      
      * Fix babe inherent data provider
      
      * Fix consensus-uncles
      
      * Fix BABE
      
      * Do some further changes to authorship primitives... :D
      
      * More work
      
      * Make it compile the happy path
      
      * Make it async!
      
      * Take hash
      
      * More stuff
      
      * Hacks
      
      * Revert "Hacks"
      
      This reverts commit cfffad88668cfdebf632a59c4fbfada001ef8251.
      
      * Fix
      
      * Make `execute_block` return the final block header
      
      * Move Aura digest stuff
      
      * Make it possible to disable equivocation checking
      
      * Fix fix fix
      
      * Some refactorings
      
      * Comment
      
      * Fixes fixes fixes
      
      * More cleanups
      
      * Some love
      
      * Better love
      
      * Make slot duration being exposed as `Duration` to the outside
      
      * Some slot info love
      
      * Add `build_aura_worker` utility function
      
      * Copy copy copy
      
      * Some stuff
      
      * Start fixing pow
      
      * Fix pow
      
      * Remove some bounds
      
      * More work
      
      * Make grandpa work
      
      * Make slots use `async_trait`
      
      * Introduce `SharedData`
      
      * Add test and fix bugs
      
      * Switch to `SharedData`
      
      * Make grandpa tests working
      
      * More Babe work
      
      * Make grandpa work
      
      * Introduce `SharedData`
      
      * Add test and fix bugs
      
      * Switch to `SharedData`
      
      * Make grandpa tests working
      
      * More Babe work
      
      * Make it async
      
      * Fix fix
      
      * Use `async_trait` in sc-consensus-slots
      
      This makes the code a little bit easier to read and also expresses that
      there can always only be one call at a time to `on_slot`.
      
      * Make grandpa tests compile
      
      * More Babe tests work
      
      * Fix network test
      
      * Start fixing service test
      
      * Finish service-test
      
      * Fix sc-consensus-aura
      
      * Fix fix fix
      
      * More fixes
      
      * Make everything compile *yeah*
      
      * Make manual-seal compile
      
      * More fixes
      
      * Start fixing Aura
      
      * Fix Aura tests
      
      * Fix Babe tests
      
      * Make everything compile
      
      * Move code around and switch to async_trait
      
      * Fix Babe
      
      * Docs docs docs
      
      * Move to FRAME
      
      * Fix fix fix
      
      * Make everything compile
      
      * Last cleanups
      
      * Fix integration test
      
      * Change slot usage of the timestamp
      
      * We really need to switch to `impl-trait-for-tuples`
      
      * Update primitives/inherents/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update primitives/inherents/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update primitives/inherents/src/lib.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Some extra logging
      
      * Remove dbg!
      
      * Update primitives/consensus/common/src/import_queue/basic_queue.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      2675741a
  2. Apr 23, 2021
  3. Apr 19, 2021
  4. Apr 14, 2021
  5. Mar 30, 2021
  6. Mar 27, 2021
  7. Mar 17, 2021
    • Bastian Köcher's avatar
      Aura and Slots refactoring (#8386) · 15e15e7d
      Bastian Köcher authored
      * Make slot duration being exposed as `Duration` to the outside
      
      * Some slot info love
      
      * Add `build_aura_worker` utility function
      
      * Copy copy copy
      15e15e7d
    • Jon Häggblad's avatar
      Storing multiple Justifications per block (#7640) · 0d6884b9
      Jon Häggblad authored
      
      
      * primitives/runtime: initial changes on supporting multiple Justifications
      
      * primitives/runtime: make Justifications strongly typed
      
      * Encode/decode Justifications
      
      * primitives/runtime: add Justification type
      
      * backend: apply_finality and finalize_block takes a single Justification
      
      * manual-seal: create engine id and let rpc take encoded justification
      
      * backend: skeleton functions for appending justifications
      
      * backend: initial implementation append_justification
      
      Initial implementation of append_justification on the Backend trait, and also remove unused skeleton
      functions for append_justificaton on Finaziler trait.
      k
      
      * backend: guard against duplicate consensus engine id
      
      * client/db: add check for block finality
      
      * client/api: add append_justification to in_mem db
      
      * client/light: add no-op append_justification
      
      * network: fix decode call for Justification
      
      * network: only send a single Justification in BlockData
      
      * network: minor comment update
      
      * protocol: update field names to distinguish single justification
      
      * client: further field renames to plural
      
      * client: update function names to plural justifications
      
      * client/db: upgrade existing database for new format
      
      * network: remove dependency on grandpa crate
      
      * db: fix check for finalized block
      
      * grandpa: check for multiple grandpa justifications hwne importing
      
      * backend: update Finalizer trait to take multiple Justifications
      
      * db: remove debugging statements in migration code
      
      * manual-seal: update note about engine id
      
      * db: fix check for finalized block
      
      * client: update variable name to reflect it is now plural
      
      * grandpa: fix incorrect empty Justications in test
      
      * primitives: make Justifications opaque to avoid being empty
      
      * network: fix detecting empty Justification
      
      * runtime: doc strings for Justifications functions
      
      * runtime: add into_justifications
      
      * primitives: check for duplicates in when adding to Justifications
      
      * network/test: use real grandpa engine id in test
      
      * client: fix reviewer comments
      
      * primitives: rename Justifications::push to append
      
      * backend: revert changes to Finalizer trait
      
      * backend: revert mark_finalized
      
      * backend: revert changes to finalize_block
      
      * backend: revert finalized_blocks
      
      * db: add a quick early return for performance
      
      * client: minor reviewer comments
      
      * service/test: use local ConsensusEngineId
      
      * network: add link to issue for sending multiple Justifications
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      
      * network: tweaks to review suggestions
      
      * network: revert change to BlockData for backwards compatibility
      
      * Apply suggestion from code review
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * primitives: update doc comment for Justifications
      
      * client/db/upgrade: avoid grandpa crate dependency
      
      * consensus: revert to single Justification for import_justification
      
      * primitives: improve justifications docs
      
      * style cleanups
      
      * use and_then
      
      * client: rename JUSTIFICATIONS db column
      
      * network: revert to using FRNK in network-test
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      Co-authored-by: default avatarAndré Silva <[email protected]>
      Co-authored-by: default avatarAndré Silva <[email protected]>
      0d6884b9
  8. Mar 11, 2021
  9. Mar 10, 2021
    • Ashley's avatar
      Return babe configuration information in the babe api epoch functions (#8072) · 7ace5e21
      Ashley authored
      
      
      * Make changes
      
      * Add serialize/deserialize, copy babe epoch config defaults from node runtime
      
      * Fix line widths and turn default features off for serde
      
      * Remove ser/deser from Epoch, fix node-cli
      
      * Apply suggestions
      
      * Add comment to BABE_GENESIS_EPOCH_CONFIG in bin
      
      * Apply suggestions
      
      * Add a sketchy migration function
      
      * Add a migration test
      
      * Check for PendingEpochConfigChange as well
      
      * Make epoch_config in node-cli
      
      * Move updating EpochConfig out of the if
      
      * Fix executor tests
      
      * Calculate weight for add_epoch_configurations
      
      * Fix babe test
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Add more asserts to tests, remove unused changes to primitives/slots
      
      * Allow setting the migration pallet prefix
      
      * Rename to BabePalletPrefix
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      7ace5e21
  10. 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
    • Liu-Cheng Xu's avatar
      Simplify the code a little bit (#8295) · ed7e4853
      Liu-Cheng Xu authored
      ed7e4853
  11. 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
  12. Mar 04, 2021
  13. Mar 03, 2021
  14. Feb 24, 2021
  15. Feb 22, 2021
  16. 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
  17. Feb 18, 2021
  18. Feb 15, 2021
  19. Feb 10, 2021
  20. Feb 04, 2021
  21. Jan 29, 2021
  22. Jan 28, 2021
    • Bastian Köcher's avatar
      Introduce a `Slot` type (#7997) · b6294418
      Bastian Köcher authored
      
      
      * Introduce a `Slot` type
      
      Instead of having some type definition that only was used in half of the
      code or directly using `u64`, this adds a new unit type wrapper `Slot`.
      This makes it especially easy for the outside api to know what type is
      expected/returned.
      
      * Change epoch duratioC
      
      * rename all instances of slot number to slot
      
      * Make the constructor private
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      b6294418
  23. Jan 18, 2021
  24. Jan 12, 2021
  25. Jan 11, 2021
  26. Jan 08, 2021
  27. Jan 06, 2021
    • ordian's avatar
      upgrade a few dependencies (#7831) · 2b48e09b
      ordian authored
      * upgrade a few dependencies
      
      * make it compile at the expense of duplicate deps
      
      * fix web-wasm and a warning
      
      * introduce activate-wasm-bindgen-features crate
      
      * Revert "introduce activate-wasm-bindgen-features crate"
      
      This reverts commit 5a6e41e683f8a4844c0a735dcd08caabb2313f11.
      
      * add getrandom feature to sc-consensus-aura
      2b48e09b
  28. Jan 05, 2021
  29. 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
  30. Dec 28, 2020
  31. Dec 17, 2020
  32. Nov 30, 2020
    • Bernhard Schuster's avatar
      resolve unresolved error nits of #7617 (#7631) · 4ccf6672
      Bernhard Schuster authored
      
      
      * handle executor should_panic test better
      
      * Revert "reduce should panic, due to extended error messages"
      
      This reverts commit c0805940184a62cd9302603ad911c3591e70a60c.
      
      * remove excessive constraints
      
      * remove duplicate documentation messages for error variants
      
      * reduce T: constraints to the abs minimum
      
      * whoops
      
      * fewer bounds again
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      4ccf6672
  33. Nov 27, 2020