Bastian Köcher
5b8d3607e9
Adds export-state subcommand ( #5842 )
...
* Export state cli
* More work
* Fix tests
* Make it work
* Fix compilation
* Apply suggestions from code review
2020-04-30 15:44:40 +02:00
Nikolay Volf
c09bb1f350
Use mem::take instead of mem::replace where appropriate ( #5846 )
...
* replace replace with take
* Update client/api/src/cht.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/api/src/cht.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-30 12:53:36 +00:00
Bastian Köcher
db2e916904
We should panic on division by zero ( #5844 )
2020-04-30 14:01:48 +02:00
cheme
c05ec630ff
Avoid changing overlay committed layer. ( #5839 )
...
* Avoid changing overlay committed layer.
* basic test
* Add some tx in the test.
* only update from backend value on missing entry in both layer.
deleted entry is replace by empty vec.
* test and review changes
* additional test and review change
* remove test on changing existing value, it does not always panic
depending on existing content
* Update primitives/state-machine/src/overlayed_changes.rs
* Update primitives/state-machine/src/overlayed_changes.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-30 13:59:21 +02:00
Nikolay Volf
a9261cf0ef
use background task to batch for optimum size ( #5832 )
2020-04-30 12:22:52 +02:00
pscott
0f401e4699
Move spawning tasks from thread pools to Service's TaskManager for block importing ( #5647 )
...
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-04-29 18:46:39 +02:00
Wei Tang
521f8ff427
Add support for modules to require inherent to be present ( #5792 )
...
* Add support for modules to require inherent to be present
* Bump node impl version
* Allow is_inherent_required itself to return error
This handles the case if runtime fails to check the inherent data (if the
inherent data is invalid, etc).
* typo: &module -> $module
* fix: iter
2020-04-29 12:05:35 +02:00
Nikolay Volf
986246a102
Replace Condvars with blocking channel ( #5815 )
...
* remove condvars
* return false on lost sender
* fix
* Update primitives/io/src/batch_verifier.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-28 17:54:52 +02:00
Stanislav Tkach
d870eb23e1
Remove sp-runtime dependency from sp-phragmen ( #5786 )
...
* Remove sp-runtime dependency from sp-phragmen
* Use regular derive(Debug) instead of RuntimeDebug
2020-04-28 17:21:10 +02:00
Seun Lanlege
4fa5941f44
Move sc-client into sc-service ( #5502 )
...
* Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api
* move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa
* drop sc-service from sc-rpc
* drop sc-service from sc-consensus-aura
* drop sc-client from manual-seal and babe
* drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli
* drop sc-client from bin/node and bin/node-template
* drop sc-client
* fix tests
* remove check -p sc-client from gitlab.yml
* fix warnings
* fixes ui test
* fix light client tests
* adds associated Client type to AbstractService
* adds UsageProvider to Client
* fixed ui test, again
* tried and failed to get node-cli to compile for wasm
* thanks to tomaka for helping me get node-cli to compile for wasmm
* ui test pls pas 🙏🏾
* all tests passing 🪄
* no_run documentation code
* rm -f documentation code
* ClientProvider
* fix mega trait
* move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client
* adds license to sc-consensus
Co-authored-by: Benjamin Kampmann <ben@parity.io >
2020-04-28 11:59:31 +00:00
Wei Tang
7784bdeffe
Versioned NextConfigDescriptor for BABE ( #5789 )
2020-04-28 11:50:40 +01:00
Kian Paimani
00378d4092
Fix flaky staking test ( #5812 )
...
* Fix flaky staking test
* Better doc
* Update frame/staking/src/tests.rs
Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org >
2020-04-28 12:04:23 +02:00
Arkadiy Paronyan
bf61cece1c
Fixed race in batch signature verification ( #5805 )
2020-04-28 00:10:21 +02:00
Kian Paimani
ee54eff488
Enable Offchain Equalise ( #5683 )
...
* Master.into()
* Remove debug stuff
* Better license
* Migrate away from SimpleDispatchInfo
* Fix test
* Revert "Migrate away from SimpleDispatchInfo"
This reverts commit dbdd27fa19948f16bd17defdc01d3dd32986df11.
* Move to offchain randomness
* Fix tests
* Fix tests more
2020-04-27 18:51:46 +02:00
Nikolay Volf
33d00692d8
Add append api and use it to deposit events ( #5795 )
...
* use append api to deposit events
* use optimized append
* one more optimization
* fix bug
* fix issues
* address review
2020-04-27 18:06:59 +02:00
Arkadiy Paronyan
64ed36d093
Support reference-counting state backend. ( #5769 )
...
* Optimize pinning
* Ref counting state backend
* Style
Co-Authored-By: Wei Tang <hi@that.world >
* Update Cargo.lock
* Handle empty node
Co-authored-by: Wei Tang <hi@that.world >
2020-04-27 12:24:50 +02:00
Xiliang Chen
fbc4e7f055
fix Fixed64 ( #5784 )
...
* fix fixed64
* improve
* bump version
2020-04-26 19:39:16 +02:00
Wei Tang
969720c2ad
babe: secondary blocks with VRF ( #5501 )
...
* babe: secondary blocks with VRF
* Fix node runtime compile
* Fix test-utils runtime interface
* Fix babe tests
* typo: v == 2
* babe: support online configuration upgrades
* Fix rpc tests
* Fix runtime version tests
* Switch to use NextConfigDescriptor instead of changing runtime interface
* Fix tests
* epoch-changes: map function that allows converting with different epoch types
* Add migration script for the epoch config change
* Fix docs for PrimaryAndSecondaryVRFSlots
* Add docs of `SecondaryVRF` in babe crate
* babe-primitives: Secondary -> SecondaryPlain
* babe-client: Secondary -> SecondaryPlain
* Fix migration tests
* test-utils-runtime: Secondary -> SecondaryPlain
* Fix missing name change in test-utils-runtime
* Fix migration: Epoch should be EpochV0
* Update client/consensus/babe/src/lib.rs
Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com >
* Fix new epochChanges version
* Fix babe-primitives naming changes
* Fix merge issues in babe-client
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
Co-authored-by: André Silva <andre.beat@gmail.com >
2020-04-24 16:03:03 +01:00
Bernhard Schuster
72ee7d5797
feat/ocw/bookkeeping ( #5200 )
...
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2020-04-24 16:46:19 +02:00
Wei Tang
770cc24c47
babe: support online configuration upgrades ( #5514 )
...
* babe: support online configuration upgrades
* Switch to use NextConfigDescriptor instead of changing runtime interface
* Fix tests
* epoch-changes: map function that allows converting with different epoch types
* Add migration script for the epoch config change
* Fix migration tests
* Fix migration: Epoch should be EpochV0
* Update client/consensus/babe/src/lib.rs
Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com >
* Fix new epochChanges version
* Fix unused imports
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2020-04-24 14:59:14 +01:00
Nikolay Volf
a01e608dff
rename state-trace to storage ( #5766 )
2020-04-24 15:47:00 +02:00
Benjamin Kampmann
37bbe2a319
Exclude sp-*-fuzzer from release process ( #5749 )
2020-04-24 15:34:22 +02:00
Arkadiy Paronyan
59f13e6e0d
Refactored in-mem backed to use the actual trie ( #5730 )
2020-04-23 19:00:36 +02:00
Dan Forbes
ca3f54b4af
Document crypto key identifiers ( #5750 )
2020-04-23 17:10:13 +01:00
Bastian Köcher
46677555ac
Allow missing functions when checking the new runtime's version ( #5741 )
2020-04-23 14:54:52 +02:00
Nikolay Volf
1a41b88430
Full block import benchmark ( #5745 )
2020-04-23 12:55:57 +02:00
Rakan Alhneiti
25751c0562
Offchain signing ( #5182 )
...
* New approach to offchain signing.
* Use in im-online
* Rewrite to use Account<T>
* DRY signing.
* Implement send_raw_unsigned_transaction
* WiP
* Expunge LocalCall
* Expunge LocalCall
* Fix compilation.
* Solve call.
* Make it compile again.
* Finalize implementation.
* Change CreateTransaction
* Clear CreateTransaction.
* Add price payload
* Send raw transaction
* Submit signed payload / unsigned transaction (WIP)
* Supertrait requirements on T::Signature
* Validate signature of payload on an unsigned transaction
* Fix encoding - part 1
* Make it compile.
* Fix compilation of unsigned validator.
* Pass price payload to the transaction
* Make block number part of the signed payload
* Send signed transaction
* Implement all_accounts, any_account
* Fix formatting
* Implement submit_transaction
* Submit signed transaction (ForAll, ForAny)
* Fix formatting
* Implement CreateSignedTransaction
* Move sign and verify to AppCrypto
* Sign transaction
* Call `use_encoded`
* Remove SubmitAndSignTransaction
* Implement runtime using new SigningTypes
* Adapt offchain example to changes
* Fix im-online pallet
* Quick fix: rename AuthorityId2
* Fix offchain example tests
* Add a comment on why keystore is required in unsigned transaction test
* Use UintAuthorityId instead of u64
* WIP
* Remove IdentifyAccount from UintAuthorityId
* Implement PublicWrapper type
* Fix im-online tests
* Fix runtime test
* Bump spec version
* Fix executor tests
* Rename ImOnlineAuthId -> ImOnlineAuthorityId and formatting
* Fix merge
* Documentation
* Revert u64 -> UintAuthorityId conversion
* Fix string errors
* Document public members in offchain module
* Introduce SubmitTransaction
* Update pallets to use SubmitTransaction
* WIP
* Use SubmitTransaction in offchain
* Use `submit_unsigned_transaction`
* Fix tests
* Update docs
* Remove SigningTypes requirement from `SendTransactionTypes`
* Fix tests
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/example-offchain-worker/src/tests.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/system/src/offchain.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Remove leftover from previous iterations
* Change enum to struct
* Remove public
* Move mock to node/executor/tests
* Cleanup test-helpers
* Make `application-crypto` `std` feature internal
The macros should not generate code that requires that the calling crate
has a feature with the name `std` defined.
* Revert cargo lock update
* Use TestAuthorityId from common
* Restore members of account to public
* Tidy up imports
* Fix benchmarking pallet
* Add tests demonstrating ForAll, ForAny on signer
* Move definition of AppCrypto
in example-offchain-worker
from tests to mod::crypto
* Cleanup stray comment
* Fix ValidTransaction
* Re-fix CreateSignedTransaction
* Address PR feedback
* Add can_sign method to signer
* Propagate error
* Improve documentation
* Fix vec! macro not available
* Document SendTransactiontypes
* Add some docs.
* Split signing examples
* Add tests for signing examples
* WIP can_sign - PR feedback
* WIP
* Split for_any / for_all into different calls
* Verify payload and signature in test
* Fix can_sign implementation
* Fix impl_version
* Import Box from sp_std
* Create issues for TODOs
* Ignore doctest.
* Add test directly to system. Adjust UintTypes.
* Add some tests to account filtering.
* Remove code samples and point to example offchain worker
* Fix doc links
* Fix im-online tests using signatures.
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-04-21 14:55:05 +02:00
Vladimir Komendantskiy
0ce9657db2
added the Polymath subkey ID ( #5705 )
2020-04-20 21:05:45 +02:00
cheme
4ffcf98d8d
Child trie api changes BREAKING ( #4857 )
...
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
2020-04-20 15:21:22 +02:00
Bastian Köcher
1d1caed335
Improve tracing ( #5698 )
...
* Improve tracing implementation
* Enable tracing in runtime interfaces
* Switch to `TRACE` level
2020-04-20 14:37:27 +02:00
Pierre Krieger
bc6ebabf23
Force libp2p 0.18.1 ( #5689 )
2020-04-17 23:00:44 +02:00
Gavin Wood
fd2cb9ca83
Transaction versioning in the RuntimeVersion ( #5582 )
...
* Add transaction_version
* Semantic versioning for runtimes
* Move new field to bottom
* Versioning
* Runtime versioning stuff.
* Fix test
* Adds tests and fixes bugs
* Bump runtime
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-04-17 12:10:31 +02:00
Shawn Tabrizi
276b27a7d4
Add migration for transaction-payment ( #5673 )
2020-04-17 09:56:17 +02:00
Kian Paimani
762c741c55
Clean Phragmén Equlise API ( #5452 )
...
* Clean phragmen API and equalise()
* Stabilize new api
* Fix phragmen fuzzers
* More fixes
* Make fuzzers reproducible
* improvements
* Make equalize update assignments as well.
* total function for staked_assignment.
* Fix fuzzer build
* remvoe TODO
* Fix a bunch more.
* clean stray debug stuff
* Update primitives/phragmen/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
* fix range function
* fix number generator
Co-authored-by: thiolliere <gui.thiolliere@gmail.com >
2020-04-17 09:53:30 +02:00
Nikolay Volf
372f8b2c7e
Batch signature verification ( #5023 )
...
* create parallel tasks extension
* make type system happy
* basic externalities
* test for dynamic extensions
* batching test
* remove premature verify_batch
* shnschnorrkel batch
* alter test
* shnschnorrkel test
* executive batching
* some docs
* also multi/any signatgures
* error propagation
* styling
* make verification extension optional
* experimental ed25519 parallelization
* some merge fallout
* utilize task executor
* merge fallout
* utilize task executor more
* another merge fallout
* feature-gate sp-io
* arrange toml
* fix no-std
* sr25519 batching and refactoring
* add docs
* fix name
* add newline
* fix block import test
* long sr25519 test
* blocking instead of parking
* move everything in crypto
* return batch_verify to check :)
* use condvars
* use multi-threaded executor for benches
* don't call via host interface
* try no spawning
* add true
* cleanup
* straighten batching
* remove signature check from this test (?)
* remove now pointless test
* remove another now useless test
* fix warnings
* Revert "remove another now useless test"
This reverts commit bbdec24bb67ed4373072daef7c863e1a8825bd8b.
* rethink the sp-io-part
* Revert "remove now pointless test"
This reverts commit 4d553066322e65782264caa6053d4cd5538df977.
* fix wording
* add wording
* add todo and fix
* return check and fix
* add logging in sp-io
* Update primitives/io/src/batch_verifier.rs
Co-Authored-By: cheme <emericchevalier.pro@gmail.com >
* address review and use std condvar
* account for early exit
* address reivew
* address review
* more suggestions
* add docs for batch verification
* remove unused
* more review suggestions
* move to sp-runtime
* add expects
* remove blocks
* use entry
* Update primitives/io/src/batch_verifier.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/externalities/src/extensions.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* update overlooked note
* remove stupid return
* Update primitives/io/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/io/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* fix wording
* bump spec_version
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-16 21:40:04 +02:00
Nikolay Volf
36243068bd
update parity-util-mem ( #5668 )
2020-04-16 21:38:04 +02:00
Shawn Tabrizi
980b635c8d
Weights to u64 + Balances Weights ( #5446 )
...
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-04-16 10:43:18 +02:00
Gavin Wood
91af5b6fcc
New database trait ( #5549 )
...
* Introduce trait
* The trait
* Generic
* Basic impls.
* Remove unneeded bounds
* Minor changes
* Switch over to the new DB trait
* Integrated parity-db and added CLI for db selection
* Default impl.
* Fix logs.
* Started integrating subdb
* Apply suggestions from code review
Co-Authored-By: Cecile Tonglet <cecile@parity.io >
* Apply suggestions from code review
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Enable subdb
* Bump parity-db
* Fixed CLI macro
* Fixed browser build
* Fixed features
* Sort out features
* Use parity-db from crates.io
* Typo
Co-authored-by: arkpar <arkady.paronyan@gmail.com >
Co-authored-by: Cecile Tonglet <cecile@parity.io >
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-04-15 14:38:39 +02:00
Benjamin Kampmann
3426d662f7
Switch pre-release version to dev ( #5637 )
2020-04-15 13:18:08 +02:00
Bastian Köcher
b267b1728f
decl_runtime_apis! - check that a method without changed_in exists (#5635 )
...
* `decl_runtime_apis!` - check that a method without `changed_in` exists
This adds another check to the macro that ensures that not only methods
with `changed_in` exists, but there are also the default methods exist.
* Update primitives/api/proc-macro/src/decl_runtime_apis.rs
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Fix test
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-04-15 00:02:14 +02:00
Benjamin Kampmann
51f9bb3c0e
Prepping release of alpha.6 ( #5629 )
...
* bumping version
* cargo update
* adding changelog
2020-04-14 21:41:49 +02:00
Arkadiy Paronyan
5afa74254e
Bump trie-db ( #5627 )
...
* Bump trie-db
* Bumped version in Cargo.toml
2020-04-14 14:46:33 +02:00
Xiliang Chen
d1261d3482
Introduce Fixed128 from ORML to sp_arithmetic ( #5614 )
...
* add fixed128
* fix build
* re-export
* fix test
* saturating_pow
* Update primitives/arithmetic/src/fixed128.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-04-14 10:07:59 +02:00
Bastian Köcher
ec4d8b8bca
Disable wasm-timer in no_std ( #5609 )
2020-04-11 22:31:40 +02:00
Pierre Krieger
ac9a852028
Update to libp2p 0.18 ( #5602 )
...
* Update to libp2p 0.18
* Update Cargo.lock
* Also bump in browser-utils
2020-04-09 18:41:21 +02:00
Bastian Köcher
7cdfaff12b
Add new RPC method to get the chain type ( #5576 )
...
* Add new RPC method to get the chain type
This adds a new RPC method to get the chain type of the running chain.
The chain type needs to be specified in the chain spec. This should make
it easier for tools/UI to display extra information without needing to
rely on parsing the chain name.
* Update client/rpc-api/src/system/mod.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Primitive crate
* Feedback
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2020-04-08 20:41:51 +02:00
Tomasz Drwięga
762bcbab03
Unsigned Validation best practices ( #5563 )
...
* Configurable Unsigned Priority.
* Use the new builder.
* Fix tests.
* Fix benches.
* Remove unused import.
* Rename for_pallet
2020-04-08 11:17:21 +02:00
Alexander Theißen
30ae26074c
Refactor SignedExtension ( #5540 )
...
* Refactor SignedExtension
* Move DispatchInfo Associated type to Dispatchable
* Bound Call: Dispatchable
* Pass PostDispatchInfo to post_dispatch
* Pass DispatchInfo by reference to avoid clones
* Whitespace fix
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Style changes from code review
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Only decalre in test mod to remove warning
* Deduplicate Call definition
* Bound frame_system::trait::Call by Dispatchable
* Introduce DispatchInfoOf type alias
* Whitespace fix from review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-08 11:12:09 +02:00
Roman Borschel
f8c8355ac7
libp2p-next ( #5278 )
...
* Adapt to rust-libp2p#1440.
* Further adapt to libp2p/master.
* Update to libp2p-0.17
* Finishing touches.
* Remove stray TODO.
* Incorporate review feedback.
* Remove unused import.
2020-04-08 09:23:21 +02:00
Bastian Köcher
dcc0a41331
Make application-crypto std feature internal ( #5558 )
...
* Make `application-crypto` `std` feature internal
The macros should not generate code that requires that the calling crate
has a feature with the name `std` defined.
* Use a proper panic!
2020-04-07 19:31:45 +02:00