* Expose instancing in metadata
- Introduces metadata v7
- If a module is using instancing, the storage exposes the instance in
metadata
- Metadata module name is now the upper case one given to
`construct_runtime!`
* Remove obsolete macro
* Just expose one prefix
* Bump spec
* Fix prefix generation
* Changes for the next libp2p release:
* Updates to the Kademlia APIs.
* Updated imports due to the extracted libp2p-swarm crate.
* ...
Still pending at least the following:
* rust-libp2p/#1189
* rust-libp2p/#1191
* rust-libp2p/#1194
* Use Quorum::One.
The previous choice was apparently arbitrary.
* Use libp2p-0.11 from crates.io. Address feedback.
* Correct imports after merge.
* Add `epoch` field to `SlotInfo`
* Add slot calculations
* More work on epochs in BABE
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Typo: `/` not `%` for division
* Delete useless `LastSlotInEpoch::put(false)`
* Bump `spec_version`
* Make test suite pass again
* Implement BABE epoch randomness signing
* Try to fix compilation
Currently causes a stack overflow in the compiler
* Fix rustc stack overflow
* Add missing `PartialEq` and `Eq` implementations
* Fix compile errors in test suite
* Another silly compile error
* Clone `epoch`
* Fix compile error in benchmarks
* Implement `clone` for `Epoch`
* Merge master
* AUTHORING TEST PASSES!!!
* Fix compilation
* Bump `spec_version`
* Fix compilation
* Fix compilation (again)
* Remove an outdated FIXME
* Fix run.sh and move it to scripts/
* Delete commented-out code
* Fix documentation
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Fix BABE initialization and refactor
* Respond to review
* typo
* Remove useless data in `CheckedHeader::Deferred`
* Remove `slot_number` from Epoch
It is not needed, and only served to waste space and cause confusion.
* Remove epoch from BABE digests
* Move digest.rs to primitives
* Fix incorrect warning names
* Fix compile error
* Consistent field naming for BABE digests
* More compiler error fixex
* Unbound variable
* more compile errors
* another compile error
* Fix compile errors in runtime
* another compile error
* Another compile error
* Fix wasm build
* missing import
* Fix more compile errors
* yet another compile error
* compile fix in test runtime
* Fix and simplify the BABE runtime
The BABE runtime was massively overcomplicated and also wrong. It
assumed it needed to:
1. delay new authorities taking effect until the next epoch
2. not delay emitting `Consensus` digests to mark epoch changes
However, the first is handled by the `srml_session` crate, and the
second is flat-out incorrect: `Consensus` digests take effect
immediately. Furthermore, `srml_babe` tried to duplicate the
functionality of `srml_session::PeriodicSession`, but did it both
clumsily and incorrectly. Fortunately, the new code is simpler and far
more likely to be correct.
* Use `system` to get the test authorities
The genesis block used by tests defines no authorities. Only the test
suite is affected.
* Fix test runtime impl for BabeApi::epoch() with std
* Fix compilation
* Cached authorities are in the form of an epoch
not a `Vec<AuthorityId>`.
* `slots_per_epoch` is not fixed in general
The BABE code previously assumed `slots_per_epoch` to be a constant,
but that assumption is false in general. Furthermore, removing this
assumption also allows a lot of code to go away.
* fix compile error
* Implement epoch checker
* Fix runtime compilation
* fork-tree: add method for finding a node in the tree
* babe: register epoch transitions in fork tree and validate them
* fork-tree: add method for arbitrary pruning
* Expose the queued validator set to SRML modules
BABE needs to know not only what the current validator set is, but also
what the next validator set will be. Expose this to clients of the
session module.
* Bump hex-literal
Hopefully this will fix the panic
* babe: prune epoch change fork tree on finality
* babe: validate epoch index on transition
* babe: persist epoch changes tree
* Fix compile error in tests
* Fix compile error in tests
* Another compile error in tests
* Fix compilation of tests
* core: move grandpa::is_descendent_of to client utils
* babe: use is_descendent_of from client utils
* babe: extract slot_number from pre_digest in import_block
* Move BABE testsuite to its own file
* Initial part of test code
* Missing `WeightMultiplierUpdate` in test-runtime
* bump `spec_version`
* Add a test that a very bogus is rejected
* Run the tests again
* Fix compiler diagnostics
* Bump `spec_version`
* Initial infrastructure for mutation testing
* Mutation testing of block import
* babe: revert epoch changes in case of block import error
* babe: fix logging target
* babe: BabeBlockImport doesn't box inner BlockImport
* babe: fix epoch check in block import
* babe: populate authorities cache on block authorship
* babe: remove unused functions
* babe: use RANDOMNESS_LENGTH const
* babe: remove unneeded config parameters
* core: revert change to hex dependency version
* cleanup gitignore
* babe: add docs to aux_schema
* babe: remove useless drops in tests
* babe: remove annoying macos smart quotes
* fork-tree: docs
* fork-tree: add tests
* babe: style
* babe: rename randomness config variable
* babe: remove randomness helper function
* babe: style fixes
* babe: add docs
* babe: fix tests
* node: bump spec_version
* babe: fix tests
* Make extrinsics extensible.
Also Remove old extrinsic types.
* Rest of mockup. Add tips.
* Fix some build issues
* Runtiem builds :)
* Substrate builds.
* Fix a doc test
* Compact encoding
* Extract out the era logic into an extension
* Weight Check signed extension. (#3115)
* Weight signed extension.
* Revert a bit + test for check era.
* Update Cargo.toml
* Update node/cli/src/factory_impl.rs
* Update node/executor/src/lib.rs
* Update node/executor/src/lib.rs
* Don't use len for weight - use data.
* Operational Transaction; second attempt (#3138)
* working poc added.
* some fixes.
* Update doc.
* Fix all tests + final logic.
* more refactoring.
* nits.
* System block limit in bytes.
* Silent the storage macro warnings.
* More logic more tests.
* Fix import.
* Refactor names.
* Fix build.
* Update srml/balances/src/lib.rs
* Final refactor.
* Bump transaction version
* Fix weight mult test.
* Fix more tests and improve doc.
* Bump.
* Make some tests work again.
* Fix subkey.
* Remove todos + bump.
* Ignore expensive test.
* Bump.
* Introduce network IDs for SS58
* Fix
* Allow numeric overrides.
* Improve docs
* String rather than str
* Comment out code that will become valid after other PR
* Fix
* Fix grammar and typo
* Extend network service
* Extend offchain API
* Support creating unsigned UncheckedExtrinsic
* Introduce srml/im-online
* Bump impl and spec version
* Fix web-wasm test
* Apply suggestions from code review
Remove parity-multiaddr dependency
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
* Replace transmute with from_raw_parts
* Replace PeerId.to_string() with .to_base58()
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
* Update Cargo.lock
* Bump impl and spec version (again)
It was updated in master in the meantime.
* Apply suggestions from code review
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
* Address comments
* Add public function is_online_in_current_session()
* Bump spec_version
* Fix doc tests
* Improve comments
* Remove superfluous line
* Name parameters consistently
* Implement comments
* Switch From to TryFrom
* Use Vec instead of HashSet
* Fix tests
* Revert me: local testing
* Fix check if already sent during session
We gossip each session, hence we need to check
if already sent in this session (not era).
* Fix typos
* Consistent terminology
* Revert "Revert me: local testing"
This reverts commit 73fbc29ff3e5ed71d99436318260b4f007e837f4.
* Introduce IsMember trait
* Implement misc comments
* Remove unused function
* Fix test
* Fix external_addresses being written
* Fix test
* Add necessary trait bound
* Do not increment version
* Update lib.rs
* client: fix panic on decode block number as u32
* client: add test for number_index_key
* client: add another test at client level
* client: address review grumbles
* srml-contracts: Remove hard-coded code hashes from tests.
This makes it easier to update existing and add new test Wasm modules.
* Test maximum contract storage write size.
* Implement storage value limit for contracts.
* Bump node runtime spec version.
* Introduce vesting offsets
Closes#3090
* Fix logic
* Bump impl verfsion
* Initial rewrite of vesting
* Test for liquidity with delayed vesting
* Bump Spec, Fix line width
* More line width fix
* Small nit to documentation
* client: add tests for reorging on diverged finality
* client: mark finalized block as best if diverged from current best chain
* client: update meta on set_head
* core: add docs about SelectChain to finalize_block
* client: improve finality reorg test
* client: LongestChain doesn't return client best block
* client: LongestChain searches canonical chain
Make `NetworkService.{get,put}_value` only take a self reference instead
of a mutable self reference. When retrieving `NetworkService` via
`NetworkWorker`, one only gets an immutable reference.
Instead of passing a context around to each method, thereby introducing
side-effecting I/O actions everywhere, with this PR `sync::ChainSync`
only contains state which is updated by invoking various callback
methods (`on_*`) and actionable items are returned as regular results
from method calls, often iterators yielding requests that should be
issued to peers. It is up to the caller to handle these in an
appropriate way, currently `protocol` will send those as messages.
* Switch the telemetry to new futures
* Line widths
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix Cargo.lock