* srml-contracts: Rename ext_scratch_copy to ext_scratch_read.
This is to disambiguate from the next ext_scratch_write function.
* Remove unnecessary OutputBuf and EmptyOutputBuf.
* Replace VmExecError with a result type of custom structs.
* Do not drop the scratch buffer on traps and regular returns.
This just reduces the number of allocations required during nested
contract calls and instantiations.
* Semantics for returning a status code and data from contract calls.
* Remove CallReceipt and InstantiateReceipt.
With forthcoming changes to return data from instantiate calls, the two
types of receipts become very similar to each other and to
ExecReturnValue. Instead, replace them with ExecReturnValue and
a regular 2-tuple in the case of instantiation.
* Modify contract function signatures to allow returning status codes.
* Introduce ext_sandbox_write runtime function.
* Test all the things.
* Bump node runtime spec version.
* Style fixes.
* Scale trait and move to u32 blocknumbers.
* Fixes
* Cleanups
* Update node/runtime/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix up some of the factory stuff.
* Update core/sr-primitives/src/traits.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
* Move Nonce/Index to u32 (#3361)
* Force a non-borked version of upstream crate
* Line lengths and runtime version bump
* Implement `is_validator` for offchain-workers
* Introduce `--no-validator` flag
* Don't run babe/grandpa/im-online when `--no-validator` is given
* Fixes compilation
* Bump spec version
* Improve error handling in executor
* Add missing extern function
* Revert making error public
* Remove `--no-validator` CLI
* Using child storage, (srml-support only), test failing .
* fix simple tests.
* Enumerable by requiring owned struct (previous form only allow
&'static).
Broken tests are from genesis init.
* implement for_child_keys_with_prefix
* indent
* clear_child_prefix fix.
* clear_child_prefix fix 2.
* fix for storage_impl, if/when allowing child and not child this could be
reverted.
* Fix lot of urlinked child genesis, still need to look upon actual
genesis srml module code.
Probably still a lot of broken code needing debugging.
* switch well_known_key to their associated module child trie.
Fix a genesis init (balance).
Complete some testing.
Comment some tests before using.
* fixing test runtime child keys
* latest commit fix broken genesis init
* fix system balances child name.
* Important fix: storage_root from test externalities need children (it is
already the case for ext).
* executive root with child calculation
* Avoid empty trie on test ext.
* Symetric removal of key for system.
* commenting changes related tests.
* Remove child module specifics.
* fix issues.
* fix some formatting
* fix bench and bump runtime
* Remove extend_storage_overlays, assimilate_storage do the same as is
proper considering srml macro.
* Fix warning for assimilate.
* Removing kill as they do not impact any test cases.
* Use tuple of storage map instead of two parameters. This changes the
behavior of decl_storage genesis build closure (breaking api).
* Do not use build storage before assimilate.
* fix error
* Update core/state-machine/src/backend.rs
* Add Call type to extensible transactions.
Cleanup some naming
* Merge Resource and BlockExhausted into just Exhausted
* Fix
* Another fix
* Call
* Some fixes
* Fix srml tests.
* Fix all tests.
* Refactor crypto so each application of it has its own type.
* Introduce new AuthorityProvider API into Aura
This will eventually allow for dynamic determination of authority
keys and avoid having to set them directly on CLI.
* Introduce authority determinator for Babe.
Experiment with modular consensus API.
* Work in progress to introduce KeyTypeId and avoid polluting API
with validator IDs
* Finish up drafting imonline
* Rework offchain workers API.
* Rework API implementation.
* Make it compile for wasm, simplify app_crypto.
* Fix compilation of im-online.
* Fix compilation of im-online.
* Fix more compilation errors.
* Make it compile.
* Fixing tests.
* Rewrite `keystore`
* Fix session tests
* Bring back `TryFrom`'s'
* Fix `srml-grandpa`
* Fix `srml-aura`
* Fix consensus babe
* More fixes
* Make service generate keys from dev_seed
* Build fixes
* Remove offchain tests
* More fixes and cleanups
* Fixes finality grandpa
* Fix `consensus-aura`
* Fix cli
* Fix `node-cli`
* Fix chain_spec builder
* Fix doc tests
* Add authority getter for grandpa.
* Test fix
* Fixes
* Make keystore accessible from the runtime
* Move app crypto to its own crate
* Update `Cargo.lock`
* Make the crypto stuff usable from the runtime
* Adds some runtime crypto tests
* Use last finalized block for grandpa authority
* Fix warning
* Adds `SessionKeys` runtime api
* Remove `FinalityPair` and `ConsensusPair`
* Minor governance tweaks to get it inline with docs.
* Make the governance be up to date with the docs.
* Build fixes.
* Generate the inital session keys
* Failing keystore is a hard error
* Make babe work again
* Fix grandpa
* Fix tests
* Disable `keystore` in consensus critical stuff
* Build fix.
* ImOnline supports multiple authorities at once.
* Update core/application-crypto/src/ed25519.rs
* Merge branch 'master' into gav-in-progress
* Remove unneeded code for now.
* Some `session` testing
* Support querying the public keys
* Cleanup offchain
* Remove warnings
* More cleanup
* Apply suggestions from code review
Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>
* More cleanups
* JSONRPC API for setting keys.
Also, rename traits::KeyStore* -> traits::BareCryptoStore*
* Bad merge
* Fix integration tests
* Fix test build
* Test fix
* Fixes
* Warnings
* Another warning
* Bump version.
* switch to simple codec, trie broken for now
* Actualy use trie_root_noext
* align some hash, failing test on EMCH comment
* Fix trie code over layout instead of hash, revert legacy code for legacy
mainnet ??
* stub behind LayOut
* fix no_std
* temp solution for legacy trie behind feature legacy-key in various crate
* use remote project
* rc client db need prefix
* update trie deps
* bum spec runtime version
* Removing legacy as default.
* Switch mode to non legacy.
* bump runtime version
* Remove legacy trie compatibility features.
* fix warning
* bump version
* change hash on new test.
* Move dependency (#11 trie PR) patched to a parity repo.
Bench reverted to correct hasher.
Some renaming and doc improvments.
* ChildBitmap renaming to BitMap.
* Renaming of LayOut to Layout.
* formatting.
* Removing abreviation such as _ix nb_ or bm.
* Update deps and apply renaming 'Buff' -> 'Buffer'.
* Align to latest trie crates naming changes.
* Update trie dependency.
* Update trie dependency.
* change block_import test hash
* update trie deps (trie use new scale codec but it does not seems to be
an issue).
* update to use latest trie version (no mgmt of multiple radix).
* tabify
* Restoring test to 10 000.
* Use published crate, trie bench is currently down until publishing
(require another pr to update version).
* Update trie-bench.
* babe: don't execute median algorithm
* babe: checked sub in median calculation
* node: bump impl_version to make ci happy
* babe: remove forbid dead_code
The goal of the commit is to be able to retrieve the current set of
authorities without needing to know the concrete consensus mechanism in
place.
In order to achieve the above this commit introduces the
`core/consensus/common/primitives` crate, declaring the `ConsensusApi`
runtime API. In addition it implements the above mentioned trait
definition in `node/runtime` by returning the current authorities of the
BABE consensus mechanism.
* Make local_storage_compare_and_set take Option for old_value
* Adapt srml/im-online to API changes
* Bump version
* Bump version again
* Replace match
* Add test from original bug report
Original is from @pepyakin in 3d7b27f3421818e8d6de568e02fbc2947a06246b.
I adapted it to work with the latest master.
* No longer cleanup module instance
* Replace runtime cache with synchronous clone
* Fix test
* Preserve initial runtime memory and restore it on fetch
* Remove leftover comment
* Fix style
* Improve variable naming
* Replace get_into() with get()
* Handle missing memory export better
* Return earlier when creating runtime first time
* Improve comments
* fmt
* Fix#2967.
* Eradicate `code` from `Error::InvalidCode`
* tidy
* A state snapshot doc.
* Store multiple runtimes by hash.
* Get rid of deref.
* Docs
* Use Self for instantiate_module
* REVERT ME
* Should be ok
* Commit
* Remove dbg
* Use fast-memory's erase
* Clean and undo hacks.
* Introduce a dedicated error for heap_base
* Ban the start function.
* Clean, docs and refactor
* Add rustflags.
* Update Cargo.lock
* Apply Basti's suggestions
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Rename allocates_huge_stack_array
* Extend TestClientBuilder with set_heap_pages
* Update the test.
* Update core/executor/src/wasm_executor.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/executor/src/wasm_runtimes_cache.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/executor/src/error.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/executor/src/error.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix tests.
* Update cargo-lock
* Use wasmi master
* Use master wasmi
* Move tests.
* Use wasmi crates.io
* Update Cargo.lock
* Fix build.rs
* Bump runtime version
* Revert initial_heap_pages renaming
* Bump wasmi up to 0.5.0
* Bump runtime version
* Don't restore an instance every now and then
* Update core/executor/src/wasm_runtimes_cache.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Propagate error in CacheError
* Clarify the get_heap_base call in instantiation
* Supply --export=__heap_base
See https://reviews.llvm.org/D62744
Co-authored-by: Jim Posen <jim.posen@gmail.com>
* Bump version.
* Use combinators for segments.
* Fix build.rs
* Fix build.rs for runtime-test
* 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.
* First draft of annotating weights.
* Refactor weight to u64.
* More refactoring and tests.
* New convert for weight to fee
* more tests.
* remove merge redundancy.
* Fix system test.
* Bring back subkey stuff.
* a few stress tests.
* fix some of the grumbles.
* Final nits.
* Update srml/system/src/lib.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Scale weights by 1000.
* Bump.
* Fix decl_storage test.
* babe: add babe module trait
* babe: track current slot and epoch start slot
* babe: implement ShouldEndSession based on epochs
* babe: rename weight type to avoid ambiguities
* babe: expose epoch start slot in Epoch digest
* babe: use epoch start for validating epoch transitions
* babe: make the epoch duration a parameter type
* babe: remove unused fields from config
* node: update runtime to use babe instead of aura
* node: use babe instead of aura
* core: generate sr25519 keys from seed and add to keystore
* core: remove AuthorityKeyring
* node: remove unused primitive types related to babe crypto
* uniform babe primitives crate import name
* wrap long lines
* babe: fix find_epoch_digest
* fork-tree: fix find_node_where
* node: set babe epoch duration to "10 minutes"
* babe: cleanup import key cache if authorities don't change
* node: make integration test compile (but fail)
* node: bump spec_version
* node: fix import
* babe: don't use constants in storage fields array sizes
* babe: account for first epoch slot way in the past
* babe: signal next epoch change (not current)
* babe: calculate next epoch randomness with next epoch index
* babe: track next epoch in node
* babe: cache current epoch and authorities separately
* babe: generate valid babe vrf proofs in integration test
* babe: cleanup claim_slot
* babe: perform threshold calculation according to spec
* babe: compute relative weight in threshold
* babe: more precise threshold calculation
* babe: use floats for threshold exponent calculation
* babe: update constant c
* 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
* 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.
* 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
* 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.