* 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
* Adds benchmark for direct/indirect wasm function calls
* Store the benchmark function pointer in a `Cell`
* Add some documentation
* Make function implementations exchangeable
* Add parachain stub
* Add macro for registering the `validate_block` function
* Make all functions replace-able by unimplemented
* Some more refactoring
* Adds tests for executing empty parachain block
* Work on a new test with empty witness data
* Don't exchange `ext_print_*` stuff
* Some cleanup and one more function for `validate_block`
* More tests and more functions
* Fixes after merging master
* Use `parity-codec` `derive` feature
* CHange implementation of `wasm-nice-panic-message`
* Move `parachain` stuff to cumulus
* Updated wasm files
* Integrate feedback
* Switch to `ExchangeableFunction` struct
* More fixes
* Switch to Cell and panic on multiple replaces
* Increase `impl_version`
* Fix shifting
* Make the API more verbose of `ExchangeableFunction`
* Increase `impl_version`
* Clean up session key rotation
* Fix build
* Bump version
* Introduce feature to balances.
* Move staking locking logic over to central point
* ^^^ rest
* First part of assimilation
* More assimilation
* More assimilation
* Fix most tests
* Fix build
* Move Balances to new locking system
* :q!
* Bump runtime version
* Build runtime
* Convenience function
* Test fix.
* Whitespace
* Improve type legibility.
* Fix comment.
* More tests.
* More tests.
* Bump version
* Caps
* Whitespace
* Whitespace
* Remove unneeded function.
* Make use of parity-codec "derive" crate feature
* Bump impl_version
* Update wasm files and Cargo.lock files
* Transferred to parity_codec derive feature for the rest of the crates
* Update wasm binaries and lock files
* Update core and node wasm binaries
* first draft of ristretto crypto module #1685
* adds better comments and code-style
* remove the last evil unwrap
* remove a mistakenly committed lockfile
* add a fresh new lockfile --will probably need a manual merge later
* fix an invalid old test vector
* Wire in ristretto
* Update comment
* Fix use.
* new Signature type api alias to be compatible with substrate
* Add new keyring, fix node executor tests
* Bump version.
* Remove all hashes.
* Update core/primitives/src/sr25519.rs
Co-Authored-By: gavofyork <github@gavwood.com>
* Revert back to Ed25519 (until JS UI is ready)
* Fix test
* Replace unwrap with expect
* Move expect to call sites
* Bubble errors up and trap
* Update wasm
* Update invalid pointer
* Remove test which makes problems in CI
* Check for underflow
* 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
* Link substrate issue tracker in panic
* Replace allocator with freeing-bump allocator
* Revert me: Panic on double allocate/free
* Revert me: Add shallow benchmark for a first impression
* Revert "Revert me: Add shallow benchmark for a first impression"
This reverts commit 5f0d4df39395eb55c9ec2d6fe1ed992533475fec.
* Revert "Revert me: Panic on double allocate/free"
This reverts commit a114df7d6cfc21d60af396ccca02e5c8205db6ce.
* Rename heap to FreeingBumpHeapAllocator
* Rename heap.rs to allocator.rs
* Use sandbox heap
* Move functions
* Move variables into constructor
* Revert "Move variables into constructor"
This reverts commit f46fa0d0cdf4ea97760ccce58003b0d33f433743.
* Remove unnecessary casts
* Add comment for new parameter
* Improve typing
* Move variables into constructor
* Avoid dynamic allocation
* Remove unused variables
* Revert "Link substrate issue tracker in panic"
This reverts commit 32dfa1d02bcf881d1d514a930fcc0fdf3c5f8e08.
In the meantime this was fixed in https://github.com/paritytech/substrate/pull/1667.
* Improve naming
* Only assert in debug mode
* Remove dynamic allocation
* Decrease bucket size
A bucket size of 8192 bytes is quite large and it turned
out that this can exhaust the available heap space too
too quickly.
This is because even for allocating 1 byte a bucket of
8192 bytes is allocated/wasted.
* Return 0 if requested size too large
* Improve test
The test didn't use an offset when setting up the heap.
Hence the first successfully allocated pointer was
always `0`.
This is unfortunate since `0` is also the return value
when there is an error.
This lead to us not noticing that the test was failing,
because it did not distinguish between success and error.
* Revert to linear allocator
Went through the TODOs, removed a bunch, which are outdated or nothing more than a regular comment, documented a bunch more as actual tickets and made them FIXMEs and unified their structure (`FIXME #TICKETNO DESC` for local tickets, `FIXME: DESC LINK` for external tickets) for easier in-editor support. Further more remove unnecessary remarks and related old code that I noticed in that instance.
* Fix warnings in substrate
* More warnings removed and wasm updated
* Fixes error on stable and grumbles
* Update wasm files
* Add links to the github issue for replacing `error-chain`
* Better allocator for wasm (#1460)
* Add Arch Linux installation instructions
* Enable tracing heap size
* Extract heap
* Replace linear allocator with buddy allocator
* Fix test
The purose of this big block is for the tests
to test a failure when the block is too big
though. The improved buddy allocation strategy
results in this block fitting on the heap now.
Hence the increase.
* Get rid of memcpy in to_vec()
* fixup: Style and comments
* fixup: Split Linux instructions by distribution
To prevent misunderstandings of people executing both.
* fixup: Remove unnecessary types and code
* fixup: Make Pointers start from 1, remove some panics, code improvements
* fixup: Return 0 on errors
* fixup: Move loop to separate function
* fixup: Use FnvHashMap instead of HashMap
* fixup: Fix error handling
* fixup: Use current_size() instead of used_size()
* fixup: Fix and document allocation offset
* fixup: Remove unnecessary multiplication
* fixup: Fix comments
* fixup: Remove Arch installation instructions
* Revert "Fix test"
This reverts commit 292c177df8efaa4658293748a13b1ab1c0b76ea8.
* fixup: Remove unused code, improve import
* fixup: Proper alignment
* fixup: Do not use internal constant in public description
* fixup: Add comment regarding invariants
* fixup: Move assertion to compile-time check
* Fix bug in necessary tree level calculation
The tree levels necessary to house a number
of nodes was calculated incorrectly.
* Improve naming
* Add simple benchmark for the runtime api
* Make the executor support native calls
* Some documentation
* Hide behind `feature = "std"`
* Rework the native calls
* Make all tests compile again
* Make every parameter using the Block serialized/deserialized in the native call
* Forward `UnwindSafe` requirement
* Remove debug stuff
* Add some documentation
* Fixes warnings
* Fixes errors after master rebase
* Fixes compilation after master rebase
* Fixes compilation after rebase
* Add Arch Linux installation instructions
* Enable tracing heap size
* Extract heap
* Replace linear allocator with buddy allocator
* Fix test
The purose of this big block is for the tests
to test a failure when the block is too big
though. The improved buddy allocation strategy
results in this block fitting on the heap now.
Hence the increase.
* Get rid of memcpy in to_vec()
* fixup: Style and comments
* fixup: Split Linux instructions by distribution
To prevent misunderstandings of people executing both.
* fixup: Remove unnecessary types and code
* fixup: Make Pointers start from 1, remove some panics, code improvements
* fixup: Return 0 on errors
* fixup: Move loop to separate function
* fixup: Use FnvHashMap instead of HashMap
* fixup: Fix error handling
* fixup: Use current_size() instead of used_size()
* fixup: Fix and document allocation offset
* fixup: Remove unnecessary multiplication
* fixup: Fix comments
* fixup: Remove Arch installation instructions
* Revert "Fix test"
This reverts commit 292c177df8efaa4658293748a13b1ab1c0b76ea8.
* fixup: Remove unused code, improve import
* fixup: Proper alignment
* fixup: Do not use internal constant in public description
* fixup: Add comment regarding invariants
* fixup: Move assertion to compile-time check
* impl Compact<> and HasCompact for Permill Perbill
* update parity-codec to 2.2
* add Cargo.lock
* add lock and build for runtime
* rebuild Cargo.lock after rebase
* Make `decl_runtime_apis!` implement `RuntimeApiInfo` for all runtime
apis
* Make the runtime side generate the info constants as well
* Make `RuntimeApiInfo` implementation use the correct generics
* Adds a test for the runtime api info stuff
* Remove duplicated code by using block from `test-client`
* Adds `compile_fail` tests for `api_version`
* Adds documentation for `api_version`
* Make `impl_runtime_apis!` generate `RUNTIME_API_VERSIONS`
* Update documentation and tests for `RUNTIME_API_VERSIONS`
* Implement `has_api` by using the `RuntimeApiInfo`
* Make `impl_runtime_apis` check that trait identifiers are unique
* Prefix all runtime api function with the corresponding trait
So `execute_block` will be called `Core_execute_block`.
This makes it possible to have traits implement a function with the
same name.
* Rebase master
* Update after master rebase
* docs: Remove safe-mix since is no longer local dependency
* docs: Fix existing packages link. Still only includes Substrate Core
* docs: Remove empty package Readmes. Remove old docs links. Rename to Readme
* docs: Remove link to old docs
* misc: Merge latest from master. Renaem to sr-metadata. Fix list of RustDoc package names
* Rename substrate-metadata to sr-metadata, since it is in the "srml" subdirectory
* Change example to use package name that opens all packages in RustDocs
* Fix list of packages names that are available to open in RustDocs
* fix typo
* fix ordering of CLI options and add missing backslash
* [core/primitives] Update crunchy 0.1 => 0.2
* [core/primitives] Update fixed-hash 0.2 => 0.3.0-beta
* [core/primitives] Update `uint` 0.4 => 0.5.0-beta
* [core/state-machine] Fix errors emerged by fixed-hash update
* [core/state-db] Fix errors that emerged from fixed-hash update
* [core/sr-io] Fix errors that emerged from the fixed-hash update
* [core/trie] Fix errors emerged from fixed-hash updates
* [core/trie] Make use of new Hash::as_fixed_bytes_mut method in tests
* [core/sr-primitives] Fix errors emerged from updating fixed-hash
* [core/executor] Fix errors that emerged from fixed-hash update
* [core/test-runtime] Fix errors that emerged from updating fixed-hash
* [core/test-runtime] Fix an error that emerged from fixed-hash update
* [core/transaction-pool] Fix errors that emerged from updating fixed-hash
* Add From<u64> impl for hash types defined in core/primitives
* [core/client/db] Fix errors that emerged from fixed-hash update
* [core/{client/network/rpc}]: Fix errors emerged by fixed-hash update
* [node/{cli/executor/runtime}]: Fix errors emerged by updating fixed-hash
* [core/network]: Fix bug in parsing constant str
* Update Cargo.lock
- Add crunchy 0.2.1
- fixed-hash 0.2.2 => 0.3.0-beta.3
- Add static-assertions 0.2.5
- uint 0.4.1 => 0.5.0-beta.1
* [core/primitives]: Add fixed-hash/rustc-hex feature for FromStr impl
* [core/primitives] No longer provide From<u64> impl for hash types if byteorder support is not enabled
* [core/primitives] Revert to using From impl again in primitives tests
* [core/..] Fix some bugs that emerged by recent fixed-hash updates
* Update a bunch of Cargo.lock files
* [core/state-db] Re-add whitespace between attr and extern crate/mod
* [core/primitives] Fix bug in From<u64> impl for hash types using the wrong feature guard
* Implement a non generic version of child delta trie
* Use delta_trie_root in state_machine
* Expand InMemory backend to support multi-storage
* Create Consolidate trait
* Fix all crate compile and remove unused OverlayedChanges::drain
* Implement child storage root support and overlay changes
* Add child storage reader
* Add child storage writer
* Implement child storage cleaning
* Fix light backend compile
* Add all required ext functions for wasm executor
* Add ext def to io
* Add all io functions
* Fix nostd compile
* Add simple test
* Remove unnecessary vec copy in child_storage_root_transaction
* Use values_mut/for_each to make it shorter
* Use extend to shorter a for loop
* Move record_all_keys to trie so it's easier to generic them later
* space -> tab
* Remove to_owned in debug format
* Clean out all to_owned
* Break debug_trace to multiple lines
* Remove 0..
* UserError copy/paste typo
* Replace Vec::from_raw_parts by slice::from_raw_parts
* Use iter::empty()
* Wrap some long lines
* Wrap a missing line
* Remove unnecessary map
https://github.com/paritytech/substrate/pull/856#discussion_r226222663
* Call ext_free after from_raw_parts
* Fix tests in other crates
* Try to make everything compact
* Make `Clone` work
* Fix
* Move contracts and balances over to compact encoding
* Session and timestamp are compact
* Sataking uses compact numbers
* Treasury now compact
* Compact Democracy
* Council is compact
* Fix