Commit Graph

1198 Commits

Author SHA1 Message Date
Fabian Raetz e06ddfecc4 Document how to build substrate on Windows (#1343) (#1429) 2019-01-14 21:53:41 +01:00
Sergei Pepyakin a73280728f Update wabt to to not require python dependency (#1420) 2019-01-14 21:53:09 +01:00
Arkadiy Paronyan 520d2e3227 Update CONTRIBUTING.adoc 2019-01-14 13:42:20 +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
Benjamin Kampmann 08402d26e6 Update links, labels and process in CONTRIBUTING.adoc (#1409)
* Update CONTRIBUTING.adoc

Fix broken links to labels, update link to style guide. Add breaksapi and breaksconsensus and add a section on easy, medium and mentor ticket to get started. Slight rephrasing to clarify current process.

* Update CONTRIBUTING.adoc
2019-01-14 10:22:17 +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
Xiliang Chen bf51b8a5ad Move double map to support module and generalize it (#1379)
* Move double map to support and generalize it

* add docs back

* reduces the number of required allocations
2019-01-11 11:44:15 +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 0c8755a276 Bump version to 0.10.0 in preparation for 1.0gamma (#1385)
* Bump version to 0.10.0 in preparation for 1.0gamma

* Update lock file
2019-01-10 18:16:49 +01:00
Gav Wood d6ef5f9215 Urgent safety fix for #1371 (runtime version) 2019-01-10 16:06:19 +01:00
André Silva 3555ef425d Improve offline slashing calculation (#1371)
* srml: apply slashing for all offline reports at once

* srml: add regression test for slashing overflow
2019-01-10 12:03:15 -03: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
Stanislav Tkach bbbf315854 Escape dashes in shell commands 2019-01-10 14:17:32 +02: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
joepetrowski ecbb51f729 Updated README.adoc (#1278)
* Updated README.adoc

Added a new section with instructions of how to join the Krumme Lanke testnet.
Closes Issue 1217

* Update README.adoc

Instructions for joining Charred Cherry + some minor typos

* Updated Runtime & API in README.adoc

Properties of these functions are changing quickly, updated this section to be more generic.
2019-01-09 15:55:43 +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
Drew Stone 43269f0dbc drew.tupletimestamp - Add tuple macro for timestamps too, break macro out into support (#1372)
* Add tuple and dont mess up spacing

* Update lib.rs

* Add timestamp tuple macro
:

* Tabs

* Add docs.
2019-01-09 12:18:09 +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
cheme d271a4647c Decl_storage macro : force traits. (#1317)
* Missing trait def on two calls.

Slight mcla refact on transfo.

* Allways provide GenesisConfig even when useless (for runtime module
export).

* Revert "Allways provide GenesisConfig even when useless (for runtime module"

This reverts commit 84a29bc592023d1ee107519c58693ec19dbde2d2.

* Fix Vec usage (from rstd).
2019-01-07 16:05:47 +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
Luke Schoen cb52401350 Update SRML Council: prevent excess votes/computation (#1162)
* fix: Add assertions to prevent excess votes and computation, and to end council seat election when no empty seats

* Add assertion to prevent a vote from voters that provide a list of votes that exceeds the desired seats length, since otherise an attacker may be able to submit a very long list of `votes` that far exceeds the amount of candidates and waste more computation than a reasonable voting bond would cover. Added additional associated test that may be run with `cargo test -p srml-council`

* Add assertion so expired council seats are not up for election when desired seat count changes during the voting period such that there are no longer any empty seats

* Update comment to refer to `reporter` instead of `who` (target of inactivity), since the origin is the `reporter`

* Update commment to refer more specifically to how many vote indexes, since `InactiveGracePeriod` is measured in vote indexes

* Update comment for `ApprovalsOf` since previously the comment was a duplicate of the comment for `LastActiveOf`'s

* Create variable to refer to `retaining_seats` to improve readability

* Reference Notes: https://hackmd.io/nr6kPD2sR4urmljtvHs0CQ

* WIP - length votes should be less than length candidates. pushing changes for reference so can fix

* fix: Amount of candidate approval votes cannot exceed candidates amount. Candidates amount must be over zero.

* Fix so that amount of candidate approval votes cannot exceed amount of candidates (instead of desired seats)

* Add assertion to `set_approvals` such that amount of candidates to receive approval votes must be greater than zero. Add associated test

* fix: Remove assertion preventing votes when empty seats is 0

* review-fix: Replace with is_zero and add corresponding test

* Update seats.rs

* Update seats.rs
2019-01-07 15:53:37 +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
Shawn Tabrizi 5db38433c2 Small update to documentation of construct_runtime! (#1353)
Documentation says the `default` macro expands to `Module, Call, Storage, Event<T>, Config`, but it actually uses the generic config: `Module, Call, Storage, Event<T>, Config<T>`
2019-01-06 16:44:52 +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