* Add basic BABE consensus type
* Update core/consensus/babe/slots/Cargo.toml
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Fix parameterization and run `rustfmt`
* Respond to review comments
* Update various Cargo.lock files
* Revert "Update various Cargo.lock files"
This reverts commit af53d7624752a744320e9cbb25749fdd8e6f46d2.
* `BabeSealSignature` → `BabeSeal`
* Move slot code to its own crate
This was highly non-trivial, due to cyclic dependencies.
* Remove redundancy between AuRa and BABE
Some of the code duplication was removed using a macro.
* Fix build error
* Avoid non-`#[doc(hidden)]` re-exports
Also, bump some library versions in `Cargo.toml`.
* Remove dead code in AuRa
* Remove impl_slot macro
It was more trouble than it was worth.
Also, delete useless dependencies on Serde.
* AuRa and BABE need different DB keys
* Bring back `aura::Network`, but deprecate it.
* Improve docs and add `slot_duration` inherent method
* Add docs to `substrate_consensus_aura::SlotDuration`
* Add missing documentation and #![forbid(missing_docs, unsafe_code)]
* Add a #![forbid(missing_docs)]
* Remove dependency of `test-runtime` on `slots`
* Update core/consensus/babe/src/lib.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Remove wrongly added file
* Fix copyright notice
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Bump `impl_version` and `spec_version`
* Fix deprecation version; remove spurious carets
* Update Cargo.lock
* Update dependencies
* no_std trie compile in test_runtime (require to set nightly feature due
to the way hashbrown currently works).
* No nightly with hashmap_core.
* using crate elastic-array
* switch to publish trie crates
* fix default array decl
* bump impl_version for ci
* set all semver when possible wasm, and remove redundant code.
* Actually test use_trie function
* impl version +1
* Bump impl version
* Add a substrate-peerset crate
* Some adjustements
* More adjustements
* Use a temporary libp2p branch
* Add back-off mechanism
* Fix RPC tests
* Some adjustements
* Another libp2p bugfix
* Do a round-robin in the peerset
* Use a real dependency instead of a patch for libp2p
* Initialize reserved nodes correctly
* Better diagnostic for no address
* Don't allocate slots if in reserved only
* Ban node on dial failure
* Fix indentation
* Be a little safer with total issuance.
* PairT instead of _Pair
* Remove rev causing upset
* Remove fees stuff.
* Fix build (including tests)
* Update runtime, bump version
* Fix
* Handle gas refunds properly.
* Rename identifier
ala #2025
* Address grumbles
* New not-quite-linear-typing API
* Slimmer API
* More linear-type test fixes
* Fix tests
* Tidy
* Fix some grumbles
* Keep unchecked functions private
* Remove another less-than-safe currency function and ensure that
contracts module can never create cash.
* Address a few grumbles and fix tests
* first implementation
* remove done comment
* origin done
* impl log for instance
* impl inherent for instance
* Fix wasm build + full example build
this requires parity codec implements codec for core::marker::PhantomData
* patch parity-codec link to github branch
* improve internal names and fix instance prefix
* Fix in macros
* add test modules for support
this allow to test for construct_runtime as well.
The reason to have put that in another crate is:
* if we put test in `tests/` dir of srml/support then decl_storage fails to get
srml-support access because it believes it is inside srml-support
crate and so derive access to `quote!{ crate }` but this is wrong
(and I don't see any way to prevent that, and it only bother us so I
don't think that matters that much)
* if we put test inside lib.rs then contruct_runtime cannot be used
because it call some macros that are defined with macros
(decl_outer_event and decl_outer_origin) and thus rustc complains.
* defaultinstance to its own struct to avoid errors
* enforce <T, I> for Event and Config, impl test
* add origin, log, inherent to test
* test more code generation
* basic storage test
* fix typo
* rename a few imports and field
* delete wip test in example and runtime
* change default prefix to make it backward compatible with test
* rename Instance to I and Instantiable to Instance
note: the name of generic parameter I is only enforce by decl_module!
and this could be rewritten
* doc
* clean old TODOs
* update parity-codec to 3.2
* update node impl version + builds
* fix warning
* fix unrelated grandpa test
* refactor code
* core: implement logic for tracking dag of possible pending changes
* core: move pending justifications dag to its own crate
* core: remove unnecessary clone bounds on dag
* core: request justifications in-order from the dag
* core: dag: rename changes variables to node
* core: dag: allow finalizing blocks not part of dag
* core: dag: track best finalized number
* core: dag: add more tests
* core: sync: clean up pending justifications dag
* core: dag: derive codec decode encode
* core: dag: better error support
* core: dag: add finalization guarded by predicate
* core: grandpa: track multiple authority set changes in dag
* core: dag: add pre-order iterator
* core: grandpa: request justifications on startup
* core: dag: rearrange order of definitions
* core: rename util/dag to util/fork_tree
* core: fork_tree: add docs
* core: fork_tree: add more tests
* core: fork_tree: fix issues found in tests
* core: grandpa: fix authorities tests
* core: grandpa: add docs for is_descendent_of
* core: sync: add docs for PendingJustifications
* core: sync: add test for justification requests across forks
* core: sync: don't resend import or finality notifications in tests
* core: grandpa: add test for importing multiple change blocks
* core: grandpa: fix logic for checking if a block enacts a change
* core: grandpa: fix authorities tests
* Make runtime macros work without required `macro_use`
* Adds node-template
* Adds node-template-release tool
* Fixes building `node-template` and improve the release
* Add `profile.release` by release script to remove warning
* Adds script for releasing the node template
* Fixes compilation after master merge
* Port node-template to edition 2018
* Remove license
* Fixes compilation after master merge
* Add `node-template-release.sh` into the CI
* WIP Ci integrate node template (#1701)
* copy artifacts to s3 bucket latest path
* typo
* bucket name
* Update wasm files
* Temporarily pin trie to #2
* Use generic and delay trait object casting
Rust does not support super-trait upcasting
* Add PlainDB impl for Ephemeral
* Add PlainDB trait alias for completeness
* Use PlainDB for test TrieBackendStorage fetch
We always check overlay first for a storage fetch, which already checked null data. Using PlainDB here makes it work
nicer with other PlainDB overlays.
* Update trie reference
* Use HashDBRef in places when approriate
* Use PlainDBRef in places when approriate
* Update trie crate reference
* Remove unused HashDB::keys
* Patch dependencies
* Fix cargolock
* Update cargo lock again
* Implement new inherent data
* Fixes compilation on wasm
* Fixes after rebase
* Switch back to generate inherent stuff by macro
* Update after rebase
* Apply suggestions from code review
Co-Authored-By: bkchr <bkchr@users.noreply.github.com>
* Fix compilation after rebase
* Address grumbles
* Remove `InherentDataProviders` from `Client`
* Update wasm files after rebase
* Address grumbles
* Fixes compilation after latest merge
* Last fix
* Updates for CC's recent upgrade
- Version bump to 0.9.2
- Runtime version bump to v14
- Avoid misuse of error return type for system_health RPC
* Fix tests
* make offline-reporting infrastructure more generic
* add a listener-trait for watching when the timestamp has been set
* prevent inclusion of empty offline reports
* add test for exclusion
* generate aura-offline reports
* ability to slash many times for being offline "multiple" times
* Logic for punishing validators for missing aura steps
* stub tests
* pave way for verification of timestamp vs slot
* alter aura import queue to wait for timestamp
* check timestamp matches seal
* do inherent check properly
* service compiles
* all tests compile
* test srml-aura logic
* aura tests pass
* everything builds
* some more final tweaks to block authorship for aura
* switch to manual delays before step
* restore substrate-consensus-aura to always std and address grumbles
* update some state roots in executor tests
* node-executor tests pass
* get most tests passing
* address grumbles
* `decl_storage` parsing of the macro (TODO change tool crate structure)
* Start formatting, for now use inner macro.
Still missing optional formating last part (genesis ...).
* Calling extra genesis macro
* decl_storage lines parsing.
* genesis macro as quote (need some cleaning reorg)
* dirty $crate substitute
* proc crate reorg.
* PR impl : skip usage of phantom data, it only applies in test and
council (others required it).
* Remaining macro of decl_storage, warning stringify behave sometime
oddly.
* Formatting code and some cleaning.
* Include line parsing to main struct (cannot use existing macro anymore).
* Remove genesis phantom data when there is already a field with type
parameter.
* Revert wasm files
* Remove old version of `decl_storage`.
* Fix false positive for phantom trait (additional type check on config
build).
* slight changes:
- return token errors instead of panic
- do not use useless intermediate vec
* Update srml/support/procedural/tools/derive/src/lib.rs
remove indent
Co-Authored-By: cheme <emericchevalier.pro@gmail.com>
* Switch iterations to fold, remove unused import.
* Rewrites `impl_runtime_apis!` macro as `proc-macro`
* Adds some documentation
* Require the `impl_runtime_apis` to use a path for accessing the trait
* Make the runtime implement `GetNodeBlockType`
* Moves first chunk of runtime api code into the `impl_runtime_apis` macro
This also renames `ClientWithApi` into `RuntimeApi`.
* Make `impl_runtime_apis` use `runtime` api version automatically
* `decl_runtime_apis` automatically adds `Block: BlockT` as generic parameter
* Remove function generic arguments in block builder api
* Remove some unnused stuff from the `decl_runtime_apis` macro
* Make `InherentData` working again
* Make `impl_runtime_apis!` implement the `RuntimeApi` side as well
* Make it compile again after rebasing with master
* Split `sr-api-macros` into multiple files
* Reimplement `decl_runtime_apis!` as proc_macro
* Use `decl_runtime_apis!` for `Core` as well and improve error reporting
* Adds documentation for `decl_runtime_apis!` and `impl_runtime_apis!`
* Move some code
* Adds compile fail tests
* Adds a test and fixes some bugs
* Make `impl_runtime_apis!` support `_` as parameter name
* Fixes build errors with wasm
* Wasm rebuild after master rebase
* Apply suggestions from code review
Co-Authored-By: bkchr <bkchr@users.noreply.github.com>
* Addresses some grumbles
* Adds test to ensure that method signatures need to match
* New wasm files
* add beginnings of SRML grandpa library
* get srml-grandpa compiling
* tests for srml-grandpa
* add optional session integration to grandpa SRML
* start integration into node runtime
* Allow extracting pending change from header digest
* Make it compile on wasm
* make tests compile again
* Move Authority Key fetching into service, simplify service factory construction
* Generalize Authority Consensus Setup system
* Add Authority Setup Docs
* Allow CLI params to be extensible
- move params to structopts
- split parsing and default command execution
- add custom config to node
- extended parsing of custom config
- extending params via structop's flatten
* Minor fixes on cli extension params:
- added docs
- re-add actual app name, rather than node-name
- make strategy and subcommand optional
* better cli params
* synchronize GRANDPA and normal node authorities
* Implement grandpa::network for gossip consensus
* run_grandpa in Node
* Fix missed merge error
* Integrate grandpa import queue
* more specific type def
* link up linkhalf and import block
* make grandpa future send
* get compiling
* Fix new params convention and license header
* get it running
* rebuild node runtime WASM
* change logging level
* Update node/cli/src/params.rs
Co-Authored-By: rphmeier <rphmeier@gmail.com>
* Update node/cli/src/params.rs
Co-Authored-By: rphmeier <rphmeier@gmail.com>
* Update node/cli/src/lib.rs
Co-Authored-By: rphmeier <rphmeier@gmail.com>
* Update node/runtime/src/lib.rs
Co-Authored-By: rphmeier <rphmeier@gmail.com>
* Update node/cli/src/lib.rs
Co-Authored-By: rphmeier <rphmeier@gmail.com>
* Clean up and Fixme for mutable config
* Move GrandpaService Integration into grandpa, feature gated but on per default
* Fixing grandpa runtime module test
* Update wasm runtime hashes for tests
* GRANDPA: use post-header hash when logging scheduled changes
* add an extra bit of logging to authorities
* fixing missing constrain
* remove old code
* move `NewAuthorities` to an event in srml-grandpa
* fix node-executor tests to use grandpa log
* Remove GossipConsensus from tests, use newly provided sync-feature, fixes tests
* Update to latest wasm runtimes
* address grumbles
* address grumbles
* only derive deserialize when using std
* Clean up use of Deserialize
* Move `initialise_block` into `Core` trait as it is crucial calling the API functions
* Switch to first version of new runtime API implementation
* Fixes bug in tests
* Reenable asserts
* Directly use the `TestAPI` in the tests
* Start improving the api traits
:100644 100644 898aadc7 49217199 M Cargo.lock
:100644 100644 61570436 465ed664 M core/client/src/backend.rs
:100644 100644 5d0c886b 64d710fd M core/client/src/block_builder.rs
:100644 100644 c447855e 5ecbe474 M core/client/src/client.rs
:100644 100644 139cef13 f90dbf3d M core/client/src/error.rs
:100644 100644 2800c503 3298e66a M core/client/src/runtime_api.rs
:100644 100644 affa1c5c 809b08bc M core/primitives/src/lib.rs
:100644 100644 2877dfa9 d5547413 M core/sr-api/Cargo.toml
:100644 100644 9a49784d 6a625a03 M core/sr-api/src/lib.rs
:100644 100644 7c28e1c7 a1a444a9 M core/sr-primitives/src/traits.rs
:100644 100644 2e113ab6 dcc01a6d M srml/metadata/Cargo.toml
:100644 100644 ea722a700809531a M srml/metadata/src/lib.rs
* Refactoring
* Move `sr-api` into client and more refactoring
* Fixes tests
* Some documentation and cleanup
* Fixes compilation after rebase
* More refactoring and more documentation
* Makes `substrate-client` compilable on `wasm`
On `wasm` it basically just exports the runtime api stuff.
* Fixes grumbles
* Updates wasm files after rebasing the master
* Remove TODO comment
* Remove whitespaces
* Fixes after rebasing master
* Another rebase, another fix commit
* Generalize BlockImport
- move ImportBlock, BlockOrigin, ImportResult into shared sr-primitives
- let Consensus provide and traits again
- update consensus traits to latest development
- implement traits on client::Client, test_client::TestClient
- update RHD to use the new import_block API
* Move ImportBlock into consensus-common
* Send import notification in aura tests
* Integrating aura into service
* Make Signatures more generic
* Aura Block Production with the given key
* run aura on the thread pool
* start at exact step start in aura
* Add needed wasm blob, in leiu of better solutions.
* Make API ids consistent with traits and bring upstream for sharing.
* Add decrease_free_balance to Balances module
* Encode `Metadata` once instead of two times
* Bitops include xor
* Upgrade key module.
* Default pages to somewhat bigger.
* Introduce upgrade key into node
* Add `Created` event
* Add Assets module
* Fixes
* Fix
* Update comments
* Support `GenesisConfig` without any fields
Fixes: #923
* Do not generate an empty `GenesisConfig`, instead generate no `GenesisConfig`
* Make the graph generic.
* Adapting pool API for the graph.
* Merge pool & graph.
* Restructure.
* Fix test of transaction pool.
* Get rid of node/transaction-pool.
* Compilation fixes.
* Test7
* Fix compilation of tests.
* Revert runtime changes.
* Add validate_transaction to test-runtime.
* Fix RPC tests.
* Add clearing of the old transactions.
* Trigger pool events.
* Use new queue API.
* Fix wasm build, re-export Hasher.
* No warning if validate transaction fails.
* Get rid of Into<u64> and use As
* Add missing `As` imports.
* Adds new API traits that will be used by the client and runtime
* Switch consensus to new API's
* Switches transaction-pool to new API's
* Move runtime api stuff into its own crate
* Adds `impl_apis!` macro for implementing the new API traits
* Make `metadata` return directly a blob
* Runtime replace `impl_stubs!` with `impl_apis!`
* Switches to none feature based approach for declaring the different API traits
* Fixes compilation error
* Fixes errors
* Make the `decl_apis!` trait usable from the outside
* Make the `test-client` use the new API traits
* Remove last `impl_stubs!` bits and move some of them into wasm executor for tests
* A little bit more documentation
* implement grandpa client
* consensus gossip with arbitrary topics
* defer GRANDPA messages until referenced blocks imported
* set up communication for voter in a transparent way
* instantiate GRANDPA voter
* keep last round state on disk
* switch back to crates.io finality-grandpa
* update cargo.lock
* use new `collect_garbage` API
* update sync test framework and make public
* test that observers can observe
* fix warning
* use more idiomatic predicate for collecting garbage in gossip
* kill spaces
* fix date
* Remove `node-api` from `node-consensus` and `node-transaction-pool`
* Remove the `node-api` crate and its last usages
* Remove left over file
* Fixes compilation errors
* Switch to `As` trait
* Rename trait
* Whitespace
* Move module metadata from json string to custom metadata
* Revisit the metadata structures
1. Move the structures into the metadata crate.
2. Switch to using Cow/MaybeOwnedArray to support Encode/Decode
* Adapt to new metadata structures
* Convert event json metadata to new metadata structures
* Convert storage json metadata to new metadata structures
* Convert runtime metadata from json to new metadata structs
* Implements new metadata structures in client and runtime
* Fixes errors on `no_std`
* Fixes errors after rebasing master
* Do not use `Cow` anymore in metadata
Also replace `String` with our own type definition `StringBuf`.
This fixes compilation on `no_std`.
* Wrap `RuntimeMetadata` in `RuntimeMetadataVersioned` to support versioning
* Move metadata into `srml` and make core unaware of the implementation