Skip to content
  1. Jun 29, 2021
  2. Jun 24, 2021
  3. Jun 22, 2021
  4. Jun 20, 2021
  5. Jun 19, 2021
  6. Jun 17, 2021
    • Bastian Köcher's avatar
      Aura: Skip initialize block & remove cache (#9132) · 1278b9a6
      Bastian Köcher authored
      This instructs the Aura runtime api to skip initialize block, when
      requesting the authorities. This is important, as we don't want to use
      the new authorities that should be used from the next block on.
      Besides that, it removes the caching stuff. The cache is not available
      on full nodes anyway. In the future we should store the authorities
      probably in the aux store.
      1278b9a6
  7. Jun 04, 2021
    • André Silva's avatar
      consensus: handle justification sync for blocks authored locally (#8698) · c44b552d
      André Silva authored
      * consensus: add trait to control justification sync process
      
      * network: implement JustificationSyncLink for NetworkService
      
      * slots: handle justification sync in slot worker
      
      * babe: fix slot worker instantiation
      
      * aura: fix slot worker instantiation
      
      * pow: handle justification sync in miner
      
      * babe: fix tests
      
      * aura: fix tests
      
      * node: fix compilation
      
      * node-template: fix compilation
      
      * consensus: rename justification sync link parameter
      
      * aura: fix test compilation
      
      * consensus: slots: move JustificationSyncLink out of on_slot
      c44b552d
  8. Jun 02, 2021
    • Bastian Köcher's avatar
      Transactionpool: Make `ready_at` return earlier (#8995) · 2ab5f9ae
      Bastian Köcher authored
      `ready_at` returns when we have processed the requested block. However,
      on startup we already have processed the best block and there
      are no transactions in the pool on startup anyway. So, we can set `updated_at`
      to the best block on startup.
      
      Besides that `ready_at` now returns early when there are no ready nor
      any future transactions in the pool.
      2ab5f9ae
  9. Jun 01, 2021
  10. May 31, 2021
  11. May 22, 2021
    • Bastian Köcher's avatar
      Aura improvements (#8881) · 4dc8f3a7
      Bastian Köcher authored
      * Aura: Expose function to build the verifier
      
      * Use best block to initialize the authorities cache
      
      * Use best block when determining the slot duration
      
      * Remove `AuraBlockImport`
      
      * Some cleanups
      
      * Fix build error
      4dc8f3a7
  12. May 11, 2021
  13. May 06, 2021
  14. 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
  15. Apr 23, 2021
  16. Apr 19, 2021
  17. Apr 14, 2021
  18. Mar 30, 2021
  19. Mar 27, 2021
  20. 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
  21. Mar 11, 2021
  22. 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
  23. 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
  24. 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
  25. Mar 04, 2021
  26. Mar 03, 2021
  27. Feb 24, 2021
  28. Feb 22, 2021
  29. 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
  30. Feb 18, 2021
  31. Feb 15, 2021
  32. Feb 10, 2021
  33. Feb 04, 2021