Pierre Krieger
abf64386bb
Improvements to the Kademlia system ( #688 )
2018-09-07 18:56:38 +02:00
Pierre Krieger
28d3c2afe9
Use BufReader and BufWriter ( #684 )
...
* Use BufReader and BufWriter
* Add TODOs
2018-09-07 18:54:51 +02:00
ddorgan
9cdd52f327
Switch to using parity/rust:substrate which has rust nightly-2018-08-31 ( #686 )
2018-09-07 13:26:49 +02:00
Pierre Krieger
af3ad2109f
Update to latest libp2p ( #673 )
2018-09-06 14:56:41 +02:00
Bastian Köcher
b538733a24
Implement storage json metadata ( #670 )
...
* `decl_storage!` exposes json metadata about the storage
The metadata can be accessed by calling `store_json_metadata()`.
* Hide internal macros in the documentation
* Include the function documentation in the store json metadata
* Adapt the storage declarations to use doc comments
2018-09-05 22:53:18 +02:00
David
07a59621cc
impl MaybeEmpty for H256 and u64 (aka AccountId in prod/tests) ( #665 )
...
* impl MaybeEmpty for H256 and u64 (aka AccountId in prod/tests)
* binaries
2018-09-05 22:51:11 +02:00
Arkadiy Paronyan
b50196b389
Speedup compilation ( #671 )
2018-09-05 18:31:47 +02:00
Bastian Köcher
c3e2983af3
Remove requirement of function indices for decl_module! ( #666 )
2018-09-05 13:41:57 +02:00
Svyatoslav Nikolsky
be7cb74b06
DigestItem trait (v2) ( #650 )
...
* DigestItem trait
* removed autoimpl in impl_outer_log
* StubDigestItem -> ()
2018-09-05 13:36:23 +02:00
Gav Wood
101f5ec393
Revert "Install llvm-tools-preview component ( #643 )" ( #644 )
...
This reverts commit 2601392d6a .
2018-09-05 12:13:10 +02:00
Gav Wood
33a2e27c47
Revert "fix wasm executor compile error ( #631 )" ( #642 )
...
This reverts commit b7ef395cc1 .
2018-09-05 12:12:59 +02:00
David
5998a55cc3
Fetch parity-common dependencies from crates ( #617 )
...
* Fetch parity-common dependencies from crates
* Update triehash
* Fix code to fit latest triehash
Fetch kvdb-rocksdb from crates
* type params
* lockfile
* lockfiles
* wasm binaries and lockfile
2018-09-05 11:58:32 +02:00
Svyatoslav Nikolsky
951fbd1f3b
limit retry count in OnDemand ( #513 )
2018-09-05 11:43:39 +02:00
Gav Wood
2ea89556b4
Minor refactor for staking module ( #659 )
...
* Somerhing wrong.
* My attempt to fix
* cfg_attr for serde
* Fix tests
2018-09-05 11:39:47 +02:00
Pierre Krieger
0d422878a3
Upgrade to libp2p master ( #660 )
2018-09-05 09:05:28 +02:00
Bastian Köcher
1efe4a3659
Include function comments into modules json_metadata ( #657 )
...
* Include function comments into modules `json_metadata`
All doc comments (with `///`) are included in the description field of
the function.
Progress on #535
* Replace spaces with tabs
2018-09-05 00:20:29 +02:00
Svyatoslav Nikolsky
8eb4589ca6
Replace old headers with CHT in light clients ( #512 )
...
* storage proofs
* CHT
2018-09-04 21:57:55 +02:00
Gav
a34e990cf2
Fix build
2018-09-04 21:51:13 +02:00
Gav Wood
7657a2326f
Introduce treasury and document ( #646 )
...
* Introduce treasury and document
* Revert bad changes
* More reversions
* Add example crate
- Remove HasPublicAux
- Rename Concrete -> Runtime
* Actually commit stuff
* Changes
* Propagate block number in finalise.
* Fix and build example
* Fixes.
* Fix compilation for treasury.
* Fix the treasury test
* Tests
* Fix.
* Fix tests
* Fix a few grumbles
* Fixes
* Fix grumbles
2018-09-04 17:29:06 +02:00
Gav Wood
69781a7ccc
Off-the-table staking preference ( #656 )
2018-09-04 17:28:50 +02:00
Bastian Köcher
6d149c570d
Implement function json_metadata in decl_module! ( #654 )
...
The new function `json_metadata` returns the module declaration
as a json string.
Progress on: #535
2018-09-04 11:57:26 +02:00
Pierre Krieger
26ebf3a0a0
Fix warnings in networking ( #652 )
2018-09-04 10:26:54 +02:00
Pierre Krieger
360ffa2dbb
Add a reputation system ( #645 )
...
* Add a reputation system
* Fix tests
* Don't try to dial peers to which we are already connected
* Use the master branch of libp2p
2018-09-04 08:52:20 +02:00
Arkadiy Paronyan
146ebceab4
Check for pruned block state ( #648 )
2018-09-03 16:29:55 +02:00
Sergey Pepyakin
73ad673404
Contract runtime polishing ( #601 )
...
* Rename ext_transfer → ext_call
There are several tests where gas was changed. This is due to shrinking
the name and consequently a size of contracts.
* Fix macros
Specifically, make fixes that allows to use a function without arguments (apart from ctx).
For example:
```rust
ext_return_42(ctx) -> u32 => {
Ok(42)
}
```
Also, add impl ConvertibleToWasm for u64.
* Implement passing input data buffer from top-level
This allows the transaction initiator to pass some input data that can be accessed from the executed contract.
However, this only works for the top-level contract. The contract still cannot pass input data to the callee contract. The reason for that is that API doesn't support this presently.
This will be addressed in the following commits.
* Input data passing thru `ext_call`
`ext_call` now takes a buffer (or more specifically, pointer to the start of and size of a buffer).
This allows contracts to pass input data while calling into other contracts.
* Input data passing thru `ext_create`
Same as previous commit but for `ext_create`.
* Trap on decoding error instead of panicking
* Don't cascade failure in ext_call
Instead, if callee doesn't complete successfuly, return a non-zero status code.
This will prevent cascading traps up to the top-level. Due to this some tests were altered so that they now expect successful transfer instead of a failure.
* Don't cascade failure in ext_create
Same as previous commit but for ext_create.
* Specify how much gas to allot for a call
* Specify how much gas to allot for a create
* Update tests.rs
2018-09-01 12:02:10 +02:00
Guanqun Lu
beee3d4092
WIP on chain heap ( #639 )
...
* move heap size on chain
* fix the interface change
* decode heap size
* fix code comments
* fix comment
* update Cargo.lock
* rename to heappages
* add one heap pages variable in runtime
2018-09-01 08:41:46 +02:00
Gav Wood
98a2121a3c
Events to track extrinsic success ( #640 )
...
* Initial draft
* Fixes
* Extrinsic success events
2018-08-31 18:44:37 +02:00
Sergey Pepyakin
2601392d6a
Install llvm-tools-preview component ( #643 )
2018-08-31 18:04:05 +02:00
woodsmur
b7ef395cc1
fix wasm executor compile error ( #631 )
2018-08-31 17:28:47 +02:00
Guanqun Lu
27b5e70baa
random fixes ( #638 )
2018-08-31 14:33:05 +02:00
Gav Wood
cd68c9b001
Empty becomes (), reflecting convention ( #637 )
2018-08-31 14:32:51 +02:00
Benjamin Kampmann
e1d64b1fc7
Allow to build_upon skipped entries, but don't walk back ( #635 )
...
* Allow to build_upon skipped entries, but don't walk back
* Use existing calculated version
2018-08-31 12:51:40 +02:00
Gav Wood
8281618e50
Separate out staking module into balances and payment ( #629 )
...
* Initial commit.
* Split out balances module
* Minimise Balances trait requirements
* Fix up balances, remove balances stuff from staking
* Split off and fix up staking module
* Fix executive tests
* Fix up democracy module
* make council work again
* Remove unneeded cruft from democracy
* Fix up contract module
* Fix up rest of tests
* Fix minor TODOs
* Fix tests
* Remove superfluous code
* Move offline inherents to consensus module.
Fixes #630
* Version needs Decode.
* Move Decode back
* Fix nits
* Refactor to allow custom message
2018-08-30 18:43:38 +02:00
Denis S. Soldatov aka General-Beck
6ae3204f17
Update .gitlab-ci.yml ( #633 )
...
it is necessary to test.
You will probably have to create a cron-job for the nightly assembly of the master branch
2018-08-30 15:21:42 +02:00
ddorgan
bcdb2d7ba0
Do not attempt to rustup if in CI. This is taken care of by the base ( #621 )
...
image.
2018-08-29 15:24:24 +02:00
Gav Wood
28b48842a8
Avoid need for ident strings in storage ( #624 )
...
* Remove need for ident strings for storage items
* Fixes
* Fix tests
* Minor change to macro grammer
2018-08-29 12:29:16 +02:00
Guanqun Lu
6c943bada2
rename to panic_handler as panic_implementation is deprecated in nightly ( #626 )
2018-08-29 11:27:14 +02:00
Sergey Pepyakin
283eb383c0
5 random fixes ( #2 ) ( #623 )
...
* Tabs instead of spaces.
* Remove double spaces.
* Add spaces between ID and the following {
* Update to nightly 2018-08-27
* Align wat code properly
2018-08-29 11:26:44 +02:00
Guanqun Lu
5c8b52ba16
fix one typo in README ( #627 )
2018-08-29 11:25:20 +02:00
Guanghua Guo
758c7bb0be
Misspelled words ( #625 )
...
* Misspelled words
* Update native_executor.rs
2018-08-29 11:24:35 +02:00
Sergey Pepyakin
20655af97b
Contracts: Per block gas limit ( #506 )
...
* Add block gas limit check
* Fix formatting
* Add block_gas_limit test.
* Use ExtBuilder in tests
* Docs and clean-up.
* Correct style
2018-08-28 16:58:27 +01:00
Tomasz Drwięga
3e63009ac7
Make sure to ban invalid transactions. ( #615 ) ( #620 )
2018-08-28 16:47:02 +01:00
Robert Habermeier
a0069f5fe2
Forward-port BFT fixes from v0.2 and restructure agreement cancelling ( #619 )
...
* more accurate consensus superseding logic
* mild revision to `can_build_on` logic
* fix a deadlock when spawning agreement as non-authority
* dropping BFT future before poll doesn't lead to service deadlock
* push cancel to BFTfuture rather than waiting for task
2018-08-28 12:28:28 +01:00
Pierre Krieger
eb10c392ce
Allow specifying listening multiaddresses ( #577 )
2018-08-28 12:16:51 +01:00
Gav Wood
278a054b81
Introduce Runtime Events ( #607 )
...
* Squashed commit.
New slashing mechanism (#554 ) …
* Slashing improvements
- unstake when balance too low
- unstake after N slashes according to val prefs
- don't early-terminate session/era unless unstaked
- offline grace period before punishment
* Fix warning
* Cleanups and ensure slash_count decays
* Bump authoring version and introduce needed authoring stub
* Rename
* Fix offline tracker
* Fix offline tracker
* Renames
* Add test
* Tests
* Tests.
Remove accidental merge files.
Merge remote-tracking branch 'origin/master' into gav-new-pos
Version bump, fixes (#572 ) …
* Bump version, don't propose invalid blocks
* Fix build.
* Fixes.
* More fixes.
* Fix tests.
* Fix more tests
* More tests fixed
Fix merge
Fix accidental merge bug
Fixes.
Staking failsafes …
- Don't slash/unstake/change session when too few staking participants
- Introduce set_balance PrivCall
Make minimum validator count dynamic.
test fixes
Fix tests.
Fix tests
Fix tests, update readme.
Merge remote-tracking branch 'origin/master' into gav-new-pos
Test with release.
Use safe math when dealing with total stake
Fix test again.
Introduce events into runtime.
Fix tests
Add events for account new/reap
Integration-style tests for events.
* Remove old code
2018-08-28 12:11:40 +01:00
Guanghua Guo
f5c684dca6
update substrate/extrinsic-pool ( #616 )
2018-08-28 10:54:22 +01:00
Guanqun Lu
3a58595a85
add a new unit test for extrinsic pool ( #611 )
2018-08-28 10:53:59 +01:00
Guanqun Lu
98f3f80e70
set the current repo in Cargo.toml ( #610 )
2018-08-28 10:53:45 +01:00
Guanqun Lu
25450dc87d
add cli for purge chain ( #609 )
2018-08-28 10:53:28 +01:00
Gav Wood
f59bcd15da
New slashing logic ( #570 )
...
* New slashing mechanism (#554 )
* Slashing improvements
- unstake when balance too low
- unstake after N slashes according to val prefs
- don't early-terminate session/era unless unstaked
- offline grace period before punishment
* Fix warning
* Cleanups and ensure slash_count decays
* Bump authoring version and introduce needed authoring stub
* Rename
* Fix offline tracker
* Fix offline tracker
* Renames
* Add test
* Tests
* Tests.
* Remove accidental merge files.
* Version bump, fixes (#572 )
* Bump version, don't propose invalid blocks
* Fix build.
* Fixes.
* More fixes.
* Fix tests.
* Fix more tests
* More tests fixed
* Fix merge
* Fix accidental merge bug
* Fixes.
* Staking failsafes
- Don't slash/unstake/change session when too few staking participants
- Introduce set_balance PrivCall
* Make minimum validator count dynamic.
* test fixes
* Fix tests.
* Fix tests
* Fix tests, update readme.
* Test with release.
* Use safe math when dealing with total stake
* Fix test again.
* Fix grumbles.
2018-08-27 17:11:04 +02:00