* Update the nix build configuration.
Remove the old shell.nix with some legacy versions pinned and replace it with a flake-based shell. It installs rust via rustup instead of fenix to be more generally compatible with the guidelines.
This also adds the rust-toolchain.toml spec with all the components required for wasm, and everything else to make rust-analyzer & clippy happy.
* Also add the top level flake for hacking on the substrate as whole
* Remove the envrc and ignore it instead.
* Remove the top-level configuration
---------
Co-authored-by: parity-processbot <>
* Focus on correctness lints. This relies on a compiler patch that landed 8th July 2021.
If people are using an earlier version of the compiler everything will still work unless they try and run clippy.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* A clean new attempt
* Checkpoint to move remote.
* A lot of dependency wiring to make it feature gated.
* bad macro, bad macro.
* Undo the DB mess.
* Update frame/support/src/traits.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* unbreak the build
* Update frame/try-runtime/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Update utils/frame/try-runtime/cli/Cargo.toml
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Update frame/try-runtime/Cargo.toml
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Address most review grumbles.
* Fix build
* Add some comments
* Remove allowing one pallet at a time.
* More grumbles.
* relocate remote-ext
* Fix build
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Handle piping error for commands that output to stdout
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Adding first rough ouline of the repository structure
* Remove old CI stuff
* add title
* formatting fixes
* move node-exits job's script to scripts dir
* Move docs into subdir
* move to bin
* move maintainence scripts, configs and helpers into its own dir
* add .local to ignore
* move core->client
* start up 'test' area
* move test client
* move test runtime
* make test move compile
* Add dependencies rule enforcement.
* Fix indexing.
* Update docs to reflect latest changes
* Moving /srml->/paint
* update docs
* move client/sr-* -> primitives/
* clean old readme
* remove old broken code in rhd
* update lock
* Step 1.
* starting to untangle client
* Fix after merge.
* start splitting out client interfaces
* move children and blockchain interfaces
* Move trie and state-machine to primitives.
* Fix WASM builds.
* fixing broken imports
* more interface moves
* move backend and light to interfaces
* move CallExecutor
* move cli off client
* moving around more interfaces
* re-add consensus crates into the mix
* fix subkey path
* relieve client from executor
* starting to pull out client from grandpa
* move is_decendent_of out of client
* grandpa still depends on client directly
* lemme tests pass
* rename srml->paint
* Make it compile.
* rename interfaces->client-api
* Move keyring to primitives.
* fixup libp2p dep
* fix broken use
* allow dependency enforcement to fail
* move fork-tree
* Moving wasm-builder
* make env
* move build-script-utils
* fixup broken crate depdencies and names
* fix imports for authority discovery
* fix typo
* update cargo.lock
* fixing imports
* Fix paths and add missing crates
* re-add missing crates
* Add `start_aura2`.
* .gitignore patch conflict files
and remove one that accidentally got committed
* Fix build
The tests still don’t work.
* Fix compilation errors
* Fix compile errors (again)
* Try (and fail) to fix tests
* Properly deserialize data
Previously, `DigestItem::Consensus` had no separate `DigestItemType`,
so it did not get properly serialized and deserialized.
* Add extra debug logging. Always allow old seals.
A `RUST_LOG=substrate_aura_consensus cargo test --all -- --nocapture \
tests::authoring_blocks` revealed that old seals were being and
rejected, causing the test to hang. As a temporary debug measure, allow
old seals unconditionally, so that CI can test if this fixes the
problem.
* Forcibly disable rejection of old seals
* Use old trait, but newer serialization
The old trait for `CompatibleDigestItem` actually worked. By changing
its implementation, one can ensure that all *new* seals have the modern
form, but *legacy* seals are still decoded correctly.
* Bump impl version
* Squash spurious deprecation warning
`rustc` should not be emitting a deprecation warning in deprecated
code, but it does, so silence it.
* Rip out unused Cargo feature
* Move AURA to aura_primitives
* Respond to code review
* Wrap overly-long line
* Reduce logging verbosity and add target
* Add dependency on `sr-primitives` to `aura_primitives`
* Fix build
It failed with a message about Cargo.lock being out of date.
* core: aura: rename aura engine id const
* core: aura: remove superfluous logging
* core: primitives: add removed semicolons
* core: aura: remove unused import
* core: network: style fix
* runtime: update wasm blobs
* runtime: bump impl_version
* core: primitives: tag all DigestItemType variants explicitly
* Remove unneeded script
* Rename Substrate Demo -> Substrate
* Rename demo -> node
* Build wasm from last rename.
* Merge ed25519 into substrate-primitives
* Minor tweak
* Rename substrate -> core
* Move substrate-runtime-support to core/runtime/support
* Rename/move substrate-runtime-version
* Move codec up a level
* Rename substrate-codec -> parity-codec
* Move environmental up a level
* Move pwasm-* up to top, ready for removal
* Remove requirement of s-r-support from s-r-primitives
* Move core/runtime/primitives into core/runtime-primitives
* Remove s-r-support dep from s-r-version
* Remove dep of s-r-support from bft
* Remove dep of s-r-support from node/consensus
* Sever all other core deps from s-r-support
* Forgot the no_std directive
* Rename non-SRML modules to sr-* to avoid match clashes
* Move runtime/* to srml/*
* Rename substrate-runtime-* -> srml-*
* Move srml to top-level
* Genric over hasher
* WIP start adding NodeCodec
* Add codec to TrieBackend
* Typechecks
* Fix error type
* Cleanup
* Tests build (and fail)
* Fix tests: don't use MemoryDB::default()
* Lockfile
* Address grumbles
* Teach environmental! about generics
* Add Finder artifacts
* whitespace
* Add a toy impl of Hasher and plug it in to Externalities
* Use `uint` and `fixed-hash` from `parity-common`
Remove unused U512
Add test to ensure H256 impls heapsizeof
* lock file updates
* Make hashes Encodable/Decodable
* lock file updates
* Impl FromIterator for TestExternalities so we can collect() and use map!
* Use rustc-hex from crates
Use rlp from master so dependencies do not mess up the scope
* Fix tests in runtime-io
* lockfile shenanigans
* Add a BlakeHasher impl
* Use BlakeHasher in runtime-io
* lockfile updates
* ws
* Add a Blake2/RLP-flavoured NodeCodec
* Use Blake-flavoured Hasher and NodeCodec
* lockfile
* Implement PartialEq and Default for TestExternalities
* Add note about limitations of environmental!
* Make it compile, but this is probably broken
* Derive Debug so tests in executor can work
* Make executor use BlakeHasher
* ws
* WIP make client generic
* typechecks
* cleanup
* client tests pass
* Fix client/db
* cleanup
* Fix network
* Fix rpc
* Fix service
* Make TestExternalities work better au lieu d'un HashMap
* Fix tests in council
* Fix tests in contract
* Fix tests in council
* Fix democracy
* Add comment about odd-looking reexports in tests
* Don't need to load branch
* Fix staking
* Fix session
* Some polkadot fixes and lockfile
* Fix executive
* fixup lockfile
* Fix polkadot/api
* Fix polkadot/service
* Fix polkadot/runtime tests
* Fix tests in test-runtime
* Test fixes
* Fix missing component in the `std` feature
* Use PhantomData and Result from core
* Fix paths
Use core
* load heapsize on wasm
* implement `HeapSizeOf` for wasm
* Add toy impl of `blake2_256` for no_std
* lockfile
* Use kvdb* from parity-common and fix errors
* rebuilt lockfile
* Add dummy impl of `on_advance_round` for rhododendron::Context
* Fix build after merge
* Add HeapSizeOf bound where needed
* Sort out dependencies for no_std
* Add HeapSizeOf bound where needed
* use temp branch pending PR merges
* Remove unneeded tests
* Lock file and wasm artifacts
* lockfile
* Use magic commit for libp2p
* Cleanup
* Implement blake2_256 for no_std
* Back on parity-common master
* missing type params
* Update Cargo.lock
* whitespace
* Rename concrete Rlp node codec "RlpCodec" and use everywhere
Implement a Keccak-flavoured Rlp NodeCodec and use everywhere
Add a KeccakHasher
* Switch to use KeccakHasher
* Lock file and runtimes
* fixup lockfile
* Fix outstanding issue using concrete types (thanks @gnunicorn)
* Cleanup
* More cleanup
* Comment out Blake2 Hasher
* implement ext_keccak256
* Address todo: FetchChecker is generic
* all tests passing
* Merge remote-tracking branch 'origin/master' into gav-xts-dont-panic
* Update wasm.
* consensus, session and staking all panic-safe.
* Democracy doesn't panic in apply.
* Fix tests.
* Extra helper macro, council depanicked.
* Fix one test.
* Fix up all council tests. No panics!
* Council voting depanicked.
* Dispatch returns result.
* session & staking tests updated
* Fix democracy tests.
* Fix council tests.
* Fix up polkadot parachains in runtime
* Fix borked merge
* More Slicable support
Support general `Option` and array types.
* Basic storage types.
* Existential deposit for contract creation
* Basic implemnetation along with removals
* Fix tests.
* externalities builder fix.
* Tests.
* Fix up the runtime.
* Fix tests.
* Add generic `Address` type.
* Initial function integration of Address into Extrinsic.
* Fix build
* All tests compile.
* Fix (some) tests.
* Fix signing.
* Push error.
* transfer can accept Address
* Make Address generic over AccountIndex
* Fix test
* Make Council use Address for dispatch.
* Fix build
* Bend over backwards to support braindead derive.
* Repot some files.
* Fix tests.
* Fix grumbles
* Remove Default bound
* Fix build for new nightly.
* Make `apply_extrinsic` never panic, return useful Result.
* More merge hell
* Doesn't build, but might do soon
* Serde woes
* get substrate-runtime-staking compiling
* Polkadot builds again!
* Fix all build.
* Fix tests & binaries.
* Reserve some extra initial byte values of address for future format changes
* Make semantic of `ReservedBalance` clear.
* Fix panic handler.
* Integrate other balance transformations into the new model
Fix up staking tests.
* Fix runtime tests.
* Fix panic build.
* Tests for demonstrating interaction between balance types.
* Repot some runtime code
* Fix checkedblock in non-std builds
* Get rid of `DoLookup` phantom.
* Attempt to make transaction_pool work with lookups.
* Remove vscode settings
* New attempt at making transaction pool work.
* It builds again!
* --all builds
* Fix tests.
* New build.
* Test account nonce reset.
* polkadot transaction pool tests/framework.
* Initial draft (working).
* Address grumbles.
* Revert bad `map_or`
* Rebuild binaries, workaround.
* Avoid checking in vscode
* reconnecting, shared, slog
* CLI options for name and telemetry url
* ensure telemetry url imples enabled
* Avoid casting to usize early.
* Provide on-connect event for session message
* Better port
* heartbeat and some renaming
* transaction pool stuff
* minor renaming.
* report telemetry
* cleanups.
* Fix for previous cleanup
* Initial draft (working).
* Avoid checking in vscode
* reconnecting, shared, slog
* CLI options for name and telemetry url
* ensure telemetry url imples enabled
* Provide on-connect event for session message
* Better port
* heartbeat and some renaming
* transaction pool stuff
* minor renaming.
* report telemetry
* cleanups.
* Fix for previous cleanup
* Address grumble
* Final grumble and repot telemetry to substrate
* Fix comment
* Please build, travis...
* Publish wasm binaries
* Update package.json version (npm)
* Copy directly to wasm32-unknown-unknown
* Remove debug repo, enable final location
* Always run through build test
* Update for new direectory structure
* Extra space before >
* Copy from subtrate/executor & subtrate/test-runtime
* Introduce simple blockchain runtime for substrate tests.
* Remove bad files.
* Add needed wasm binaries.
* Refactoring.
- Repot files in test-runtime.
- Rename troublesome `Joiner::join` to `Joiner::and`.
- Rework `Slicable` to dedup code.
* More fixes and refactoring
* Rebuild substrate test wasm.
* Fix merge errors.
* Rename the disasterously named `to_vec` to `encode`.
Also rename `as_slice_then` to `with_encoded`.
* Tests for toy runtime.
* Fix doc nit
* Introduce first groundwork for Wasm executor.
* Remove old Rust-runtime code.
* Avoid commiting compled files.
* Add runtime precompile.
* Rename so module makes more sense.
* Further renaming.
* Ensure tests work.
* Allow bringing in of externalities.
- Add util functions/macros.
- Add uncompacted runtime.
- Add some external crates from pwasm-std for managing allocs/memory
stuff.
* Nice macros for imports.
* Allow passing in of data through allocators.
Make memcpy and malloc work.
Basic allocator.
* Can now pass in bytes to WasmExecutor.
* Additional cleanup.
* Switch usages of `OutData` to `u64`
No need to be able to return bytes anymore.
* convert to safe but extremely verbose type conversion.
@rphmeier any more concise way of doing this?
* Remove StaticExternalities distinction.
* Remove another unused use.
* Refactor wasm utils out
* Remove extraneous copies that weren't really testing anything.
* Try to use wasm 0.15
* Make it work!
* Call-time externalities working.
* Add basic externalities.
* Fix grumbles and note unwraps to be sorted.
* Test storage externality.
Unforunately had to change signatures of externalities to avoid
immutable function returning a reference. Not sure what to do about
this...
* Fix nits.
* Compile collation logic.
* Move back to refs. Yey.
* Remove "object" id for storage access.
* Fix test.
* Fix up rest of tests.
* remove unwrap.
* Expose set/get code in externalities
Also improve tests and add nice wrappers in rust-wasm.
* Add validator set.
* Introduce validator set into externalities and test.
* Add another external function.
* Remove code and validators; use storage for everything.
* Introduce validators function.
* Tests (and a fix) for the validators getter.
* Allow calls into runtime to return data.
* Remove unneeded trace.
* Make runtime printing a bit nicer.
* Create separate runtimes for testing and polkadot.
* Remove commented code.
* Use new path.
* Refactor into shared support module.
* Fix warning.
* Remove unwraps.
* Make macro a little less unhygenic.
* Add wasm files.