It's supposed to find the first step at or after `time`.
To compute that step's timestamp, it needs to add the total length
of all steps since the previous transitions to the timestamp of the
previous transition, not to `time`.
* Block gas limit contract
Lower gas limit if TxPermission.limitBlockGas.
Call blockGasLimit before every block.
Make the block gas limit contract a separate config option.
Add `info` level logging of block gas limit switching
block-gas-limit subcrate and responses to review comments
simplified call_contract_before
moved block_gas_limit_contract_transitions to AuRa params
removed call_contract_before
Update and fix test_verify_block.
Remove some unused imports and functions.
* Move gas limit override check to verify_block_basic.
Co-authored-by: Andreas Fackler <afck@users.noreply.github.com>
* adding a CreateType to ActionParams
* rename calltype to action type
* comments & line lengths
* rebame ActionParams.call_type
* Making call/create type optional
* Moving strict create/call type into trace package instead of storing loosely typed action type
* fix build
* Deriving ActionType from address_scheme in ext.create
* trigger build
* more detailed comments
* Change actions_type to call in vmtests
* skipping serialization for Option::None and using TryFrom instead of maybe_new
* retrigger build
* trigger build
* Fix esoteric test config variable
EIP155 canonically (on Ethereum mainnet, for which these test were developed)
happens simultaneously with EIP158/161 and other "Spurious Dragon" upgrades.
This test is intended to test the transition from the EIP158/161 era (Spurious Dragon)
to the Byzantium era, with Byzantium changes happening at 5.
* Add missing 'modexp' precompiled contract
modexp was introduced via EIP198 as a part of the Byzantium fork,
which this test should be testing against.
* Move all client usages into trusted_client
* Move confirmed hash method to trusted client
* Tree route and logs encapsuluted
* Remove not used method for keys sharing
* NodeKeyPair renamed and moved to trusted client
* Use public key error in trusted client
* Move contract address definition into trusted client
* Block id and number types from ethcore wrapped
* Trusted client renamed to more general Blockchain
* Trusted client implementation moved to parity code
* Move node key pair under secret store feature as well
* Registar crate removed from deps
* Accounts feature removed from secret store
* Fix after merge
* Blockchain renamed to SecretStoreChain
* Module documentations added
* Only use kvdb "column families"
This PR contains the changes necessary to use the `kvdb-*` crates from https://github.com/paritytech/parity-common/pull/278 (so a synchronized merge is required) which drops support for the old-style rocksdb "default" column to get a smaller and less complex API.
As it stands this PR is working correctly except for secret-store; we need to migrate it to use a new column family.
* Fix secretstore build
* Fix secretstore build: include ethkey when building with the "accounts" feature
* typos
* Restore state test commit
* Override all of parity-common from git
* Be precise about version requirement to migrate secretstore code
* Update ethcore/db/src/db.rs
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Address review grumbles
* Review grumbles
* Cleanup
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Add randomness contract support to Authority Round.
Changes have been cherry-picked from poanetwork's aura-pos branch.
Most of the work has been done by @mbr.
* Address review comments for randomness contract.
Co-Authored-By: David <dvdplm@gmail.com>
* Rename revealSecret to revealNumber
* Update Randomness contract bytecode
* Use H256, rename secret to random number.
* Use get_commit_and_cipher
* Clean up Miner::prepare_block.
* Remove is_reveal_phase call.
* Add more comments, require randomness contract map.
* Simplify run_randomness_phase
* Address review comments.
* Remove Client::transact_contract.
* tx-q: basic verification of local transactions
* miner: basic test for local import
* miner: info log when rejecting local txn
* Hernandofmt
Co-Authored-By: Hernando Castano <HCastano@users.noreply.github.com>
* miner: assert in a test with the concrete error type
* tx-q: info! -> warn! on local tx rejection
* secret-store: migrate the db to version 4
* Fix secretstore build
* Fix secretstore build: include ethkey when building with the "accounts" feature
* fix build
* secret-store: actually use new column
* a bunch of fixes
* last nits
* Apply suggestions from code review
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* secret-store: move db stuff to secret-store as per Anton's request
* adds support for ipc socket permissions
* bumped jsonrpc to 14.0.5
* change chmod default to 660, use casting
* set 660 default for --ipc-chmod
Co-Authored-By: Andronik Ordian <write@reusable.software>
* Update parity/cli/mod.rs
Co-Authored-By: David <dvdplm@gmail.com>
* represent octal value as string
* return error for invalid octal values
* fix tests
* check if supplied octal range is within 0 to 7777
* Apply suggestions from code review
Co-Authored-By: Andronik Ordian <write@reusable.software>
* temporary fix
* bump jsonrpc-ipc-server
* fix: update `Cargo.lock`
* Add check for hex values over U256 limit
* Update test in account.rs
Update spec.json field to match test name.
* Update json/src/uint.rs
Co-Authored-By: David <dvdplm@gmail.com>
* Add test for expected deserialisation error
* Update json/src/uint.rs
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Update json/src/uint.rs
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Remove superfluous serialisation test
The test `uint_deserialization_error_for_hex_too_large` sufficiently
covers the need for this test.
* only add transactions to signing-queue if it is enabled
* Update rpc/src/v1/helpers/errors.rs
Co-Authored-By: David <dvdplm@gmail.com>
* use errors::codes::ACCOUNT_LOCKED
* bail early if account isn't unlocked
* use errors::signing
* Update rpc/src/v1/helpers/errors.rs
* Update rpc/src/v1/helpers/errors.rs
* test
* adds cli flag to enable signing queue.
* use helper method siginig_queue_disabled instead of accounts::SignError
* fix typo, use raw i64
* fixed tests
* Use upstream rocksdb
…by way of https://github.com/paritytech/parity-common/pull/257 by @ordian.
* Hint at how `parity db reset` works in the error message
* migration-rocksdb: fix build
* Cargo.toml: use git dependency instead of path
* update to latest kvdb-rocksdb
* fix tests
* saner default for light client
* rename open_db to open_db_light
* update to latest kvdb-rocksdb
* moar update to latest kvdb-rocksdb
* even moar update to latest kvdb-rocksdb
* use kvdb-rocksdb from crates.io
* Update parity/db/rocksdb/helpers.rs
* add docs to memory_budget division
* [ethcore]: apply filter when `from_queue`
In `ready_transactions_filtered` the filter were never applied when
the options PendingSet::AlwaysQueue` was configured which this fixes
It also adds a two tests for it
* [ethcore test-helpers]: stray printlns
* docs(ethcore filter options): more generic desc
* tests(ethcore miner): simply filter tests
* [ethcore filter_options]: fix nits
* doc: nit
Co-Authored-By: David <dvdplm@gmail.com>
* doc: nit
Co-Authored-By: David <dvdplm@gmail.com>
* doc: nit
Co-Authored-By: David <dvdplm@gmail.com>
* doc: nit
Co-Authored-By: David <dvdplm@gmail.com>
* doc: nit
Co-Authored-By: David <dvdplm@gmail.com>
* doc(miner filter): simplify documentation
* [rpc]: make tests compile
* fixed verify_uncles error type
* cleanup and document fn verify_uncles bounds checking
* find_uncle_headers and find_uncle_hashes take u64 instead of u32 as an input param
* Update ethcore/verification/src/verification.rs
Co-Authored-By: David <dvdplm@gmail.com>
* Ensure jsonrpc threading settings are sane
Starting with `jsonrpc` v14, the "server threads" setting is more important than before and the current default of 1 means the https server is effectively single-threaded. This PR proposes a new default of 4 (and ensures that crazy settings like e.g. `0` are bumped to at least `1`).
Also included: some docs, tests and cosmetics.
* Update parity/rpc.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update parity/rpc.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Remove (i.e. deprecate) `--jsonrpc-threads` command line option
* Call numbers NUM
* Don't show a default for --jsonrpc-threads (deprecated)
* Show deprecation warning when using `--jsonrpc-threads` or `processing_threads`
* Update parity/deprecated.rs
Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Fix test
* Fix tests for real
* Add a benchmark for snapshot::account::to_fat_rlps()
`to_fat_rlps()` is a hot call during snapshots. I don't think it has a perf problem per se, but better to have benchmark for it.
The data used is a piece of Ropsten data sized to the ~95% percentile of account size on that network.
* Benchmark with more chunks, including mainnet data
* whitespace
* Move `used_code` inside the benchmark iteration
* Revert "Move `used_code` inside the benchmark iteration"
This reverts commit cff33ab30acbd1c009e745f646f1cc655ee01d8c.