1. 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
    • Gavin Wood's avatar
      Introduce IgnoredIssuance into Gilts (#8299) · a4921069
      Gavin Wood authored
      * IgnoredIssuance
      
      * Fixes
      
      * Fixes
      a4921069
    • Gavin Wood's avatar
      Assets: Remove zombies, introduce approvals (#8220) · 643a0ecd
      Gavin Wood authored
      
      
      * Initial work
      
      * Tests for frame system
      
      * Self-sufficient account ref-counting
      
      * Fixes
      
      * Benchmarks building.
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarJaco Greeff <[email protected]>
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * Test approvals
      
      * Fixes
      
      * Report assets pallet tests
      
      * Tests for approvals & force_cancel_approval
      
      * Use structs rather than tuples for approval data
      
      * Add force_asset_status, force_set_metadata
      
      * Add clear_metadata.
      
      * approval benchmarks
      
      * force_asset_status benchmarks
      
      * final benchmarks
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Docs for new approval dispatches.
      
      * Docs for pallet.
      
      * Remove accidental code.
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Fixes
      
      * Update frame/assets/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Grumbles.
      
      * Transfer zero works, use DispatchResult
      
      * fix test
      
      * Remove force_destroy
      
      * Remove TODO
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * transfer_keep_alive
      
      * Fixes
      
      * Fixes
      
      * Fixes
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      Co-authored-by: default avatarJaco Greeff <[email protected]>
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      643a0ecd
  2. 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
  3. Mar 05, 2021
  4. Mar 03, 2021
  5. Mar 01, 2021
    • Bastian Köcher's avatar
      Init `RuntimeLogger` automatically for each runtime api call (#8128) · 68390d40
      Bastian Köcher authored
      
      
      * Init `RuntimeLogger` automatically for each runtime api call
      
      This pr change the runtime api in such a way to always and automatically
      enable the `RuntimeLogger`. This enables the user to use `log` or
      `tracing` from inside the runtime to create log messages. As logging
      introduces some extra code and especially increases the size of the wasm
      blob. It is advised to disable all logging completely with
      `sp-api/disable-logging` when doing the wasm builds for the on-chain
      wasm runtime.
      
      Besides these changes, the pr also brings most of the logging found in
      frame to the same format "runtime::*".
      
      * Update frame/im-online/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Update test-utils/runtime/Cargo.toml
      
      * Fix test
      
      * Don't use tracing in the runtime, as we don't support it :D
      
      * Fixes
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      68390d40
  6. Feb 27, 2021
    • Gavin Wood's avatar
      Gilts Pallet (#8139) · ed365da8
      Gavin Wood authored
      
      
      * Initial draft
      
      * Enlarge function drafted.
      
      * Thaw draft
      
      * Retract_bid draft
      
      * Final bits of draft impl.
      
      * Test mockup
      
      * Tests
      
      * Docs
      
      * Add benchmark scaffold
      
      * Integrate weights
      
      * All benchmarks done
      
      * Missing file
      
      * Remove stale comments
      
      * Fixes
      
      * Fixes
      
      * Allow for priority queuing.
      
      * Another test and a fix
      
      * Fixes
      
      * Fixes
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_gilt --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/gilt/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Grumble
      
      * Update frame/gilt/src/tests.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/gilt/src/tests.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Grumble
      
      * Update frame/gilt/src/tests.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/gilt/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/gilt/src/lib.rs
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      
      * Fix unreserve ordering
      
      * Grumble
      
      * Fixes
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      ed365da8
  7. Feb 26, 2021
  8. Feb 25, 2021
  9. Feb 24, 2021
  10. Feb 23, 2021
    • Kian Paimani's avatar
      Decouple Staking and Election - Part 2 Unsigned Phase (#7909) · 7205eea4
      Kian Paimani authored
      
      
      * Base features and traits.
      
      * pallet and unsigned phase
      
      * Undo bad formattings.
      
      * some formatting cleanup.
      
      * Small self-cleanup.
      
      * Make it all build
      
      * self-review
      
      * Some doc tests.
      
      * Some changes from other PR
      
      * Fix session test
      
      * Update Cargo.lock
      
      * Update frame/election-provider-multi-phase/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Some review comments
      
      * Rename + make encode/decode
      
      * Do an assert as well, just in case.
      
      * Fix build
      
      * Update frame/election-provider-multi-phase/src/unsigned.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Las comment
      
      * fix staking fuzzer.
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Add one last layer of feasibility check as well.
      
      * Last fixes to benchmarks
      
      * Some more docs.
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Some nits
      
      * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
      
      * Fix doc
      
      * Mkae ci green
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      7205eea4
  11. Feb 22, 2021
  12. Feb 19, 2021
  13. Feb 18, 2021
  14. 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
  15. Feb 16, 2021
  16. Feb 15, 2021
  17. Feb 12, 2021
  18. Feb 10, 2021
    • Benjamin Kampmann's avatar
      Releasing 3.0 (#8098) · 6a964c5d
      Benjamin Kampmann authored
      * bumping version for next release
      * add changelog
      * add guide
      6a964c5d
    • André Silva's avatar
      babe, grandpa: set longevity for equivocation report transactions (#8076) · c763df4b
      André Silva authored
      * babe: set longevity for equivocation report transactions
      
      * grandpa: set longevity for equivocation report transaction
      
      * babe, grandpa: fix tests
      
      * node: add ReportLongevity to babe and grandpa modules
      
      * node: bump spec_version
      c763df4b
    • Andrew Jones's avatar
      Migrate pallet-balances to pallet attribute macro (#7936) · 8481e9a3
      Andrew Jones authored
      
      
      * Initial migration of balances pallet
      
      * Fix some errors
      
      * Remove unused imports
      
      * Formatting and removing some todos
      
      * Delete Subtrait
      
      * Add genesis builder impls for tests
      
      * Fix GenesisConfig impl
      
      * Make set_balance visible to tests, rename RawEvent to Event
      
      * Fix tests with Event rename etc.
      
      * More test RawEvent renames
      
      * Even more RawEvent renames
      
      * Rename module to pallet in comments
      
      * Add PalletInfo impl to avid storage collision, fixes tests
      
      * Apply review suggestion: remove trailing a
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * BalancesEvent alias
      
      * Remove BalancesEvent alias
      
      * Review suggestion: remove redundant comment
      
      * Apply review suggestion: make vis super
      
      * Fis doc links
      
      * Add RawEvent alias
      
      * Add missing Instance parameter to deprecated RawEvent alias
      
      * Fix RawEvent deprecation warnings
      
      Co-authored-by: default avatarDavid <[email protected]>
      8481e9a3
  19. Feb 05, 2021
    • Alexander Theißen's avatar
      contracts: Remove ConfigCache (#8047) · 1b31f7c5
      Alexander Theißen authored
      
      
      * contracts: Remove ConfigCache
      
      * 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
      
      * Fixup test
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      1b31f7c5
  20. Feb 04, 2021
  21. Feb 02, 2021
    • Liu-Cheng Xu's avatar
      Decouple the session validators from im-online (#7127) · 9904267e
      Liu-Cheng Xu authored
      * Decouple the session validators from im-online
      
      * .
      
      * Add SessionInterface trait in im-online
      
      Add ValidatorId in im-online Trait
      
      Make im-online compile
      
      Make substrate binary compile
      
      * Fix merging issue
      
      * Make all compile
      
      * Fix tests
      
      * Avoid using frame dep in primitives via pallet-session-common
      
      * Merge ValidatorSet into SessionInterface trait
      
      Wrap a few too long lines
      
      Add some docs
      
      * Move pallet-sesion-common into pallet-session
      
      * Move SessionInterface to sp-session and impl it in session pallet
      
      Ref https://github.com/paritytech/substrate/pull/7127#discussion_r494892472
      
      
      
      * Split put historical::FullValidatorIdentification trait
      
      * Fix line width
      
      * Fix staking mock
      
      * Fix session doc test
      
      * Simplify <T as ValidatorIdentification<AccountId>>::ValidatorId as ValidatorId<T>
      
      * Nits
      
      * Clean up.
      
      * Make it compile by commenting out report_offence_im_online bench
      
      * Tests
      
      * Nits
      
      * Move OneSessionHandler to sp-session
      
      * Fix tests
      
      * Add some docs
      
      * .
      
      * Fix typo
      
      * Rename to ValidatorSet::session_index()
      
      * Add some more docs
      
      * .
      
      * Remove extra empty line
      
      * Fix line width check
      
      .
      
      * Apply suggestions from code review
      
      * Cleaup Cargo.toml
      
      * Aura has migrated to Pallet now
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      9904267e
    • Pierre Krieger's avatar