Commit Graph

1310 Commits

Author SHA1 Message Date
Arkadiy Paronyan 1ea56905cf Fixed state-db block insertion and added forks trace (#1657) 2019-02-01 17:17:31 +01:00
Tomasz Drwięga ecdd33a367 Allow both consensus and runtime to limit block building (#1581)
* Limit block size in runtime,

* Add test for basic authorship.

* Store length of extrinsics instead of computing it.

* Don't rely on note_extrinsic

* Use hashed version of storage and write test.

* Recompile runtime.
2019-02-01 13:58:23 +01:00
Svyatoslav Nikolsky 381cf26f55 Make genesis state locally-available on light client (#1622)
* make genesis state available on light client

* RemoteOrLocalCallExecutor

* code_is_executed_locally_or_remotely

* OnDemandOrGenesisState tests

* some comments
2019-02-01 10:27:54 +01:00
Joshy Orndorff 5d82cf243e Fix minor error in chain-spec generation command in readme (#1644)
* Fix minor error in chainspec generation command in readme

* Fixed up remaining typo
2019-01-31 22:36:55 +01:00
Gav Wood a58de5d0ff Transaction signing payload is hashed first (#1624)
* Transaction signing payload is hashed first

* Fix tests

* Rebuild wasm

* Fix tests

* Only take payload hash when payload.len > 256 bytes.

* Fix tests
2019-01-31 18:39:20 +01:00
Arkadiy Paronyan 4bcc8eda41 Check for disposed blocks when creating a state. (#1636)
* Check for disposed blocks

* fixed changes_tries_with_digest_are_pruned_on_finalization

* Indent

Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
2019-01-31 14:06:10 -03:00
Stanislav Tkach da029c87b7 Replace ⭳ and ⭱ characters with ⬇ and ⬆ (#1635) 2019-01-31 14:18:40 +01:00
Sergei Pepyakin 80d4a0a21b Declare storage in contracts module (#1591)
* Declare storage in contracts module

This adds storage declarations of the contract module to the runtime metadata and this ultimately gives ability to inspect the storage of contract module (except contracts storage) for polkadot ui

* Bump the runtime version to 17.

* Rebuild the binaries.

* Rebuild

* Rebuild [2]
2019-01-31 12:19:28 +01:00
Wei Tang fc41825fb6 Support edition 2018 for storage_items macro (#1625)
* Support edition 2018 for storage_items macro

* Fix handle_wrap_internal
2019-01-31 11:34:16 +01:00
thiolliere 9de35fa7d5 update rhododendron trie-bench for parity-codec 3.0 (#1613)
* update rhd and tri

* .lock and wasm build
2019-01-31 11:04:41 +01:00
Gav Wood 6cf382f8b0 Update the date (#1627)
* Update the date

* fixed compilation
2019-01-31 08:54:07 +01:00
Pierre Krieger ec790acf4d Print the local node address again (#1628) 2019-01-30 23:33:14 +01:00
cheme ea2a03b7bb Merge metadata by module (#1428)
Clean up metadata format. Merge events metadata into runtime metadata. Remove low value info (internal macro identifier and counters).
2019-01-30 19:34:08 +01:00
Arkadiy Paronyan 742f030ddd Transactional updates in the state-db (#1616) 2019-01-30 16:58:25 +01:00
Stanislav Tkach f98f9ac58a Migrate state-db, state-machine, telemetry, test-client and test-runtime to the 2018 edition (#1623) 2019-01-30 15:51:59 +01:00
Svyatoslav Nikolsky 2037c52fbe make --port 30334 work again (#1620) 2019-01-30 14:46:39 +01:00
Svyatoslav Nikolsky a4756710c5 fixed aux modifications on light client (#1621) 2019-01-30 14:44:29 +01:00
Michael Müller aa5e0658f8 Fix consensus error between wasm and native (#1595)
* 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
2019-01-30 14:37:32 +01:00
Benjamin Kampmann 15ae7cfef6 Document more TODOs as tickets (#1418)
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.
2019-01-30 10:29:48 +01:00
Tomasz Drwięga d2cfd7b9dc Allow runtime to return transaction validation error codes (#1534)
* Allow runtime to return more detailed transaction validation errors.

* Re-use ApplyError codes and update test-runtime.

* Fix pool tests.

* Revert using Compact for validity.
2019-01-29 19:06:05 +01:00
Stanislav Tkach 473721f959 Migrate node (cli, executor, primitives and runtime) to the 2018 edition (#1589) 2019-01-29 17:57:56 +01:00
Stanislav Tkach d796e09f02 Migrate tx-graph, tx-pool and trie to the 2018 edition (#1611) 2019-01-29 16:25:03 +01:00
Stanislav Tkach e6839d2d41 Migrate executor, xinherens, keyring and keystore to 2018 edition (#1585) 2019-01-29 14:30:07 +01:00
thiolliere ecffe0c371 impl Mul + saturating_mul by converting in u64 (#1610) 2019-01-29 13:36:34 +01:00
Frank Prößdorf a541ee8c05 Fix typo in chain_ops (#1597) 2019-01-29 13:35:38 +01:00
Stanislav Tkach 8247ad5613 Migrate subkey and chain-spec-builder to the 2018 edition (#1605) 2019-01-29 12:47:40 +01:00
jkcomment 24c531cf7b Fix generate node name with less then 32 characters (#1596)
* fix generate node name with less then 32 characters

* refactor generate_node_name
2019-01-29 12:46:18 +01:00
Robert Habermeier ced9e72824 Download unknown but announced forks (#1604)
* test reproducing fork sync issues

* update to new announce_block API

* Download unknown forks

* Reverted download_stale

* Avoid cloning the hash

* Typo
2019-01-28 16:41:33 -03:00
Svyatoslav Nikolsky 431ad3ca76 finalize multiple blocks at once (#1601) 2019-01-28 14:16:30 -03:00
Robert Habermeier d027123059 GRANDPA: announce blocks we vote on to peers (#1593)
* announce blocks we vote on to peers (missing network impl)

* Implemented 'announce'

* Fixed test

* improve announce docs and add logging

* Track recently announced blocks
2019-01-28 16:41:36 +00:00
thiolliere 0078927ac5 update codec and grandpa (#1582)
* update codec

* use new codec

* update grandpa code

* build .lock and binaries
2019-01-28 14:16:17 +01:00
thiolliere f70fd6e450 set link-arg --export-table for wasm builds (#1598) 2019-01-28 12:41:52 +01:00
Robert Habermeier 86c5f78805 more logging around pending GRANDPA changes (#1587) 2019-01-27 14:53:57 +01:00
Arkadiy Paronyan f16ddcb622 Only request justifications from available peers (#1586) 2019-01-25 20:09:56 -03:00
Gav Wood c132e84572 Additional externs for ecdsa recovery and keccak (#1583)
* Additional externs for ecdsa recovery and keccak

* Update core/executor/src/wasm_executor.rs

Co-Authored-By: gavofyork <github@gavwood.com>

* Update core/executor/src/wasm_executor.rs

Co-Authored-By: gavofyork <github@gavwood.com>

* Fix grumble

* Grumble.
2019-01-25 19:07:02 +00:00
André Silva 5ddcbe0ca6 core: send justification requests in parallel to block requests (#1563)
* core: send justification requests in parallel to block requests

* core: fix grandpa test
2019-01-25 11:07:26 -03:00
André Silva 6e55812704 core: restrict grandpa voter on authority set change (#1564) 2019-01-25 11:05:39 -03:00
Robert Habermeier 0953521cc4 don't panic in best_containing (#1559)
* don't panic in best_containing

* core: client: fix borrow in best_containing
2019-01-25 12:16:37 +00:00
Benjamin Kampmann ab4c70b379 Update dependencies (#1527)
* update to latest env_logger

* roundabout dependency update

* Update to latest vengen

* Update rand to 0.6

* Update to latest rng shuffle API

* Roundabout update of dependencies

* Update rustc_hex

* Update wasm

* Fix logging setup in tests

* revert to fix test
2019-01-25 12:44:41 +01:00
Bastian Köcher b187695af7 Aura: Remove unused structures and adds SlotDuration::get() (#1565) 2019-01-25 10:56:46 +00:00
Bastian Köcher 27a882bfac Refactor CLI handling (#1368)
* Rework cli handling

* Update readme

* Adds support for custom subcommands and extra run parameters

* Update readme

* Fixes compilation after master merge

* Make "Run" the default subcommand

Actually its hidden to the outside that is an subcommand.

* Rewrite CLI to work without breaking old CLI behavior

* Some cleanup

* Fix incorrect config setup

* Update README

* Fixes after merge

* Fixes incorrect README
2019-01-25 10:48:46 +00:00
André Silva 375e01e6b1 core: grandpa limits votes to 3/4 of the unfinalized chain (#1554)
* core: grandpa limits votes to 3/4 of the unfinalized chain

* core: test grandpa limited votes
2019-01-25 10:37:56 +00:00
Pierre Krieger a1586df41b Report the average network bandwidth (#1551)
* Report the average network bandwidth

* Fix concerns
2019-01-25 10:34:34 +00:00
Shawn Tabrizi aeb6aa8b48 Refactor transfer() logic outside of dispatched function #1555 (#1562)
* Refactor `transfer()` logic outside of dispatched function

* Refactor `transfer()` logic outside of dispatched function

* Refactor `transfer()` logic outside of dispatched function

* Refactor `transfer()` logic outside of dispatched function
2019-01-25 10:33:39 +00:00
Bastian Köcher 6543207062 Fix inconsistency between CheckInherentsResult::new()/default() (#1561) 2019-01-25 11:22:04 +01:00
André Silva 661e91e2c7 core: fix transaction-pool tests (#1557) 2019-01-25 08:49:20 +01:00
Stanislav Tkach 82d014cf35 Remove TODO comment about unboxing state_machine error 2019-01-24 19:10:07 +02:00
Arkadiy Paronyan f38aa0d2de Test syncing to all forks (#1544) 2019-01-24 15:52:48 +00:00
Tomasz Drwięga 1b0d90cdf6 Optimize transaction pool pruning (#1524)
* Reuse tags of known transactions, avoid reimporting extrinsics from imported block.

* Fix tests for graph.

* Add more detailed docs.

* Avoid cloning and computing hashes twice.
2019-01-24 15:52:17 +00:00
Wei Tang 997c8b4020 Atomic operation and locking when importing a block (#1489)
* Add ClientImportOperation and remove an unused enum

* set_aux to insert_aux so that it can be called multiple times

* [WIP] All basic designs of lock_import_and_run

* [WIP] `apply_block` and `apply_aux` implementation

* Update client db with the new interface

* Always make sure we reset importing_block back to None

* Address grumbles

`apply_block` should be pub

* Add comments on insert_aux

* Fix compile
2019-01-24 15:51:53 +00:00