I _believe_ (someone please double-check my work) that this comment is subtly incorrect and in fact the replacement will occur if the new gas price is exactly 12.5% (given current configuration) higher.
Relevant pieces of code:
```rust
fn bump_gas_price(old_gp: U256) -> U256 {
old_gp.saturating_add(old_gp >> GAS_PRICE_BUMP_SHIFT)
}
```
```rust
let min_required_gp = bump_gas_price(*old_gp);
match min_required_gp.cmp(&new_gp) {
cmp::Ordering::Greater => scoring::Choice::RejectNew,
_ => scoring::Choice::ReplaceOld,
}
```
* WIP move errors, pod_account and state account to own crates
* Sort out dependencies, fix broken code and tests
Remove botched ethcore-error crate
* remove template line
* fix review feedback
* Remove test-only AccountDBMut::new
* Extract AccountDB to account-db
* Move Substate to state-account – wip
* Add lib.rs
* cleanup
* test failure
* test failure 2
* third time's the charm
* Add factories crate
* Use new factories crate
* Use factories crate
* Extract trace
* Fix tests
* Sort out parity-util-mem and parking_lot
* cleanup
* WIP port over the rest of state from ethcore
* Collect all impls for Machine
* some notes
* Rename pod-account to pod
* Move PodState to pod crate
* Use PodState from pod crate
* Fix use clause for json tests
* Sort out evmbin
* Add missing code and use PodState
* Move code that depends on Machine and Executive to own module
* Sort out cloning errors, fix ethcore to use new state crate
* Do without funky From impls
* Fix ethcore tests
* Fixes around the project to use new state crate
* Add back the more specific impls of StateOrBlock From conversions
* Move execute to freestanding function and remove it from trait
Sort out the error handling in executive_state by moving the result types from state to ethcore
Undo the verbose code added to work around the StateOrBlock From conversions
* cleanup
* Fix "error: enum variants on type aliases are experimental"
* Bring back the state tests
Fix whitespace
* remove ethcore/state/mod.rs
* cleanup
* cleanup
* Cleanup state-account errors
* Fix more todos
Add module docs
* Add error.rs
* Fixup Cargo.lock
* Smaller ethcore API is fine
* Add `to-pod-full` feature to state-account
Fix evmbin
* Fix a few more test failures
* Fix RPC test build
* Baptize the new trait
* Remove resolved TODOs
* Rename state-account to account-state
* Do not re-export the trace crate
* Don't export state_db from ethcore
* Let private-tx use StateDB. :(
* Remove ethcore/src/pod_state.rs
* Inner type does not need to be pub/pub(crate)
* optimise imports
* Revert "Inner type does not need to be pub/pub(crate)"
This reverts commit 2f839f8a0f72f71334da64620f57e6dd6039f06b.
* Move DatabaseExtras to ethcore-blockchain
* Add database_extra module to ethcore-blockchain
* Remove to-pod-full feature
* cosmetics
* New crate: state-db
* Add new crate
* Move PreverifiedBlock and BlockError to types
* Sort out the merge
* Add missing `license` meta data keys
* wip
* wip client-traits
* merge conflict
* verification crate type checks
* Move impls for CommonParams to common_types
Fix misc stuff in ethcore
* Fix tests
* Implement VerifyingEngine for all engines except Ethash
Temporarily sort out error handling
Move more types to common_types
* Split Engine in two and move code around
* cleanup
* verification: don't rexport common_types
* Use error from common_types
* Consolidate error types
* VerifyingEngine use Errors from common_types
* verification: Use error type from common_types
* SnapshotError moved to common_types
* Move more code from Engne to VerifyingEngine
Add a VerifyingClient trait: BlockInfo + CallContract
Whitespace
* Add MAX_UNCLE_AGE const
* Port over remaining code from ethcore/verification
* Use errors from common_types
* Fix the confusing "io" naming
* Move more types into common_types
* Add todos
* Experiment with Engine trait outside ethcore
* Hook up types from common_types in ethcore
Don't use verification crate
Don't use client-traits crate
* Revert to impl Engine for Arc<Ethash> and add note to explain why
Revert moving ClientIoMessage to common_types
Fix build
* Remove ClientIoMessage from common_types
* Cleanup
* More cleanup
* Sort error handling changes in the rest of parity
* Remove unused code
* Remove WIP types
* Cleanup todos not tackled here
* remove cruft
* Fix some whitespace and a merge error
* ethcore tests
* test failures
* Restore Engine impls to master to make review a bit easier
* cleanup
* whitespace
* applied review suggestions
* types does not depend on rustc-hex
* ethash engine moved to engine module
* applied review suggestion
* Move DatabaseExtras back to trace
Add a new BlockChainWithExtras newtype to ethcore
Impl DatabaseExtras for BlockChainWithExtras
* Avoid double Arcs
Impl From for BlockChainWithExtras for convenient instantiation
Change TraceDB::new to take a T: DatabaseExtras (instead of an Arc)
* Use local type for BlockNumber and reduce dependencies
* Update ethcore/src/client/client.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update ethcore/src/client/client.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Revert "Update ethcore/src/client/client.rs"
This reverts commit cbf8a251d4acaff8b29e999aedcdaac473ddf300.
* Revert "Update ethcore/src/client/client.rs"
This reverts commit 2518873b3139e832fa57c11793624bf1bfe48d05.
* address grumbles
* Be explicit about using the BlockProvider provided block_hash()
* whisper is no longer a part of parity-ethereum repo
* fix failing tests
* update whisper help with the link to the new repo
* Removed AttachedProtocols
* updated whisper info in README.md files
* Update parity/deprecated.rs
Co-Authored-By: Andronik Ordian <write@reusable.software>
* Run cargo fix on `vm`
* Run cargo fix on ethcore-db
* Run cargo fix on evm
* Run cargo fix on ethcore-light
* Run cargo fix on journaldb
* Run cargo fix on wasm
* Missing docs
* Run cargo fix on ethcore-sync
* WIP move errors, pod_account and state account to own crates
* Sort out dependencies, fix broken code and tests
Remove botched ethcore-error crate
* remove template line
* fix review feedback
* Remove test-only AccountDBMut::new
* Extract AccountDB to account-db
* Move Substate to state-account – wip
* Add lib.rs
* cleanup
* test failure
* test failure 2
* third time's the charm
* Add factories crate
* Use new factories crate
* Use factories crate
* Extract trace
* Fix tests
* Sort out parity-util-mem and parking_lot
* cleanup
* WIP port over the rest of state from ethcore
* Collect all impls for Machine
* some notes
* Rename pod-account to pod
* Move PodState to pod crate
* Use PodState from pod crate
* Fix use clause for json tests
* Sort out evmbin
* Add missing code and use PodState
* Move code that depends on Machine and Executive to own module
* Sort out cloning errors, fix ethcore to use new state crate
* Do without funky From impls
* Fix ethcore tests
* Fixes around the project to use new state crate
* Add back the more specific impls of StateOrBlock From conversions
* Move execute to freestanding function and remove it from trait
Sort out the error handling in executive_state by moving the result types from state to ethcore
Undo the verbose code added to work around the StateOrBlock From conversions
* cleanup
* Fix "error: enum variants on type aliases are experimental"
* Bring back the state tests
Fix whitespace
* remove ethcore/state/mod.rs
* cleanup
* cleanup
* Cleanup state-account errors
* Fix more todos
Add module docs
* Add error.rs
* Fixup Cargo.lock
* Smaller ethcore API is fine
* Add `to-pod-full` feature to state-account
Fix evmbin
* Fix a few more test failures
* Fix RPC test build
* Baptize the new trait
* Remove resolved TODOs
* Rename state-account to account-state
* Do not re-export the trace crate
* Don't export state_db from ethcore
* Let private-tx use StateDB. :(
* Remove ethcore/src/pod_state.rs
* Inner type does not need to be pub/pub(crate)
* optimise imports
* Revert "Inner type does not need to be pub/pub(crate)"
This reverts commit 2f839f8a0f72f71334da64620f57e6dd6039f06b.
* Move DatabaseExtras to ethcore-blockchain
* Add database_extra module to ethcore-blockchain
* Remove to-pod-full feature
* cosmetics
* New crate: state-db
* Add new crate
* Sort out the merge
* Fix unclean merge
* Add license
* Fix fork choice:
`is_from_route_finalized` check before switching to parent
* Add tests for `tree_route` with finalization
* Fix Cargo dependencies
* Add comment on `tree_route` for finalization.
Refactor a test.
* Fix compilation error
* Checkout Cargo.lock from master
* WIP move errors, pod_account and state account to own crates
* Sort out dependencies, fix broken code and tests
Remove botched ethcore-error crate
* remove template line
* fix review feedback
* Remove test-only AccountDBMut::new
* Extract AccountDB to account-db
* Move Substate to state-account – wip
* Add lib.rs
* cleanup
* test failure
* test failure 2
* third time's the charm
* Add factories crate
* Use new factories crate
* Use factories crate
* Extract trace
* Fix tests
* Sort out parity-util-mem and parking_lot
* cleanup
* WIP port over the rest of state from ethcore
* Collect all impls for Machine
* some notes
* Rename pod-account to pod
* Move PodState to pod crate
* Use PodState from pod crate
* Fix use clause for json tests
* Sort out evmbin
* Add missing code and use PodState
* Move code that depends on Machine and Executive to own module
* Sort out cloning errors, fix ethcore to use new state crate
* Do without funky From impls
* Fix ethcore tests
* Fixes around the project to use new state crate
* Add back the more specific impls of StateOrBlock From conversions
* Move execute to freestanding function and remove it from trait
Sort out the error handling in executive_state by moving the result types from state to ethcore
Undo the verbose code added to work around the StateOrBlock From conversions
* cleanup
* Fix "error: enum variants on type aliases are experimental"
* Bring back the state tests
Fix whitespace
* remove ethcore/state/mod.rs
* cleanup
* cleanup
* Cleanup state-account errors
* Fix more todos
Add module docs
* Add error.rs
* Fixup Cargo.lock
* Smaller ethcore API is fine
* Add `to-pod-full` feature to state-account
Fix evmbin
* Fix a few more test failures
* Fix RPC test build
* Baptize the new trait
* Remove resolved TODOs
* Rename state-account to account-state
* Do not re-export the trace crate
* Don't export state_db from ethcore
* Let private-tx use StateDB. :(
* Remove ethcore/src/pod_state.rs
* Inner type does not need to be pub/pub(crate)
* optimise imports
* Revert "Inner type does not need to be pub/pub(crate)"
This reverts commit 2f839f8a0f72f71334da64620f57e6dd6039f06b.
* Move DatabaseExtras to ethcore-blockchain
* Add database_extra module to ethcore-blockchain
* Remove to-pod-full feature
* Sort out the merge
* sort imports
* address grumbles
* rename crate
* address more grumbles
* Stop breaking out of loop if a non-canonical hash is found
* include expected hash in log msg
* More logging
* Scope
* Syntax
* Log in blank RollingFinality
Escalate bad proposer to warning
* Check validator set size: warn if 1 or even number
* More readable code
* Use SimpleList::new
* Extensive logging on unexpected non-canonical hash
* Wording
* wip
* Update ethcore/blockchain/src/blockchain.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Improved logging, address grumbles
* Update ethcore/src/engines/validator_set/simple_list.rs
Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com>
* Report benign misbehaviour iff currently a validator
* Report malicious behaviour iff we're a validator
* Escalate to warning and fix wording
* Test reporting behaviour
Don't require node to be part of the validator set to report malicious behaviour
* Include missing parent hash in MissingParent error
* Update ethcore/src/engines/validator_set/simple_list.rs
Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com>
* docs
* remove unneeded into()
Move check for parent_step == step for clarity&efficiency
Remove dead code for Seal::Proposal
* typo
* Wording
* naming
* WIP
* cleanup
* cosmetics
* cosmetics and one less lvar
* spelling
* Better loggin when a block is already in chain
* More logging
* On second thought non-validators are allowed to report
* cleanup
* remove dead code
* Keep track of the hash of the last imported block
* Let it lock
* Serialize access to block sealing
* Take a lock while sealing a block
* Cleanup
* whitespace
* WIP move errors, pod_account and state account to own crates
* Sort out dependencies, fix broken code and tests
Remove botched ethcore-error crate
* remove template line
* fix review feedback
* Remove test-only AccountDBMut::new
* Extract AccountDB to account-db
* test failure
* test failure 2
* third time's the charm
* First draft: pass the parent block header to on_close_block
* typos and cleanup
* whitespace
* Store parent in ClosedBlock as well so it can be reopen()'d
* Don't pass parent when reopening a block
* Remove the unused ancestry param
* tests: Relates to #10655: Test instructions for Readme
* Add instructions to run tests
* Update instructions to view docs
* fix: Fix link to package list
* fix: Move link to line about title of package list
* Update README.md
* fix: Replace multirust with rustup wince multirust is deprecated
* docs: Update evmbin Rust docs and code comments
* WIP: Add Response struct. Initial step using serde to serialize instead of hardcoding with JSON
* fix: Update Response struct types to be string after formatting
* fix: Fix move out of borrowed content error by cloning informant
* refactor: Change from camelcase to snake case to fix linting errors
* restore: Restore some code since now covered in separate PR #10658
* restore: Restore original Rustdocs of evmbin
* WIP
* add Clone type
* add newlines to end of json files
* remove uml file that was unintentionally commited
* rename chain spec to state test JSON fle
* remove log. fix indentation
* revert: Restore indentation now handled by separate PR #10740
* remove state test json files as moved to PR #10742
* revert changes in info.rs since covered in PR #10742
* revert changes to main.rs since covered in PR #10742
* revert newlines back to master
* revert newlines back to master2
* refactor: Rename Response to TraceData
* fix: Remove Clone and replace with lifetimes. Update tests since not ordered
* refactor: Change all json! to typed serde
* docs: Update rustdocs. Remove fixme
* fix: Add missing semicolons from printf
* fix: Change style from unwrap to expect in evmbin/src/display/json.rs
Co-Authored-By: Andronik Ordian <write@reusable.software>
* fix: Change style from unwrap to expect in evmbin/src/display/std_json.rs
Co-Authored-By: Andronik Ordian <write@reusable.software>
* revert updating module comments as will be done in separate PR #10742 instead
* review-fix: Remove useless reference
* Remove unncessary use of format macro
* Update evmbin/src/display/json.rs
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Update evmbin/src/display/json.rs with serialization in set_gas success
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Update evmbin/src/display/json.rs with serialization in set_gas failure
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Update evmbin/src/display/std_json.rs with serialization in finish for state root
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Update evmbin/src/display/std_json.rs with serialization in before_test
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Update evmbin/src/display/std_json.rs with serialization for state root
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Update evmbin/src/display/std_json.rs with serialization for finish success
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Update evmbin/src/display/std_json.rs with serialization for finish failure
Co-Authored-By: Andronik Ordian <write@reusable.software>
* refactor: Rename structs and variables. Remove space. Simplify MessageInitial struct
* refactor: Captialize expect message
* revert to previous struct name TraceDataStateRoot
* refactor: Simplify variable for consistency
* Update accounts/ethstore/src/json/crypto.rs
Co-Authored-By: David <dvdplm@gmail.com>