Commit Graph

680 Commits

Author SHA1 Message Date
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
Pierre Krieger 2cb4ed8dcc Fix the public key of bootnode 3 (#441) 2018-07-28 17:33:50 +02:00
Pierre Krieger 53a68d8b9f Update libp2p (#442) 2018-07-28 14:55:43 +01:00
Pierre Krieger b1a3552aa0 Switch to the master branch of libp2p (#427)
* Switch to the master branch of libp2p

* Fixed having to clear manually

* Fix TTL of bootstrap nodes

* Speed up compilation time

* Update libp2p

* Remove obsolete comment
2018-07-28 10:42:26 +01:00
Chevdor 93fb824dfc Export ws port 9944 and add doc (#440)
Fix #437
2018-07-28 09:14:30 +01:00
Sergey Pepyakin 9bcecefbe0 Iterate over overlay to decide which keys to purge (#436) 2018-07-28 09:13:38 +01:00
Arkadiy Paronyan 31db321814 Exit signal gets its own trait (#433)
* Exit signal gets its own trait

* Typo

* Removed clone bounds
2018-07-28 08:31:16 +02:00
Chevdor 97a6db785e Add docker image (#375)
* Add Dockerfile

Add documentation

Ref #375

* Add PORT, VOLUME and reduce size of the docker image significantly

Fix doc and reduce image size

Fix #375

* Fix docker compose
2018-07-27 16:32:12 +02:00
Chevdor e5900d8f17 Reset peers.json if the content is not loadable (#405)
* Reset peers.json if the content is not loadable

Fix #404

* Whitespace
2018-07-27 16:24:28 +02:00
Wei Tang 6d0bed8a65 Limit number of incoming connections (#391)
* Limit number of incoming connections

* Check Endpoint::Listener before checking num_open_connections.incoming

* Maintain at least 1-1/n portion of outgoing connections

* Remove use

* Default incoming_peers_factor to 2

* Use max_incoming_peers and max_outgoing peers to check whether connections should be dropped

* Fix expected_max_peers: reserved peers are not counted in config.max_peers

* typo: fix test
2018-07-27 16:13:27 +02:00
Pierre Krieger 988440a368 Fix memory leaks in libp2p (#432)
* Fix memory leaks in libp2p

* Fix memory leaks in libp2p
2018-07-27 16:09:49 +02:00
Svyatoslav Nikolsky 4491a9fac5 Do not queue empty blocks set for import (#431)
* do not queue empty blocks set for import

* fixed grumbles
2018-07-27 16:09:31 +02:00
Sergey Pepyakin 94be7783e2 5 random fixes (#1) (#435)
* ok_or → ok_or_else

* Correct the sides of the given and expected args

* Indent } properly

* Convert identation from tabs to spaces.

* Convert identation from tabs to spaces. [2]
2018-07-27 15:55:34 +02:00
Bob Liu 06ec2669fe Chore: fix typo (#434) 2018-07-27 14:24:17 +03:00
Arkadiy Paronyan 916131b073 Prevent building invalid blocks (#430)
* Commit extrinsics changes

* Removed panic=abort

* Commit when needed

* Resotre default hook for the native call

* Revert test

* Proper test

* Sorted errors and fixed wasm build
2018-07-27 11:11:47 +02:00
Pierre Krieger 1b0e3e57dd Better logging for public key mismatch (#429) 2018-07-27 09:35:24 +02:00
Chevdor 903ce68809 Subkey fix and refactor (#418)
* Fix bug and refactoring

- Fix panic in some cases
- Extract the generation as a reusable function
- Improve scoring calculation
- Add tests
- Sort the results
- Fix the case when called with a desired pattern either empty or of 1 char
- Add a 'even more' paranoiac mode
- Add benchmarks

Fix #417

* Fixed compilation for nightly
2018-07-26 11:11:52 +02:00
Arkadiy Paronyan debeedfbe8 Substrate CLI (#423)
* Moved chain ops to substrate-service

* moved RPC to susbstrate-service WIP

* Moved RPC to substrate-service

* Version

* Removed redundadnt messages

* substrate CLI

* Removed obsolete files

* Sorted out startup messages

* Pass executable name to CLI
2018-07-25 22:10:09 +02:00
Arkadiy Paronyan 65f0c5f3af Revert chain command (#393)
* Revert chain command

* BLOCKS -> NUM

* Fixed warning
2018-07-24 15:54:34 +02:00
Pierre Krieger e65672575f Add some logging if the timeouts stream ends (#414) 2018-07-24 15:54:19 +02:00
Arkadiy Paronyan 2fdb9cbc29 Keep last finalized overlay in memory until DB commit (#409) 2018-07-24 11:13:04 +02:00
Chevdor bb97684112 WIP: Asciidoc (#407)
* Rename readme

* Add some Asciidoc demo

* Remove extra lines
2018-07-24 11:12:53 +02:00