Commit Graph

2589 Commits

Author SHA1 Message Date
Tomasz Drwięga
c8f57315a8 [stable] Missing AuRa backports (#7499)
* Merge pull request #7368 from paritytech/td-future-blocks

Wait for future blocks in AuRa

* Advance AuRa step as far as we can and prevent invalid blocks. (#7451)

* Advance AuRa step as far as we can.

* Wait for future blocks.

* Problem: AuRa's unsafeties around step duration (#7282)

Firstly, `Step.duration_remaining` casts it to u32, unnecesarily
limiting it to 2^32. While theoretically this is "good enough" (at 3
seconds steps it provides room for a little over 400 years), it is
still a lossy way to calculate the remaining time until the next step.

Secondly, step duration might be zero, triggering division by zero
in `Step.calibrate`

Solution: rework the code around the fact that duration is
typically in single digits and never grows, hence, it can be represented
by a much narrower range (u16) and this highlights the fact that
multiplying u64 by u16 will only result in an overflow in even further
future, at which point we should panic informatively (if anybody's
still around)

Similarly, panic when it is detected that incrementing the step
counter wrapped around on the overflow of usize.

As for the division by zero, prevent it by making zero an invalid
value for step duration. This will make AuRa log the constraint
mismatch and panic (after all, what purpose would zero step duration
serve? it makes no sense within the definition of the protocol,
as finality can only be achieved as per the specification
if messages are received within the step duration, which would violate
the speed of light and other physical laws in this case).

* Fix tests.

* detect different node, same-key signing in aura (#7245)

* detect different node, same-key signing in aura

* reduce scope of warning
2018-01-08 23:09:11 +01:00
Tomasz Drwięga
e1925015c8 [stable] backports (#7496)
* Advance AuRa step as far as we can.

* fixed panic when io is not available for export block, closes #7486 (#7495)

* Update Parity Mainnet Bootnodes

* Replace the Azure HDD bootnodes with the new ones :)

* Bump version.
2018-01-08 16:07:53 +01:00
Afri Schoedon
a5ed4cfc4b Stable Bootnodes and Warpnodes (#7298)
* new warp enodes (#7287)

* new warp enodes

* added one more warp enode; replaced spaces with tabs

* Bump stable to 1.7.11

* Update kovan boot nodes (#7296)

* Fix Cargo.lock

* Updating mainnet bootnodes.

* Update bootnodes (#7363)

* Updating mainnet bootnodes.

* Add additional parity-beta bootnodes.

* Restore old parity bootnodes and update foudation bootnodes
2017-12-28 15:18:40 +01:00
Tomasz Drwięga
cfa197061e Ethstore optimizations (#6827) (#6844) (#7347) 2017-12-27 23:36:01 +01:00
Tomasz Drwięga
39317136c7 [stable] Backports + HF block update (#7243)
* Reduce max block timestamp drift to 15 seconds (#7240)

* reduce max block timestamp drift to 15 seconds

* add test for block timestamp validation within allowed drift

* Update kovan HF block number.
2017-12-11 14:09:46 +01:00
Tomasz Drwięga
f4a496ac8c [stable] Backports + Kovan HF (#7235)
* Merge pull request #7075 from miyao-gmo/feature/estimate_gas_limit

escape inifinite loop in estimte_gas

* Merge pull request #7006 from paritytech/no-uncles

Disable uncles by default

* Maximum uncle count transition (#7196)

* Enable delayed maximum_uncle_count activation.

* Fix tests.

* Defer kovan HF.

* Bump version.

* Kovan HF.

* Update Kovan HF block.

* Fix compilation issues.

* Fix aura test.

* Add missing byzantium builtins.

* Fix tests.

* Bump version for installers.

* Increase allowed time drift to 10s. (#7238)
2017-12-08 13:08:01 +01:00
arkpar
d5fcf3b8ed
Fixed build 2017-10-25 12:06:04 +02:00
Tomasz Drwięga
6bb3edeb8a [stable] Refactor static context check in CREATE (#6889)
* Refactor static context check in CREATE.

* Fix evm tests.
2017-10-25 11:52:32 +02:00
Arkadiy Paronyan
be23afd1cd Bumped fork block for the auto updater (#6754) 2017-10-14 15:05:52 +02:00
Arkadiy Paronyan
19535333c9 [stable] Fixed modexp gas calculation overflow (#6741) (#6746)
* Fixed modexp gas calculation overflow (#6741)

* v1.7.6
2017-10-13 16:20:27 +02:00
arkpar
83825befea
Fixed RETURNDATA out of bounds check 2017-10-12 18:21:48 +02:00
arkpar
4e93537e45
Prevent going offline when restoring or taking snapshot 2017-10-12 18:16:23 +02:00
Arkadiy Paronyan
a21db69686 Backporting #6686 and #6691 (#6712)
* v1.7.4

* Fixed potential exp len overflow (#6686)

* Fix warp sync blockers detection
2017-10-11 20:34:36 +02:00
Arkadiy Paronyan
2d4f4bdd61 [beta] Backporting (#6675)
* Required validators >= num owners (#6551)

* Debounce sync status. (#6572)

* Fixed network protocol version negotiation

* Renamed RPC receipt statusCode field to status

* Fixed RETURNDATA size for built-ins
2017-10-09 13:07:57 +02:00
arkpar
e535174604
Byzantium fork block number 2017-10-06 10:02:22 +02:00
Arkadiy Paronyan
083b69ffb1 [beta] Backports (#6563)
* Sync progress and error handling fixes (#6560)

* Fixed receipt serialization and RPC (#6555)

* v1.7.3
2017-09-21 11:42:58 +02:00
Tomasz Drwięga
9f47909edf Fix output from eth_call. (#6538) 2017-09-18 12:09:52 +02:00
Arkadiy Paronyan
be6fe6b005 Ropsten fork (#6532) 2017-09-18 11:12:48 +02:00
Arkadiy Paronyan
bb311e838b [beta] Byzantium updates (#6529)
* fix modexp bug: return 0 if base=0 (#6424)

* Running state test using parity-evm (#6355)

* Initial version of state tests.

* Refactor state to support tracing.

* Unify TransactResult.

* Add test.

* Byzantium updates
2017-09-16 12:21:35 +02:00
Tomasz Drwięga
3e60b221c8 Allow hardware device reads without lock. (#6517) 2017-09-15 14:47:24 +02:00
Tomasz Drwięga
980418898a [beta] Backports (#6497)
* Fix slow balances (#6471)

* Update token updates

* Update token info fetching

* Update logger

* Minor fixes to updates and notifications for balances

* Use Pubsub

* Fix timeout.

* Use pubsub for status.

* Fix signer subscription.

* Process tokens in chunks.

* Fix tokens loaded by chunks

* Linting

* Dispatch tokens asap

* Fix chunks processing.

* Better filter options

* Parallel log fetching.

* Fix signer polling.

* Fix initial block query.

* Token balances updates : the right(er) way

* Better tokens info fetching

* Fixes in token data fetching

* Only fetch what's needed (tokens)

* Fix linting issues

* Revert "Transaction permissioning (#6441)"

This reverts commit eed0e8b03a.

* Revert "Revert "Transaction permissioning (#6441)""

This reverts commit 8f96415e58dde652e5828706eb2639d43416f448.

* Update wasm-tests.

* Fixing balances fetching

* Fix requests tracking in UI

* Fix request watching

* Update the Logger

* PR Grumbles Fixes

* PR Grumbles fixes

* Linting...

* eth_call returns output of contract creations (#6420)

* eth_call returns output of contract creations

* Fix parameters order.

* Save outputs for light client as well.

* Don't accept transactions above block gas limit.

* Expose health status over RPC (#6274)

* Node-health to a separate crate.

* Initialize node_health outside of dapps.

* Expose health over RPC.

* Bring back 412 and fix JS.

* Add health to workspace and tests.

* Fix compilation without default features.

* Fix borked merge.

* Revert to generics to avoid virtual calls.

* Fix node-health tests.

* Add missing trailing comma.

* Fixing/removing failing JS tests.

* do not activate genesis epoch in immediate transition validator contract (#6349)

* Fix memory tracing.

* Add test to cover that.

* ensure balances of constructor accounts are kept

* test balance of spec-constructed account is kept
2017-09-11 18:01:02 +02:00
Tomasz Drwięga
b7324bf771 Patch eth_call (#6366) 2017-08-24 09:16:32 +02:00
Arkadiy Paronyan
f90bdcd1e5 [beta] Backporting (#6352)
* Better check the created accounts before showing Startup Wizard

* Tweaked snapshot params
2017-08-22 15:51:01 +02:00
Arkadiy Paronyan
7bf840f80a [beta] Increase default gas limit for eth_call (#6337)
* Increase default gas limit for eth_call.

* Fix balance increase.

* Cap gas limit for dapp-originating requests.
2017-08-20 14:14:32 +08:00
Arkadiy Paronyan
4992064663 [beta] Backports (#6333)
* overflow check in addition

* add test

* Unexpose methods on UI RPC. (#6295)

* Add more descriptive error when signing/decrypting using hw wallet.

* format instant change proofs correctly

* propagate stratum submit share error upstream, fixes #6258 (#6260)

* updated jsonrpc (#6264)

* Using multiple NTP servers (#6173)

* Small improvements to time estimation.

* Allow multiple NTP servers to be used.

* Removing boxing.

* Be nice.

* Be nicer.

* Update list of servers and add reference.

* Fix dapps CSP when UI is exposed externally (#6178)

* Allow embeding on any page when ui-hosts=all and fix dev_ui

* Fix tests.

* Fix cache path when using --base-path (#6212)

* Time should not contribue to overall status. (#6276)

* v1.7.1
2017-08-19 22:10:19 +02:00
Arkadiy Paronyan
65e4bad3dd [beta] Backports (#6163)
* Light client improvements (#6156)

* no seal checking

* import command and --no-seal-check for light client

* fix eth_call

* tweak registry dapps lookup

* ignore failed requests to non-server peers

* Fix connecting to wildcard addresses. (#6167)

* Don't display an overlay in case the time sync check fails. (#6164)

* Small improvements to time estimation.

* Temporarily disable NTP time check by default.
2017-07-27 18:46:09 +02:00
Arkadiy Paronyan
a554b81f32 light client fixes (#6148) (#6151)
* light client fixes

* fix memory-lru-cache

* clear pending reqs on disconnect
2017-07-26 15:51:35 +02:00
Robert Habermeier
3f7ac5c64b remove chunk to restore from pending set only upon successful import (#6117) 2017-07-21 18:16:49 +02:00
Arkadiy Paronyan
6a564f3334 Place RETURNDATA behind block number gate (#6095) 2017-07-19 15:57:04 +02:00
Arkadiy Paronyan
6f2ec07baa Bump snap version and tweak importing detection logic (#6079) (#6081)
* bump last tick just before printing info and restore sync detection

* bump kovan snapshot version

* Fixed sync tests

* Fixed rpc tests
2017-07-18 18:38:07 +02:00
Denis S. Soldatov aka General-Beck
96e60d9c91 fix docker build in beta 2017-07-18 16:13:19 +03:00
Tomasz Drwięga
1aaafa2d11 Limit transaction queue memory & limit future queue (#6038)
* Remove confusing gas_limit in the pool.

* Change defaults

* Limit transaction queue by memory usage.

* Change defaults to something lower.

* Fix rpc test.

* Fix js issues.

* Renamed block_gas_limit
2017-07-13 15:12:25 +02:00
keorn
22261bc2d1 New contract PoA sync fixes (#5991)
* generate proofs on newly-created state

* report only missed steps after first block

* dont report skipped if not signer

* test

* finality tracing and passing valid header to `commit_block`

* avoid proposing multiple times on the same step when validator set changes

* limit benign reports

* Ordering -> AtomicOrdering

* reinstate warning now that spam is reduced

* flush pending transition changes when necessary

* ensure epochs aren't re-zoomed on every block
2017-07-13 09:48:00 +02:00
Robert Habermeier
d365281cce Ethcore crate split part 1 (#6041)
* split out types into separate crate

* split out evm into its own crate
2017-07-12 13:09:17 +02:00
Joseph Mark
0fca4f95d6 Errors & warnings for inappropriate RPCs (#6029)
* Clarify function name

Function checks if sealing is currently underway, not to be confused
with checking whether the engine performs internal sealing.

* Error when work called on internal sealing engine

* Error submitting work for internal sealing engine

* Fix inverted bool and style grumbles

* Add can_produce_work_package to TestMinerService

* Error when setting engine signer on PoW chain

* Unit tests for engine signing

Setting engine signer should fail if chain does not seal internally
or client lacks account provider.

* Tweak TestMinerService

* Fix minor style grumbles
2017-07-12 08:52:18 +02:00
Nikolay Volf
dc51dde112 update deps (#6036) 2017-07-11 12:06:35 +03:00
Axel Chalon
d970237658 Add test for loading the chain specs (#6028)
* Add test for loading the json chain specs

* Remove test on Ethereum specs as it already exists
2017-07-10 19:26:10 +02:00
Nikolay Volf
62210fb932 WASM contracts MVP (#5679)
* lifetime issues

* refactor to new 'native env'

* descriptors and such

* wasm mvp continued

* finalized env/ext bindings

* descriptor -> call_args

* inject gas counter

* result processing and engine activation

* tabify some source files

* needs return new

* wasm tests initial

* erradicate warnings

* origin in the descriptor

* update test repo

* payload verification tests

* identity return payload test

* some test description

* dispersion test

* check length here

* suicidal contract

* engine params

* fix typo

* review fixes

* submodule update

* update - purge reserved space

* doc effort

* more review fixes

* fix error message

* fix dependency url

* reorg error handling

* update submodule

* update utils

* update to latest parity-wasm

* tabify

* fix wasm magic header

* update dependencies

* external create and tests

* update to latest tests

* extra trace info

* Update parity-wasm

* update wasm-utils also

* few traces and result handle change

* alter trace content

* fix issues with optimizer, update to latest parity with validator, etc

* static initialization

* license preamble

* update wasm crates and gas costs

* fix grumbles

* bring back lifetime

* fix compilation
2017-07-10 17:42:10 +02:00
Arkadiy Paronyan
15aebacbe7 --reseal-on-uncle (#5940)
* --reseal-on-uncle

* Optimized uncle check

* Additional uncle check

* Updated comment
2017-07-10 13:36:42 +02:00
Tomasz Drwięga
f4453f77b8 Fix output of parity-evm in case of bad instruction (#5955)
* Fix output of evmbin.

* Use foundation chain settings by default.
2017-07-10 13:23:40 +02:00
Robert Habermeier
67c1f71b6e Proper light client informant and more verification of imported headers (#5897)
* do more validation of imported headers in light client

* generalize informant with traits

* informant implementation for light client

* make comment into TODO

* fix broken test

* disable full checking of headers in light client in sync tests
2017-07-10 13:21:11 +02:00
keorn
f0a6b5d401 azure nodes (#6017) 2017-07-10 13:05:05 +02:00
Tomasz Drwięga
a24b6ad983 Use standard paths for Ethash cache (#5881)
* Use cache path to store ethash files.

* Fixing tests, more flexible API.

* Use AsRef<Path> everywhere.

* Fixing ethcore tests.

* Fix RPC tests.
2017-07-10 12:57:40 +02:00
Robert Habermeier
125aa0aeb4 Merge pull request #5959 from paritytech/dont-compute-hash
Defer code hash calculation.
2017-07-06 19:00:19 +02:00
debris
1c2a4c116a Merge branch 'master' into serdeup 2017-07-06 11:43:46 +02:00
debris
61d8f90530 updated serde to version 1.0 2017-07-06 11:36:15 +02:00
Marek Kotewicz
46183b1cdd bigint upgraded to version 3.0 (#5986)
* bigint upgraded to version 3.0

* fixed missing FromHex import in ethcore tests

* fixed missing FromHex import in rpc tests
2017-07-06 11:26:14 +02:00
Vurich
2e90e02a2c Fix underflow 2017-07-03 17:43:03 +02:00
Robert Habermeier
cc718bb108 Merge pull request #5958 from Vurich/peer-status
Report whether a peer was kept from `Handler::on_connect`
2017-07-03 16:22:50 +02:00
Robert Habermeier
826a4ca0a2 Implement skeleton for transaction index and epoch transition proof PIP messages (#5908)
* add transaction index message without implementing

* add epoch proof fetch and response messages
2017-07-03 12:25:10 +02:00