Commit Graph

1209 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
gabriel klawitter 04175ddc83 [CI] Publish rustdoc (#1446)
* build rust docs and publish them on s3

* fix yaml anchors

* debug i

* debug fix

* typo

* add doc build caching

* cache doc artifacts

* test caching

* more caching, aws tuning

* debug i

* debug ii

* rework caching

* send to substrate_service/index.html per default
2019-01-16 12:17:57 +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
cheme 753ba7306a Document when a GenesisConfig is generated. (#1437)
* Document when a GenesisConfig is generated.

* Use nocompile.
2019-01-15 11:24:59 +01:00
Xiliang Chen 623775ad96 enable dns transport (#1433) 2019-01-15 11:23:32 +01:00
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