Commit Graph

293 Commits

Author SHA1 Message Date
thiolliere beeacf9cfa impl HasCompact for Perbill and Permill (#1411)
* impl Compact<> and HasCompact for Permill Perbill

* update parity-codec to 2.2

* add Cargo.lock

* add lock and build for runtime

* rebuild Cargo.lock after rebase
2019-01-17 11:25:48 +01:00
Svyatoslav Nikolsky da1fb3f273 Use changes tries in query_storage RPC (#1082)
* use changes tries in query_storage RPC

* let + match + return + call -> match
2019-01-17 10:08:50 +01:00
Pierre Krieger eb000fb1ae Remove warning for large buffer (#1357) 2019-01-17 09:33:39 +01:00
Svyatoslav Nikolsky d58b23f759 fix tests by rebuilding wasm(s) (#1463) 2019-01-17 08:22:45 +01:00
Pierre Krieger 9018d752dc Update libp2p-kad and libp2p-secio (#1447)
* Update libp2p-kad and libp2p-secio

* Fix concern
2019-01-16 12:59:24 -03:00
Gav Wood c9f047fe84 Split Indices module from Balances (#1404)
* Indices module

* Remove indices stuff from balances

* Rejob node, move Lookup into system.

* Fix up some modules.

* Fix democracy tests

* Fix staking tests

* Fix more tests

* Final test fixes

* Bump runtime versions

* Assets uses compact dispatchers

* Contracts module uses indexed addressing

* Democracy has more compact encoding

* Example now demonstrates compact eencoding

* Sudo uses indexed address

* Upgrade key also uses indexed lookups

* Assets more compact types.

* Fix test

* Rebuild runtime, whitespace

* Remove TOODs

* Remove TODOs

* Add a couple of tests back to balances.

* Update lib.rs

* Update lib.rs
2019-01-16 15:57:19 +01:00
Marcio Diaz 9151349b2d Make use of NLL in client crate (#1436)
* fix: set edition to 2018 in Cargo.toml.

* fix: refactor function to make use of NLL.

* fix: result of applying 'cargo fix --edition' command.

* fix: removes extern crate

* fix: remove module uses from lib.rs

* fix: tests imports
2019-01-16 11:49:26 +01:00
Robert Habermeier f0b4c87eb5 set wasmi version 0.4.3 in Cargo.toml (#1452) 2019-01-15 21:44:54 +01:00
Xiliang Chen 623775ad96 enable dns transport (#1433) 2019-01-15 11:23:32 +01:00
Sergei Pepyakin a73280728f Update wabt to to not require python dependency (#1420) 2019-01-14 21:53:09 +01:00
Pierre Krieger a0d458aa06 Update to latest libp2p (#1386)
* Update to latest libp2p

* Fix indentations

* Add basic test

* Apply suggestions from code review

Co-Authored-By: tomaka <pierre.krieger1708@gmail.com>

* Remove Mutex from topology

* Remove unused method

* Fix concerns
2019-01-14 13:38:36 +01:00
Svyatoslav Nikolsky 616716cb4b GRANDPA finality proof draft (#1268)
* grandpa finality proof

* prove GrandpaApi::grandpa_authorities using parent block + some docs

* create justification when consensus data is changed

* generate justifications periodically

* test for ConsensusChanges
2019-01-11 19:25:03 +01:00
Tomasz Drwięga 677b79765b Fix serialization of extrinsics. (#1402) 2019-01-11 19:24:25 +01:00
Benjamin Kampmann ab12c739ff Upgrade the rocksdb dependency to 0.11 (#1398) 2019-01-11 16:40:36 +01:00
Benjamin Kampmann 7610f64a85 Properly log sealing and the newly created proposal hash from aura (#1397)
* Properly log sealing and the newly created proposal hash from aura

* Update lib.rs
2019-01-11 15:20:40 +01:00
Xiliang Chen 0e569e6bf2 new state api state_getKeys to expose storage keys (#1380) 2019-01-11 12:51:19 +01:00
Tomasz Drwięga cc3748f034 Hex-encode block number. (#1389) 2019-01-11 11:43:58 +01:00
Gav Wood 039741c977 Ensure opaque extr serialise is same as transparent (#1388)
* Ensure opaque extr serialise is same as transparent

Fixes #889

* Fix wasm compile
2019-01-11 11:36:44 +01:00
Robert Habermeier 9acda28c16 informant: display finalized height and hash (#1387) 2019-01-10 18:19:31 +01:00
Gav Wood d6ef5f9215 Urgent safety fix for #1371 (runtime version) 2019-01-10 16:06:19 +01:00
Gav Wood a13fda2e83 Fix telemetry (and a minor cleanup) (#1384) 2019-01-10 15:47:12 +01:00
Pierre Krieger 42c30609d3 Update ring to 0.13 and subtle to 2.0 (#1383) 2019-01-10 13:32:27 +01:00
Gav Wood 37fa74b891 Updates for CC's recent upgrade (#1381)
* Updates for CC's recent upgrade

- Version bump to 0.9.2
- Runtime version bump to v14
- Avoid misuse of error return type for system_health RPC

* Fix tests
2019-01-10 11:34:25 +01:00
Gav Wood fc5fdab5f2 Cherry updates (#1373)
- Introduce compact extrinsics into Cherry
- Remove UpgradeKey from Cherry (Sudo is enough)
- Remove networkId from Cherry properties
2019-01-09 12:52:16 +01:00
Xiliang Chen eb3503b0c7 expose peer information via rpc (#1362)
* expose peer information via rpc

* fixes tests

* cleanup

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update docs

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Add missing docs

* keep original type for PeerInfo best_hash/best_number

* cleanup

* Update mod.rs
2019-01-09 12:18:24 +01:00
kyegupov 079eb39559 Test compiled wasm code in test-runtime (#1364)
* Test compiled wasm code in test-runtime

* Drop lazy_static

* Move substrate-executor to dev-dependencies
2019-01-09 11:27:53 +01:00
Alexander Krupenkin e14da81084 Fix duplicate sources (paritytech/polkadot#62) (#1351) 2019-01-09 11:26:17 +01:00
kyegupov 1b5ab3a524 Some documentation for ext_ functions in Substrate Runtime API (#1369)
* Some documentation for ext_ functions in Substrate Runtime API

This would be useful for using non-Rust language to write Substrate-compatible modules and debugging modules at the WebAssembly level.

* Update without_std.rs

Update comment styles
2019-01-09 10:42:49 +01:00
Tomasz Drwięga 8d4129aa22 Remove unneeded Deserialize impls. (#1370) 2019-01-08 22:44:39 +01:00
Tomasz Drwięga 38cdd0a5c6 Bump jsonrpc to fix hang on exit (#1367)
* Test RPC fix.

* Fix meta in unsubscribe.

* Fix meta in unsubscribe.
2019-01-08 14:46:07 +01:00
Arkadiy Paronyan b104c02eb6 State cache and other performance optimizations (#1345)
* State caching

* Better code caching

* Execution optimizaton

* More optimizations

* Updated wasmi

* Caching test

* Style

* Style

* Reverted some minor changes

* Style and typos

* Style and typos

* Removed panics on missing memory
2019-01-08 13:13:13 +01:00
Wei Tang e0639c435b Expose all authorship APIs (#1366) 2019-01-08 12:30:45 +01:00
Shawn Tabrizi c4010edb75 Updating parking_lot dependencies to 0.7.1 (#1361) 2019-01-08 11:15:42 +01:00
Wei Tang 71d889b692 Make AuthorityId generic (#1296)
* BlockAuthorityId convenience type

* Rename AuthorityId -> Ed25519AuthorityId to make it more precise

* Generalize AuthorityId up to substrate-client

* Fix in client-db

* rename: BlockAuthorityId -> AuthorityIdFor

* typo: should be digest item

* Fix test-runtime authorityId mismatch

One states that AuthorityId is u64 while the other states that it's Ed25519AuthorityId.

* Fix more u64 - Ed25519AuthorityId mismatch

* Fix compile of most of the srml modules

* Continue to pin aura and grandpa with ed25519 and fix compile

* Add MaybeHash trait

* Fix node-runtime compile

* Fix network tests
2019-01-08 11:14:18 +01:00
Gav Wood 043831cfb0 Invulnerabiity from slashing for certain validators (#1355)
* Invulnerabiity from slashing

* Update srml/staking/src/lib.rs

Co-Authored-By: gavofyork <github@gavwood.com>
2019-01-07 16:07:58 +01:00
Wei Tang f5c4abd0f3 Use primitive-types crate to unify Parity Ethereum primitives (#1187)
* Unify primitive types with parity-ethereum

* Update primtive-types patch version

* Fix merge issue

* Add necessary fixed-hash features

* Fix node-primitives compile

* Reexport impl_serde::serialize as bytes to avoid path changes
2019-01-07 15:54:59 +01:00
Robert Habermeier eb0ff291d6 log on reorganization (#1356) 2019-01-07 15:32:04 +01:00
Aton 409d495b42 fix bug for revert (#1341)
* must pass sub_matches to function, so that could get `<num>` in revert
* revert should del current best index block, not prev block
2019-01-07 10:17:05 +01:00
Arkadiy Paronyan 8948567c23 Fixed ancestry search/block queue interaction (#1337)
* Fixed ancestry search - block queue interaction

* Style
2019-01-06 16:45:41 +00:00
André Silva 468fd19f6b Improve ondemand request dispatch (#1349)
* core: fix bug on ondemand dispatch

after a request was dispatched to the last peer the dispatch would loop
forever on subsequent requests that aren't able to be fulfilled by any
of the peers, since the last peer wasn't updated.

* core: try to dispatch all pending ondemand requests
2019-01-06 16:43:51 +00:00
Wei Tang ac1be0665e Support custom fork choice rule (#1339)
* Support custom fork choice rule

* Remove unneeded reexport

* Fix network compile
2019-01-04 20:34:58 +01:00
Gregory Terzian 771a8127c2 moving core/service/consensus into new core/authorship crate (#1257) 2018-12-31 12:33:49 +01:00
Gregory Terzian 3add75910a move import queue to consensus-common (#1282) 2018-12-31 12:33:21 +01:00
Robert Habermeier 35ba22cdd1 refactor aura slot timers a bit, add additional guards (#1303) 2018-12-29 15:29:09 +01:00
Arkadiy Paronyan 831fd9947f Make sure displaced leaves are removed from the db (#1338) 2018-12-29 14:08:20 +01:00
toxotguo 236208b6cb fix pruning arg type (#1332) 2018-12-27 13:35:05 +01:00
kyegupov 11f77464fb Improved test for conditional panic (#1320) 2018-12-23 20:22:45 +01:00
Bastian Köcher d15cc63370 Make deposit_event work with none generic events (#1309)
* Make `deposit_event` work with none generic events

`fn deposit_event() = default` will now be used for none generic events
`fn deposit_event<T>() = default` is now for generic events.

* Update wasm files

* Fixes some spelling mistakes

* Update wasm and fix new module
2018-12-22 17:37:05 +01:00
Wei Tang 031826ebdb typo: Hash -> Self::Hash (#1319) 2018-12-22 17:35:49 +01:00
André Silva f8f932d123 node: fix shutdown (#1308)
* node: remove grandpa authority flags

* node: exit-guard grandpa and aura spawned futures

* node: wait for futures to stop running on shutdown

* core: run connectivity tests on same ports

* core: pass on_exit future when starting aura and grandpa

* node: add issue number to todo

* core: fix aura and grandpa tests
2018-12-21 17:30:45 +01:00