Commit Graph

678 Commits

Author SHA1 Message Date
ddorgan 10e00a4388 Gitlab CI build file for linux. (#552) 2018-08-12 11:14:59 +02:00
Robert Habermeier e8f21cf0c9 Vote out offline authorities (#524)
* notify when an authority appears to have missed their block

* Runtime API

* offline tracker

* Move to consensus

* generating reports of offline indices

* stubbed-out evaluation logic

* Slashing data pathwat

* usize -> u32

* Slash bad validators.

* update to rhododendron 0.3

* fix compilation of polkadot-consensus

* Support offline noting in checked_block

* include offline reports in block authorship voting

* do not vote validators offline after some time

* add test for offline-tracker

* fix test build

* bump spec version

* update wasm

* Only allow validators that are possible to slash

* Fix grumble

* More idiomatic

* New Wasm.

* update rhododendron

* improve logging and reduce round time exponent

* format offline validators in ss58
2018-08-11 11:29:30 +02:00
Robert Habermeier c2b20fe5b0 fix block body fetch for availability pruning (#539) 2018-08-10 16:02:07 +02:00
Arkadiy Paronyan a330f2e058 Continue sync after ancestry search (#538) 2018-08-10 15:29:10 +02:00
Guanqun Lu 6d6e7d9049 Docs Typo Fixes (#534) 2018-08-10 14:03:21 +02:00
Robert Habermeier 4e95cefab9 don't wait for all futures to resolve before shutdown (#536) 2018-08-10 13:56:54 +02:00
Pierre Krieger 3128f258ba Update libp2p and some log (#532)
* Update libp2p and some log and yamux

* Replace trace! with info!

* Only have one log message on disconnect
2018-08-10 13:00:16 +02:00
Gav Wood 8f43742c35 Mh public key for telemetry (#526)
* Expose node public key to telemetry

* unwrap to expect

* Make sure all the zeros are there

* Cleanup
2018-08-10 12:06:36 +02:00
Gav Wood 350f2e6631 Td bps (#527)
* Add blocks per second to informant.

* Add some colours.
2018-08-10 11:18:02 +02:00
Arkadiy Paronyan 9d88d868dd Reserved peers CLI flag (#528) 2018-08-09 20:52:56 +02:00
Gav Wood 36122833a1 Remove safe-mix (#521) 2018-08-09 15:26:01 +02:00
agryaznov b7de4be612 README: fixed typo in docker run command (#518) 2018-08-09 11:55:16 +02:00
Tomasz Drwięga 71bf98ac22 Merge *_at methods. (#515) 2018-08-09 10:12:33 +02:00
Chevdor e7539ca444 New flags to listen to all interfaces (#495)
* Add new flag to allow listening to all interfaces

Fix #439
Fix #494

* Fix capitalisation
2018-08-09 09:00:38 +02:00
Sergey Pepyakin dce3e8c477 If contract reaches max depth, return Err (#503) 2018-08-08 20:11:30 +02:00
Pierre Krieger 6f4a401afa Some networking cleanups (#504)
* Some networking cleanups

* Fix tests

* Fix wrong port in new_local
2018-08-08 20:05:40 +02:00
Tomasz Drwięga 96b3a8f92f Derivable Encode & Decode (#509)
* Derive macro for simple structs.

* Derive Encode/Decode wherever we can.

* Derive for enums.

* Support discriminant.

* Get rid of some repetition.

* Support custom indices.

* Derive codec for enums wherever possible.

* Fix no_std

* WASM rebuilt

* Avoid excessive import.

* Fix compilation.

* Address review grumbles.
2018-08-08 17:47:22 +02:00
André Silva 6eece0174e substrate: return Option in all storage related RPC methods (#510)
* substrate: return Option in all storage related RPC methods

* substrate: remove unused imports

* substrate: remove unused NoValueForKey error variant

* substrate: don't return Option on code_at since code is always defined
2018-08-08 17:46:41 +02:00
Pierre Krieger 9b0c23ac86 Build with locked Cargo.lock on CI (#514) 2018-08-08 17:01:57 +02:00
Sergey Pepyakin 917709dda0 Place call data into a newly allocated pages (#502) 2018-08-07 16:40:25 +02:00
Robert Habermeier 34b4cb8320 Fix some formatting grumbles (#501) 2018-08-06 14:42:39 +03:00
Guanqun Lu a19087eb89 remove the extra ? in the license header (#500) 2018-08-06 13:27:14 +02:00
Pierre Krieger 11b9496a6a NetworkService::new starts the network (#462) 2018-08-06 11:57:08 +02:00
Robert Habermeier 21346f34f8 Availability/Extrinsic store (#465) 2018-08-06 11:55:55 +02:00
Chevdor 13585cc9cc Add doc to install a specific tagged version (#497) 2018-08-05 14:04:27 +02:00
Simon Littlejohns aa7d6f029f --version commit hash - style improvement (#496)
* Update lib.rs

* Update lib.rs

* Update config.rs

* Update lib.rs

* Update lib.rs

* tab correction
2018-08-04 07:39:34 +02:00
Tomasz Drwięga 5eb7b67c2a Send initial values with subscription. (#493)
* Send initial value for heads.

* Send initial values for subscriptions.
2018-08-03 19:38:13 +02:00
Chevdor 1bd19d8511 Improve docker image size with a 2 stages image (#463)
* Improve docker image size with a 2 stages image

* Minor doc updates

* Fix and reduce size of the docker image

* Fix paths in scripts
2018-08-03 19:34:53 +02:00
Benjamin Kampmann 46c9333fff Add Links to Tags and House Style (#413) 2018-08-03 15:53:09 +02:00
Chevdor bac063ea4b Add seed generation tests (#476)
* Fix the --key generation

* Add unit tests

Ref #474
2018-08-03 14:34:17 +02:00
Simon Littlejohns a51622c3fb Added commit hash to --version (#489)
* Update config.rs

* Update lib.rs
2018-08-03 12:29:09 +02:00
icodezjb d50d6b302a use write_all instead of write (#488)
io::Write::write is not guaranteed to process the entire buffer. it return how many bytes were processed, which might be smaller than a given buffer’s length. use write_all instead.
2018-08-03 12:25:21 +02:00
Guanqun Lu 05f49f1d5f should be MAX_IMPORTING_BLOCKS (#486) 2018-08-03 07:54:47 +02:00
David d22ec79359 Use hex_literal in tests, use rustc-hex from crates (#481) 2018-08-02 19:02:55 +02:00
Arkadiy Paronyan 70881b5dc8 Lower bft timeout (#483) 2018-08-02 17:30:51 +02:00
Robert Habermeier 65b66e6bad force BFT delay in consensus service, not in proposer logic (#477)
* move forced delay to consensus service

* fiddle with logging
2018-08-02 17:01:27 +02:00
Robert Habermeier bd3890da7e Collator for the "adder" (formerly basic-add) parachain and various small fixes (#438)
* update basic_add wasm

* wasm feature and collator feature

* move test parachains around a little

* fix wasm build for basic_add

* move basic_add to adder, introduce README

* minimal basic_add collator

* ensure collator messages are sent in the right order

* more logging

* route consensus statements to all peers

* minor bugfixes for parachains

* genesis builder accounts for parachain heads

* fix parachains tests

* targets for txpool

* tweak runtime + collator

* fix version in adder-collator

* consistency for overflowing

* adjust comment

* fix stable test run

* remove dummy registration test

* final grumbles
2018-08-01 17:04:04 +02:00
Tomasz Drwięga 503bcb5686 Storage changes subscription (#464)
* Initial implementation of storage events.

* Attaching storage events.

* Expose storage modification stream over RPC.

* Use FNV for hashing small keys.

* Fix and add tests.

* Swap alias and RPC name.

* Fix demo.

* Addressing review grumbles.

* Fix comment.
2018-08-01 15:29:52 +03:00
Arkadiy Paronyan 098cfcd319 Wasm execution optimizations (#466)
* WASM execution optimizations

* Dropped min-heap-pages

* Fixed tests

* Fixed tests 2
2018-08-01 12:29:45 +01:00
Gav Wood f46c770225 Fix the --key generation (#475) 2018-08-01 12:00:39 +01:00
Guanghua Guo 6c72983e75 Fix typo in service.rs (#472) 2018-08-01 12:15:09 +03:00
Gav Wood 307dcbde1a Fix session phase in early-exit (#453)
* Fix up session phase.

* Version bump

* Fix session rotation properly and add test

* Update runtimes

* Docs
2018-07-31 16:29:34 +01:00
Pierre Krieger 1725fcef18 Merge pull request #454 from yuelipeng/master
Update README.adoc
2018-07-31 11:50:29 +02:00
Pierre Krieger 9dd746e867 Make ping unidirectional (#458) 2018-07-31 10:19:38 +02:00
yuelipeng 65434697cb Update README.adoc
typo fix
2018-07-30 14:49:35 +08:00
Sergey Pepyakin 8c527f2999 Make contract a separate runtime module (#345)
* decl_module and extract runtime mod

* Invert dependency staking←→contract

* Remove CodeOf

* Remove StorageOf and move double_map

* Comment staking test

* Clean

* Add gas_price and gas_limit

* Commit.

* Renames

* Params

* WIP

* Rename transfer to call

* WIP

* Rebuild binaries.

* WIP

* Backport ctro changes

* Call wiring

* Commit overlay.

* Rename merge → commit, into_state → ..._change_set

* WIP

* Contract creation routines

* Set code of the created account.

* Fix the ID of `create` Call

* Fix most of the warning.

* Add the simplest test in the contract crate

* Transfers work!

* Add contract_create test.

* Clean

* Add top-level create test

* Clean a bit.

* Pass gas_limit and data via create.

* Introduce OnAccountKill callback in staking

* Hook up OnAccountKill

* Comments

* Pay for gas.

* Refund unused gas in call

* Tests for zero call and zero endownment.

* Add todo about rewriting docs

* Pay for gas in create transactions

* Fix refunds

* Clean unrelevant comments

* fixup! Fix refunds

* fixup! Clean unrelevant comments

* Move DetermineContractAddress to contract

Also restore account removal test

* fixup! Clean unrelevant comments

* Inline effect_transfer, remove effect_create

Remove account_db!

* Use own new_test_ext.

* Don't account for liability

* Add some docs

* Move contract_fee into contract module

* Take GasMeter in vm::execute

* Use GasMeter throughout contract module for meter

* gas module refactoring

* Clean

* Add base call fee

* note about gas price should be taken from storage

* Add base fee for create

* Rename send → call

* Clean

* Take fee expressed in dots in gas

* Add Checked{Add,Sub,Mul,Div} to SimpleArithmetic

* Make Gas generic

* Store {call,create}_base_fee in storage

* Clean

* Rename buy_gas

* Store gas_price in the storage

* Remove unneeded comment.

* Bail out if contract already has code.

* Todos

* Refund even if top-level contract fails.

* Fix error msg

* Fix caller issue

* Extract tests module

* Add max_depth var in storage

* Remove left over gas_left

* Refactor exec

* Add test oog test.

* set_free_balance_creating

* Docs and comments.

* Update storage roots because of ContractFee move

* Rebuild binaries.

* Simplify vm code.

* Wrapping.

* Refactor a bit.

* Typo

* UpdateBalanceOutcome enum

* Style grumbles.

* Rebuild binaries.

* Always consume the given amount of gas.

* [skip ci] endownment → endowment

* Rename `AccountId` generic in on_account_kill

* Fix Cargo.lock

* Refine docs for gas meter.

* [skip ci] Add comments for gas module

* Directly assign to `return_data` at declaration

* Use slices instead of vecs to pass the input data

* Add todo about passing return data without copy

* Use checked_add instead of add with overflow

* Use return_data directly.

* Rebuild binaries.

* Rebuild binaries.
2018-07-29 14:55:55 +01:00
Gav Wood 5b6dde07dc Version bump (#450)
* Bump version

* Version bump.

* Version bump.
2018-07-29 14:55:06 +01:00
Svyatoslav Nikolsky 859a420ae9 DB-based blockchain data cache for light nodes (#251)
* use db in light clients

* fixed comment

* fixed grumbles

* blockchain data cache

* fixed grumbles

* fix compilation

* keep the last entry in the cache

* fixed grumbles

* fixed reporting of pruned entries
2018-07-29 12:21:18 +01:00
Pierre Krieger fb2a8ada37 Update libp2p again (#445) 2018-07-29 09:56:02 +02:00
Arkadiy Paronyan c709ba1dd0 Update version on git head change (#444) 2018-07-28 19:25:51 +02:00