Commit Graph

511 Commits

Author SHA1 Message Date
Jim Posen 974b341b14 srml-contracts: Apply contract removals immediately (#3417)
* Add ability to destroy a contract in the overlay.

* Don't allow contracts to be destroyed in recursive execution.

* Tests for contract self-destruction.

* Don't allow constructor to exit with insufficient balance.

* Remove dead code.

* Bump node runtime spec version.
2019-08-21 16:44:27 +02:00
Robert Habermeier 320fb38a2f pay out slashes to the treasury (#3446) 2019-08-20 20:32:14 +02:00
Max Inden 2c0e73b78c srml/authority-discovery: Introduce srml module to sign and verify (#3385)
In order to have authorities (validators) discover each other, they need
to publish their public addresses by their ip address on the Kademlia
Dht indexed by their public key. This payload needs to be signed by a
key identifying them as a valid authority.

Code inside `/core` does not know the current set of authorities nor
can it assume what kind of cryptography primitives are currently in use.
Instead it can retrieve its public key and the current set of
authorities from the runtime and have it sign and verify Dht payloads.

This commit enables code in `/core` to do so by introducing a srml
module and runtime api to:

1. Retrieve own public key.

2. Retrieve public keys of current authority set.

3. Sign a Dht payload.

4. Verify a Dht payload.

This commit makes the logic from the previous commit
(`core/consensus/common/primitives.ConsensusApi`)
cf80af9255 obsolete and thus removes it.
2019-08-20 17:39:14 +02:00
Tomasz Drwięga 56296386ab Custom RPC implementation for node. (#3109)
* Allow RPCs to be customized.

* Implement node-rpc extensions.

* Working on a test.

* Add node-testing crate.

* Fix genesis test config

* Fix nonce lookups.

* Clean up.

* Fix expected block type.

* Make the RPC extension function optional.

* Fix service doc test.

* Bump jsonrpc.

* Bump client version.

* Update Cargo.lock

* Update jsonrpc.

* Fix build.

* Remove unused imports.

* Fix signed extra.

* Post merge clean up.

* Fix tests.

* Patch hashmap-core.

* Fix build.

* Fix build.

* Remove hashmap_core patches.
2019-08-20 11:06:35 +02:00
cheme 95abffc8e4 Update trie crate to hashbrown usage. (#3440)
* Update trie crate to non hashmap_core one.

* bump runtime impl.
2019-08-19 15:59:36 +02:00
Bastian Köcher 3b0af8bbf4 Do not call externalities without Ext being set (#3436)
* Do not call externalities without `Ext` being set

* Fix compare and set

* Bump runtime version.

* Bump hashmap_core
2019-08-19 12:52:39 +02:00
Michael Müller 017752df41 Introduce srml/scored-pool (#3381)
* Introduce srml/scored-pool

* Bump impl_version

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove unnecessary pub use

* Remove unnecessary import

* Adapt to InitializeMembers

* Bump impl_version

* Implement remarks (shortens code)

* Improve complexity of score()

Search and remove and search again for the
new spot and insert then => O(2LogN).

* Get rid of a clone()

* Reduce complexity of issue_candidacy()

* Add CandidateScored event + Improve comments

* Fix naming

* Use Lookup instead of AccountId as param

* Use set_members_sorted instead of computing diff

* Remove function which is only used during genesis

* Get rid of rev() by changing sort order of Pool

* Rename issue_candidacy to submit_candidacy

* Shorten code

* Remove find_in_pool() and have transactor submit index

* Remove unnecessary dependency

* Improve error messages

* Improve naming

* Improve comments

* Make code clearer wrt which receiver to invoke

* Adapt to new system trait

* Refactor to request CandidateDeposit only once

* Refactor to request Pool only once

* Improve structure and comments
2019-08-19 09:26:21 +02:00
Gautam Dhameja 0bb44f5024 Make node-template in sync with node. (#3422)
* Make node-template in sync with node.

* Update service.rs

* Updated babe constants.

* Added SignedExtra for CheckVersion in node-template and subkey.

* Added CheckVersion SignedExtra for node.

* Fixed tests.

* Try fix integration test.

* Attempt 2 at fixing integration test.

* Update node-template/runtime/src/lib.rs
2019-08-19 09:17:33 +02:00
Gavin Wood 6c5fbe64ca Signed transactions now have affinity with runtime versions (#3430)
* Signed transactions now has affinity with runtime versions

* Bump runtime version
2019-08-18 18:01:05 +02:00
Kian Paimani 0e56b56a86 Proper loser handling in approval election. (#3392)
* Fix how we treat loser candidates.

* Bump.

* Improve doc.

* Update srml/elections/src/lib.rs

* Fix test
2019-08-17 22:43:21 +02:00
Tomasz Drwięga 6cc4495700 Offences reporting and slashing (#3322)
* Remove offline slashing logic from staking.

* Initial version of reworked offence module, can report offences

* Clean up staking example.

* Commit SlashingOffence

* Force new era on slash.

* Add offenders in the SlashingOffence trait.

* Introduce the ReportOffence trait.

* Rename `Offence`.

* Add on_before_session_ending handler.

* Move offence related stuff under sr-primitives.

* Fix cargo check.

* Import new im-online implementation.

* Adding validator count to historical session storage as it's needed for slash calculations

* Add a comment about offence.

* Add BabeEquivocationOffence

* GrandpaEquivocationOffence

* slash_fraction and fix

* current_era_start_session_index

* UnresponsivnessOffence

* Finalise OnOffenceHandler traits, and stub impl for staking.

* slash_fraction doesn't really need &self

* Note that offenders count is greater than 0

* Add a test to ensure that I got the math right

* Use FullIdentification in offences.

* Use FullIndentification.

* Hook up the offences module.

* Report unresponsive validators

* Make sure eras have the same length.

* Slashing and rewards.

* Fix compilation.

* Distribute rewards.

* Supply validators_count

* Use identificationTuple in Unresponsivness report

* Fix merge.

* Make sure we don't slash if amount is zero.

* We don't return an error from report_offence anymo

* We actually can use vec!

* Prevent division by zero if the reporters is empty

* offence_forces_new_era/nominators_also_get_slashed

* advance_session

* Fix tests.

* Update srml/staking/src/lib.rs

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

* slashing_performed_according_exposure

* Check that reporters receive their slice.

* Small clean-up.

* invulnerables_are_not_slashed

* Minor clean ups.

* Improve docs.

* dont_slash_if_fraction_is_zero

* Remove session dependency from offences.

* Introduce sr-staking-primitives

* Move offence under sr_staking_primitives

* rename session_index

* Resolves todos re using SessionIndex

* Fix staking tests.

* Properly scale denominator.

* Fix UnresponsivnessOffence

* Fix compilation.

* Tests for offences.

* Clean offences tests.

* Fix staking doc test.

* Bump spec version

* Fix aura tests.

* Fix node_executor

* Deposit an event on offence.

* Fix compilation of node-runtime

* Remove aura slashing logic.

* Remove HandleReport

* Update docs for timeslot.

* rename with_on_offence_fractions

* Add should_properly_count_offences

* Replace ValidatorIdByIndex with CurrentElectedSet

ValidatorIdByIndex was querying the current_elected set in each call, doing loading (even though its from cache), deserializing and cloning of element.

Instead of this it is more efficient to use `CurrentElectedSet`. As a small bonus, the invariant became a little bit easier: now we just rely on the fact that `keys` and `current_elected` set are of the same length rather than relying on the fact that `validator_id_by_index` would work similar to `<[T]>::get`.

* Clarify babe equivocation

* Fix offences.

* Rename validators_count to validator_set_count

* Fix squaring.

* Update core/sr-staking-primitives/src/offence.rs

Co-Authored-By: Gavin Wood <gavin@parity.io>

* Docs for CurrentElectedSet.

* Don't punish only invulnerables

* Use `get/insert` instead of `mutate`.

* Fix compilation

* Update core/sr-staking-primitives/src/offence.rs

Co-Authored-By: Gavin Wood <gavin@parity.io>

* Update srml/offences/src/lib.rs

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

* Update srml/im-online/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/im-online/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/im-online/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/babe/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update core/sr-staking-primitives/src/offence.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update core/sr-staking-primitives/src/offence.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update core/sr-staking-primitives/src/offence.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update core/sr-staking-primitives/src/offence.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Update core/sr-staking-primitives/src/offence.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Add aura todo.

* Allow multiple reports for single offence report.

* Fix slash_fraction calculation.

* Fix typos.

* Fix compilation and tests.

* Fix staking tests.

* Update srml/im-online/src/lib.rs

Co-Authored-By: Logan Saether <x@logansaether.com>

* Fix doc on time_slot

* Allow slashing only on current era (#3411)

* only slash in current era

* prune journal for last era

* comment own_slash

* emit an event when old slashing events are discarded

* Pave the way for pruning

* Address issues.

* Try to refactor collect_offence_reports

* Other fixes.

* More fixes.
2019-08-16 19:54:50 +02:00
André Silva 99f3f07690 node: update flaming fir (#3424)
* node: update staging testnet authorities

* node: update flaming fir chain spec
2019-08-16 19:09:18 +02:00
André Silva fc392896dc node: update flaming fir chain spec (#3423) 2019-08-16 16:23:46 +02:00
André Silva cb7527d2b2 babe: Introduce secondary slots (Aurababeous) (#3380)
* babe: initial implementation of secondary slots

* babe: validate secondary slot author

* babe: implement weight based fork choice

* babe: remove unused

* aura: cleanup unused imports

* babe: pass in parent weight when authoring and verifying

* babe: use epoch randomness for picking secondary slot authors

* babe: fix tests

* babe: fix wasm build

* babe: node-side code for disabling secondary slots

* babe: allow enabling/disabling secondary slots from runtime

* babe: fix test

* babe: use blake2_256 for secondary slot assignment

* babe: run block initialization in should_end_session

* node: increase slot duration to 6s

* babe: add docs

* node: bump spec_version

* Apply suggestions from code review

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* babe: simplify secondary slot assignment calculation

* babe: remove unnecessary comment

* node: bump spec_version

* babe: fix bad merge
2019-08-16 15:47:53 +02:00
Tomasz Drwięga 42fb0c7cad Verify signature and session index during apply phase of im-online. (#3418)
* Verify signature and session index during apply phase of im-online.

* Bump impl_version.

* Add docs to SignedExtension
2019-08-16 12:59:02 +02:00
Svyatoslav Nikolsky 3825a21bac Fix light client synchronization on master (#3301)
* value ranges in consensus cache

* skip values in cache

* read epoch0 + epoch1 data from genesis in babe

* sync authorities + session validators at genesis

* removed some debug printlns

* fixed cache encoding

* Revert "skip values in cache"

This reverts commit ce451c32823aaa4b67d99ca5b58f1bf3984df4db.

* Revert "value ranges in consensus cache"

This reverts commit 9062f9434cddd14a01275ddbfcd904b04282e63b.

* get rid of cache::AUTHORITIES in Babe

* cleaning up

* cleaning up

* update spec version

* lost changes

* fixed tests

* Update node/runtime/src/lib.rs

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* fix once-per-block condition

* fix standalone babe + temp_storage in BuildGenesis

* fix benhes compilation

* fixed comment

* re-added light nodes to integration tests

* finalize_with_ancestors from extra_requests

* post-merge fix

* aaand removed debug code

* (another one)

* fix warn in logs (do not call ForkTree::finalize twice for the same block)

* sync digest.next_authorities with actual next authorities

* more docs

* reverting all commits affecting storage

* also remove keys from babe trait

* fixed warnings

* post-merge fixes

* reverted some redundant changes

* reverted more changes
2019-08-16 11:51:49 +02:00
André Silva d1dde7e087 session: add handler for genesis session (#3413)
* session: add handler for genesis session

* node: bump spec version

* aura: handle on_genesis_session

* srml: make sure we don't re-initialize genesis authorities

* session: fix mock

* node: remove genesis authorities from chain spec

* staking: fix mock

* srml: don't initialize genesis authorities twice

* aura: don't reinitialize genesis authorities

* aura: fix runtime_io dependency

* Bump runtime
2019-08-16 11:24:06 +03:00
André Silva 3590c9c33f im-online: use new session keys (not upcoming session) (#3414)
* im-online: use new session keys (not upcoming session)

* node: bump spec_version

* im-online: rename on_new_session queued validator set parameter
2019-08-16 09:58:38 +02:00
Robert Habermeier ee0ac798eb remove weighting and staking dependency in BABE (#3412)
* remove weighting and staking dependency in BABE

* bump spec version

* Update Cargo.toml

* Update lock

* Fix warnings.
2019-08-15 21:21:14 +02:00
Michael Müller 7f764dbd37 Replace config field with default value (srml/im-online) (#3388)
* Fix whitespacing

* Replace configurable fields with default values

* Bump version

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Fix more whitespacing

* Fix style
2019-08-13 20:16:02 +02:00
Marcio Diaz 7b45130115 Add transaction pool to Aura and Babe import queue (#3225)
* Add transaction pool to babe import queue

* Add transaction pool to Babe check header

* Fix tests

* Add tx pool to Aura import_queue

* Fix tests, node-template

* Add comments regarding unused _transaction_pool

* Make tx pool optional in check_header
2019-08-13 10:44:00 +01:00
Gavin Wood 9afd655d8b Era change can be forced on and forced off (#3374)
* Forcing can be on or off.

* Add a testcase.
2019-08-12 18:14:16 +02:00
Gav Wood ebba5d1d3c Revert "Forcing can be on or off."
This reverts commit 583b0552d6.
2019-08-12 17:25:34 +02:00
Gav Wood 583b0552d6 Forcing can be on or off. 2019-08-12 17:24:12 +02:00
Jim Posen 36abb128f5 srml-contracts: Contract calls/instantiations to return exit statuses (#3320)
* 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.
2019-08-12 16:16:30 +02:00
André Silva 70d716dc48 node: exit on GRANDPA voter or BABE authoring error (#3353)
* node: exit on GRANDPA voter or BABE authoring error

* node: exit process with non-zero return code when service fails

* service: rename infallible task to essential task

* service: revert field name changes

* core: fix service testnet
2019-08-12 15:54:30 +02:00
Pierre Krieger 6fa84bae0f Refactor parse_and_execute (#3358)
* Refactor `parse_and_execute`

Adds a new function named `parse_and_prepare`, which prepares the environment and parses the command.
Contrary to `parse_and_execute`, `parse_and_prepare` returns a struct that permis the user to execute the command, as opposed to execute it itself.

`parse_and_execute` has been modified to use `parse_and_prepare` internally.

* Embed dispatch functions directly into run()

After the previous commit, we now have a lot of functions whose only one is to call other functions. And these other functions are called only from one location.
Let's merge these two for clarity.

* Deprecate parse_and_execute and replace it in node and node-template

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
2019-08-11 16:07:40 +02:00
Gavin Wood 14bb115193 Scale trait and move to u32 blocknumbers (#3357)
* 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
2019-08-11 15:03:06 +02:00
André Silva 59c88cb2f3 node: setup disabled grandpa properly (#3356) 2019-08-09 16:53:44 +02:00
André Silva 98d502466d node: re-introduce validator flag (#3351) 2019-08-09 15:17:52 +02:00
Bastian Köcher c824c959d7 Adds --no-validator CLI flag (#3348)
* 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
2019-08-09 14:24:18 +02:00
André Silva 8f3a68db25 grandpa: fix --no-grandpa flag breaking block production (#3350) 2019-08-09 00:53:54 +01:00
Pierre Krieger bafc7202ca Service various cleanups (#3238)
* Remove generic from sign()

* Remove mandatory RuntimeGenesis trait req

* Remove requirement from Configuration

* Relax trait bounds of core/cli

* Move method

* The config field is no longer public

* Remove Components from bounds of functions

* Implement DerefMut for LightComponents

* Implement Executor for Full/LightComponents

* Fix bad merge

* Fix forgotten config()

* Fix build
2019-08-08 16:14:30 +02:00
cheme b0e1212d48 Child storage tests and genesis fix. (#3185)
* 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
2019-08-08 15:05:25 +02:00
Jim Posen 0067b2d9a2 srml-contracts: Refactor away some duplication in runtime functions. (#3257)
* srml-contracts: Storage access micro-optimization.

* srml-contracts: Refactor runtime functions to reduce duplication.

* Bump node runtime impl version.
2019-08-08 15:02:04 +02:00
Bastian Köcher 0de7d9bb64 Adds author_rotateKeys RPC (#3337)
* Adds `author_rotateKeys` RPC

`author_rotateKeys` will rotate all session keys, store them into the
keystore and returns their encoded public keys as result. These encoded
public keys can be used directly to send the transaction to the chain.

* Review comments
2019-08-08 11:00:04 +02:00
Xiliang Chen 0f0df9850a add post_dispatch (#3229)
* add post_dispatch

* Update traits.rs

* Update checked_extrinsic.rs

* Update traits.rs

* Update traits.rs

* fix build issue

* update runtime version

* fix test build issue
2019-08-08 09:56:04 +02:00
Bastian Köcher 60269d65c6 Clean up CLI interface (#3334)
* Clean up CLI interface

- Removes `--validator` and `--grandpa-voter`
- Make `--alice` etc work without `--dev`

* Style fixes
2019-08-08 09:33:45 +02:00
Arkadiy Paronyan 58bd0d4c05 Set uncles inherent (#3317)
* Include uncles

* Filter missing uncles

* Moved inherent registration to a new crate

* Ignore invalid inherent encoding
2019-08-08 00:56:29 +02:00
Bastian Köcher ea58b7c92a Make DefaultByte implement Send + Sync (#3333)
* Make `DefaultByte` implement `Send + Sync`

* Update runtime version.
2019-08-08 00:10:36 +02:00
Andrew Jones 65a7629361 Derive CompactAs for Perbill/mill/U128 (#3327)
* Derive CompactAs for Perbill/mill/U128

* Increment impl_version
2019-08-07 21:48:30 +02:00
Gavin Wood 1a524b8207 Refactor key management (#3296)
* 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.
2019-08-07 20:47:48 +02:00
Bastian Köcher 394eff6c2f Update to schnorrkel 0.8.0 (#3267)
* Update to schnorrkel `0.8.0`

* Increase `spec_version`

* Bump schnorrkel to 0.8.3 (#3283)

* Schnorrkel 0.8.1 (builds on bkchr upgrade branch)

* Add tests for known hard/soft derivation values

* Bump all schnorrkel versions

* Flatten for easier inspection

* 0.8.2

* 0.8.3

* Update subkey/Cargo.toml

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Update `Cargo.lock`

* 0.8.4

* Fix cargo lock file.

* Adding an error message for `NotMarkedSchnorrkel` as that was missing.
Also fixing a typo, strage -> stage.
2019-08-07 12:59:54 +02:00
thiolliere 4ed67e03a4 Update to parity-scale-codec (#3232)
* WIP: update codec

* WIP

* compiling

* WIP

* rename parity-scale-codec to codec

* WIP

* fix

* remove old comments

* use published crates

* fix expected error msg

* bump version

* fmt and fix

* remove old comment

* fix wrong decoding impl

* implement encode like for structures

* undo removal of old pending changes

* trailingzeroinput

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* update codec

* fmt

* version is 1.0.0

* show more error

* fmt
2019-08-06 19:36:23 +02:00
Robert Habermeier d5726d8e8a fix BABE randomness calculation (#3305) 2019-08-05 20:50:37 -04:00
André Silva a7c6950f1b node: fix integration test transaction format (#3306) 2019-08-05 21:56:26 +02:00
Sergei Pepyakin f0856db12c srml-contracts: Minor fixes to docs. (#3262)
* Adjust documentation.

* Bump impl_version.

* Update srml/contracts/src/wasm/runtime.rs

Co-Authored-By: Hero Bird <robbepop@web.de>

* Remove incorrect doc.
2019-08-02 19:53:33 +02:00
André Silva aa86185648 node: use BABE predigest data to find authorship (#3293)
* node: use BABE predigest data to find authorship

* node: bump spec_version

* babe: use u32 for authority index
2019-08-02 19:52:36 +02:00
cheme da8b91ae7b Trie simplification. (#2815)
* 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.
2019-08-02 19:51:59 +02:00
Gavin Wood 7927e80bc6 Check the genesis hash in transactions regardless of era. (#3286)
* Check the genesis hash in transactions regardless of era.

* Fix check-fees, too.

* Undo.

* Subkey supports new signing.

* Remove unneeded type param.

* Bump tx version

* Build.

* Another build fix

* Build again

* Cleanup

* Another fix.

* Fix

* Fixes

* 6 second blocks.

* Fixes

* Build fix

* Fix

* Fix.
2019-08-02 18:30:20 +02:00