* Initial draft that compiles
* Extract payment stuff from balances
* Extract multiplier update stuff from system
* Some fixes.
* Update len-fee as well
* some review comments.
* Remove todo
* bump
* Add an error type to Babe
* Add an error type to PoW
* Simplify error enum variant names
* Update core/consensus/babe/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Add missing newline
* Split up DataProvider into CreateInherents and CheckInherents
* Make `wasmi_execution` public to use it from tests
* Make `WasmRuntime` accessible as well
* Add `call_in_wasm` instead of making stuff public
* Use `WasmRuntime`
* Move test
* More feedback
* split implementation in multiple files:
* transformation -> genesis_config/ getters.rs instance_trait.rs metadata.rs mod.rs store_trait.rs
* mod.rs -> parser.rs
* impl.rs -> storage_struct.rs
* parser is isolated into parse module, it could be improved as well but this can be done in another PR
* modules contains a defintion of decl_storage input which must be ok to work with.
* implementation change:
* T: Trait might be more often bound to 'static (anyway we only use static one and it is needed for metadata current implementation).
* GenesisConfig no longer requires its fields to be Clone (possible since to EncodeLike feature)
* builder for map storages must return precise type Vec<(key, value)>
* Add a Node Role RPC call
* Formatting
* Fix tests
* Change tests to use NodeRole::Authority so I don't forget to update the test
* Improve role checking
* return a vec instead
* fix tests
* Fix#1536: do not require to construct a block for encoding it
* Bump `impl_version`
* Improve `Block::encode_from` signature and rustdoc (from review by @bkchr)
* core: use trait object for genesis constructor
* chain-spec-builder: use structopt
* chain-spec-builder: add new command to generate authority keys
* chain-spec-builder: use ? in main
* chain-spec-builder: fix stored and printed suri from seed
* chain-spec-builder: add comment about created keystore folders
* chain-spec-builder: simplify file write
The macro generates the functions with the signature we expect for wasm
functions. This macro is useful for tests where we need to call into
wasm. Parameter passing is done by SCALE encoding the input and output
parameters.
This function executes the given closure in a context where the test
externalities are set. This makes the srml tests easier to write, as the
test externalities need to be created anyway.
* First working version of all operations.
* New and improved version of everything.
* Minor cleanup.
* Fix build
* Finalize nignum
* Some final works on refactors and tests.
* fix build
* Some review comments
* Bench, better try into and nits
* mutify the API
* rename to big_uint
* unmutify.
* Remove resize
* Apply suggestions from code review
* Update core/sr-primitives/src/sr_arithmetic.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
* BEtter proof
* Fix panic doc.
* Bump.
* Move `Externalities` into `substrate-externalities`
- `Externalities` now support generic extensions
- Split of `primtives-storage` for storage primitive types
* Move the externalities scoping into `substrate-externalities`
* Fix compilation
* Review feedback
* Adds macro for declaring extensions
* Fix benchmarks
* Introduce `ExtensionStore` trait
* Last review comments
* Implement it for `ExtensionStore`
* executor: Move definitions of externals out of wasm_executor module.
* executor: Create WasmRuntime trait.
This will be used to decouple the runtime cache from wasmi execution.
* executor: Remove WasmExecutor and move methods to wasmi_execution.
These will now be crate-internal functions and there is no need
for the struct.
* executor: Set default default_heap_pages in NativeExecutor.
* cli: CLI configuration for Wasm execution method.
* executor: Remove wasmi-specific code from wasm_runtime.
* Respond to review comments.
* Alternative sysvar setup for Windows
The command line setup did not work for me. This adds instructions and images on how to do it through the UI.
* Modified instructions to use Powershell, removed images from PR.
* babe: prune epoch tree when importing a new epoch change
* fork-tree: fix tree pruning
* babe: actually prune epoch change fork tree
* Fix typos
* babe: add test for epoch tree pruning
* fork-tree: fix pruning of stale forks
* consensus-pow: add difficulty data to auxiliary
* Timestamp api
* Implement FinalityProofProvider for ()
* Add DifficultyApi
* Remove assumption that Difficulty is u128
* Use a separate trait for add instead of hard-code it as Saturating
* Some convenience functions to work with PowVerifier
* Try to fix mining unstability
* Fix generic resolution
* Unused best_header variable
* Fix hash calculation
* Remove artificial sleep
* Tweak proposer waiting time
* Revert sleep removal
The reason why it was there is because when mine_loop returns, it means an error
happened. In that case, we'd better sleep for a moment before trying again,
because immediately trying would most likely just fail.
* Pass sync oracle to mining
So that it does not mine when major syncing
* Expose build time as a parameter
Instead of hardcode it as previously 100ms.
* Update lock file
* Fix compile
* Support skipping check_inherents for ancient blocks
For PoW, older blocks are secured by the work, and can mostly be considered to
be finalized. Thus we can save both code complexity and validation time by
skipping checking inherents for them.
* Move difficulty fetch function out of loop
To make things faster
* Remove seed from mining
Each engine can use its own Rng source.
* Better comments
* Add TotalDifficulty definition for U256 and u128
* Update core/consensus/pow/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Rename TotalDifficulty::add -> increment
* Use SelectChain to fetch the best header/hash
* Update lock file