Commit Graph

2158 Commits

Author SHA1 Message Date
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
Pierre Krieger 83b148f514 Mention that in_mem::Backend doesn't work (#3250)
* Mention that in_mem::Backend doesn't work

* Bigger warning
2019-08-03 10:33:53 +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
Pierre Krieger c792dd358d Switch RPCs to stable futures (#3287) 2019-08-02 19:52:55 +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
Gavin Wood ae6c2f7f8c Fix staking (#3284)
* 6 second blocks.

* Version bump

* Add test for slashable_balance()
2019-08-01 16:01:22 +02:00
Fedor Sakharov 17b9ef19c1 Slots should not try to catch panics. (#3281) 2019-08-01 14:37:02 +02:00
thiolliere b504f5a7bb Make staking add_reward_points_to_validator public (#3273)
* make staking add_reward_points_to_validator public

* make storage private

* bump version
2019-08-01 09:55:27 +02:00
Pierre Krieger cb7383b6b6 Documentation and small cleanup in panic-handler (#3249)
* Documentation and small cleanup in panic-handler

* Apply suggestions from code review

Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com>
2019-08-01 09:53:53 +02:00
Sergei Pepyakin de02aee156 srml-contracts: Deferred actions (#3255)
* Switch to deferred actions

* Make restore_to a deferred action.

* Bump version.

* Review fixes.
2019-08-01 09:52:59 +02:00
Pierre Krieger 780942192e Fix telemetry not responding to pings (#3272) 2019-08-01 09:45:29 +02:00
Pierre Krieger 5b1b4b92b1 Telemetry connectivity issues are not WARN (#3274) 2019-08-01 09:45:08 +02:00
Pierre Krieger f8db199b97 Replace the telemetry Mutex with a channel (#3266)
* Replace the telemetry Mutex with a channel

* Don't return Err() if channel is full

* Change polling pattern

* Add more issue numbers
2019-08-01 09:43:37 +02:00
André Silva 0aa3bbf202 extend flaming fir version details on README (#3279) 2019-08-01 09:42:37 +02:00
Pierre Krieger 083b14dadf Fix infinite loop in telemetry (#3275) 2019-07-31 18:35:03 +01:00
ddorgan 6815ce59fe Fix artifact location required for flaming fir deployments (#3268) 2019-07-31 17:49:04 +01:00
Bastian Köcher 31da4d249d Don't set HEAP_PAGES in BasicExternalities (#3244)
* Don't set `HEAP_PAGES` in `BasicExternalities`

* Fix test
2019-07-31 09:58:06 +02:00
Tomasz Drwięga 04c115a6e9 Revert "Update schnorrkel to 0.7.0 (#3261)" (#3264)
This reverts commit a5fa1ddd99.
2019-07-31 00:19:32 +02:00
Bastian Köcher a5fa1ddd99 Update schnorrkel to 0.7.0 (#3261)
* Update schnorrkel to `0.7.0`

* Apply suggestions from code review

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

* Increase `spec_version`
2019-07-30 17:46:05 -04:00
André Silva c1640ef5da node: update flaming fir chain spec (#3258)
* node: update BABE authority ids in staging testnet config

* node: update flaming fir chain spec
2019-07-30 22:44:02 +01:00
André Silva bd052d8da4 babe: Disable unused median calculation (#3251)
* 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
2019-07-30 22:08:20 +01:00
Arkadiy Paronyan 1d5cd20c44 Synchronize state cache on finalization (#3246)
* Reorg test

* Fixed informant misreporting reorgs

* Update cache when reorg is caused by applying finality

* Test for finality reorg

* Simplified test

* Typo

Co-Authored-By: André Silva <andre.beat@gmail.com>
2019-07-30 22:07:57 +01:00
Jim Posen 1295260f2b Remove unused imports introduced in #3239. (#3252)
Partly due to interaction with #3191.
2019-07-30 14:30:01 +02:00
Pierre Krieger d0eb909b30 Properly stop block import on error (#3240)
* Stop block import after error

* Better diagnostic on error
2019-07-30 12:04:28 +01:00
Jim Posen 4c0934b2a7 srml-contracts: Forbid declaration of float types in contracts (#3234)
* srml-contracts: Forbid remaining uses of float types.

* Bump node runtime impl version.
2019-07-30 13:41:09 +08:00
André Silva 483ad60379 srml: babe: add expected block time and epoch duration constants (#3241)
* srml: babe: add expected block time constant

* srml: babe: expose epoch duration constant

* node: bump spec_version

* core: don't use moment type in test-runtime

* babe: add docs regarding c parameter
2019-07-30 13:39:33 +08:00
Pierre Krieger 20eb52d6bb Allow creating a ChainSpec from a Vec<u8> (#3233)
* Allow creating a ChainSpec from a Vec<u8>

* Line widths

* Embedded -> Binary

* Remove from_embedded
2019-07-29 20:50:50 +02:00
Pierre Krieger 7658eb6b88 Fix master (#3242) 2019-07-29 19:43:03 +01:00
Pierre Krieger 0af5aadc5a Add documentation for the client (#3221) 2019-07-29 17:21:28 +01:00
Jim Posen 8aa367c27a Fix substrate factory CLI command (#3239)
* CLI execution flag for import-blocks and factory.

* Fix minimum_balance bug with CLI factory.
2019-07-29 17:06:13 +02:00
Max Inden c9c0ad4756 core/network: Fix bad import %s/runtime_primitives/sr_primitives/ (#3236)
* core/network: Fix bad import %s/runtime_primitives/sr_primitives/

* Cargo.lock: Update consensus-common-primitives parity-codec version

* core/consensus/common: Remove obsolete package path
2019-07-29 15:55:57 +02:00
Kian Paimani 79feb23a22 Refactor sr_primitives. (#3214)
* refactor sr_primitives.

* Fix try build error.

* Line-width

* Ui test.

* Final fixes.

* Fix build again.

* bring back ui test.

* Fix unsigned import.

* Another ui fix.

* Also refactor substrate-primitives

* Fix benchmarks.

* Fix doc test.

* fix doc tests
2019-07-29 14:43:53 +02:00
Max Inden cf80af9255 core/consensus,node/runtime: Declare and implement authorities endpoint (#3207)
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.
2019-07-29 08:39:47 -04:00
Jim Posen 9388f48942 srml-contracts: Refactor to remove duplication between call and create code paths (#3209)
* srml-contracts: Change Ext interface to pass-by-value.

* srml-contracts: Refactor ExecutionContext to reduce duplication.

* srml-contracts: Refactor contracts Module to reduce duplication.

* Bump node runtime impl version.
2019-07-29 14:13:47 +02:00
Bastian Köcher 9303b9b7df Remove IncrementalInput and fix wasm storage_into* (#3224) 2019-07-29 10:44:40 +02:00
thiolliere 852ed92861 staking need to get events (#3217) 2019-07-29 10:40:02 +02:00
Pierre Krieger 8c919e031b Stop being generic over the message (#3186) 2019-07-29 09:29:06 +02:00
Pierre Krieger 9370a4a6b6 Clean up the basic-authorship crate (#3206)
* Switch consensus-common to new futures

* Fix tests

* More tests fixing

* Make Proposer, OnSlot and SyncOracle mut

* Make the Environment mut as well

* Fix test

* Fix Babe tests

* Babe fixes

* Fix CLI service tests

* Fix Babe tests

* Remove unnecessary trait bound

* Inline the code of BlockBuilder and AuthoringApi

* Remove warning lint

* Bounds simplification

* Imports simplification

* Don't panic on bad generated block

* Code style

* Add doc example

* Remove dependency on aura

* Order dependencies alphabetically

* Minor style
2019-07-27 20:24:51 -04:00
Pierre Krieger ba55d31d44 Minor cleanup in native_executor.rs (#3218)
* Minor cleanup in native_executor.rs

* Fix tests
2019-07-27 15:41:22 +02:00
TriplEight 06268b9dba Fixed debug flags (#3215)
* fixed debug flags

* test everything works

* test everything works 2

* sections are rewritten

* everything works
2019-07-26 19:15:15 +02:00
DemiMarie-parity 390d761078 Update dependencies (#3140) 2019-07-26 10:04:07 -04:00
André Silva 2b021ba4f1 node: Update BABE protocol parameters (#3211)
* node: update babe parameters to target 6 second block time

* node: add comment on MILLISECS_PER_BLOCK constant
2019-07-26 08:19:04 -04:00
Pierre Krieger 5220ccbf20 Import queue steps (#3159)
* Switch consensus-common to new futures

* Fix tests

* More tests fixing

* Pass the block_import by value when importing

* Rewrite the multi-blocks import as a future

* Add some comments

* Add a delay between each block

* Fix Babe tests

* Reverse white space change
2019-07-26 08:42:03 +08:00
TriplEight d98f3c6023 WIP: Subkey docker image (#3183)
* WIP to release subkey im docker

* debug run with publishing

* debug build

* debug build 2

* easier sync

* fix the template

* fix typo
2019-07-26 08:40:53 +08:00
André Silva a5efdd05d7 Use milliseconds for timestamp resolution (#3210)
* node: tabify constants file

* node: define minimum period and slot duration in milliseconds

* core: srml: use milliseconds for timestamp resolution

* core: update slot_duration to millis in tests

* node: bump spec_version

* node: fix integration test

* node: fix executor test

* Update node/runtime/src/lib.rs

Co-Authored-By: Kian Peymani <Kianenigma@users.noreply.github.com>

* node: fix docs on timestamp resolution

* node: add docs on u64 for millis
2019-07-26 08:40:15 +08:00
Michael Müller 23fba990ba Handle local storage race conditions better (#3177)
* 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
2019-07-26 07:42:40 +08:00
Sergei Pepyakin af914e9f40 Fair reusing of wasm runtime instances (#3011)
* 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
2019-07-25 16:01:08 +03:00