| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
deepCopy didn't copy pending storage updates, leading to the
creation of blocks with invalid state root.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* les: detailed relative cost metrics
* les: filter txpool relative request statistic
* les: initialize price factors
* les: increased connected bias to lower churn rate
* les: fixed clientPool.setLimits
* core: do not use mutex in GetAncestor
* les: bump factor db version again
* les: add metrics
* les, light: minor fixes
|
| |
|
|
|
|
|
|
| |
* txpool: smaller lock portion
* core/tx_pool: fix data race
|
| |
|
| |
|
| |
|
|\
| |
| | |
core/state: optimize some internals during encoding
|
| | |
|
|/ |
|
|\
| |
| | |
cmd, core, eth, les: support --override.istanbul
|
| | |
|
|\ \
| |/
|/| |
core/vm: enable istanbul EIPs in the jump table
|
| | |
|
|/
|
| |
Original change by @jpeletier
|
|
|
|
|
|
| |
* core: log chain reorg/split metrics
* core: report 1-block reorgs on the metrics too
|
|\
| |
| |
| |
| | |
keep-network/istanbul-eip-152-blake2b-f-precompile
core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The precompile at 0x09 wraps the BLAKE2b F compression function:
https://tools.ietf.org/html/rfc7693#section-3.2
The precompile requires 6 inputs tightly encoded, taking exactly 213
bytes, as explained below.
- `rounds` - the number of rounds - 32-bit unsigned big-endian word
- `h` - the state vector - 8 unsigned 64-bit little-endian words
- `m` - the message block vector - 16 unsigned 64-bit little-endian words
- `t_0, t_1` - offset counters - 2 unsigned 64-bit little-endian words
- `f` - the final block indicator flag - 8-bit word
[4 bytes for rounds][64 bytes for h][128 bytes for m][8 bytes for t_0]
[8 bytes for t_1][1 byte for f]
The boolean `f` parameter is considered as `true` if set to `1`.
The boolean `f` parameter is considered as `false` if set to `0`.
All other values yield an invalid encoding of `f` error.
The precompile should compute the F function as specified in the RFC
(https://tools.ietf.org/html/rfc7693#section-3.2) and return the updated
state vector `h` with unchanged encoding (little-endian).
See EIP-152 for details.
|
| |
| |
| | |
les: handler separation
|
| |
| |
| |
| |
| |
| |
| |
| | |
* blockchain: fix flaw in block import
* core/blockchain: address review concerns
* core/blockchain: go format with 's'
|
|/
|
|
|
|
| |
* core/vm, params: implement EIP2200, SSTORE optimizations
* core/vm, params: switch EIP2200 to Wei's version
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core, light, params: implement eip2028
* core, light: address comments
* core: address comments
* tests: disable Istanbul tx tests (until updated)
* core: address comment
|
|
|
|
|
|
| |
* core, trie: decode the value for storage dump
* core/state: address comment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* graphql, internal/ethapi: extend eth_call
This PR offers the third option parameter for eth_call API.
Caller can specify a batch of contracts for overriding the
original account metadata(nonce, balance, code, state).
It has a few advantages:
* It's friendly for debugging
* It's can make on-chain contract lighter for getting rid of
state access functions
* core, internal: address comments
|
|
|
|
|
|
| |
* core/vm: implement EIP 1344 (ChainID opcode)
* core/vm: formatting
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core/vm, tests: implement EIP 1884, add support for feature-tests
* core/vm: 1884-changes to extcodehash, move selfbalance opcode
* tests: fix statetests
* core/vm: move constants, address review concerns
* core/vm: word formatting
Co-Authored-By: Péter Szilágyi <peterke@gmail.com>
|
|
|
|
|
|
| |
* core/vm:modify comment errors
* modify its back to it's
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* params: add IsIstanbul to config + rules
IstanbulBlock, used to determine if the config IsIstanbul, is currently
left nil until an actual block is chosen.
* params, core/vm: implement EIP-1108
Old gas costs for elliptic curve operations are given the PreIstanbul
prefix, while current gas costs retain the unprefixed names. The actual
precompile implementations are the same, so they are factored out into
common functions that are called by the pre-Istanbul and current
precompile structs. Finally, an Istanbul precompile list is added that
references the new precompile structs, which in turn reference the new
gas costs.
* params: fix fork ordering, add missing chain compatibility check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* params, core/vm: deprecating gastable, part 1
* core/vm, params: deprecate gastable, use both constant and dynamic gas
* core/vm, params: remove gastable, remove copypaste
* core/vm: make use of the chainrules
* interpreter: make tracing count constant+dynamic gas
* core/vm: review concerns (param/method name changes)
* core/vm: make use of chainrules more
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Added missing error checks
Add error handling where we assign err a value, but don't check for it being nil.
* core/rawdb: tiny style nit
|
|
|
| |
No need to convert these types.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* core: fix write coucurrency in txpool
* core: add rlock for pendingState read access
* core: address comments
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eth: chain config (genesis + fork) ENR entry
* core/forkid, eth: protocol independent fork ID, update to CRC32 spec
* core/forkid, eth: make forkid a struct, next uint64, enr struct, RLP
* core/forkid: change forkhash rlp encoding from int to [4]byte
* eth: fixup eth entry a bit and update it every block
* eth: fix lint
* eth: fix crash in ethclient tests
|
|
|
| |
This PR adds some hardening in the lower levels of the protocol stack, to bail early on invalid data. Primarily, attacks that this PR protects against are on the "annoyance"-level, which would otherwise write a couple of megabytes of data into the log output, which is a bit resource intensive.
|
|
|
|
|
|
|
|
| |
* core/blockchain: lessen mem-spike during 1.8->1.9 conversion
* core/blockchain.go: make levedb->freezer conversion gradually
* core/blockchain: write the batch
|
| |
|
|
|
|
|
|
|
| |
This PR fixes an issue in chain indexer. Currently chain indexer will
validate whether the stored data is canonical by comparing section head
and canonical hash. But the header of the checkpoint may not exist in
the database. We should skip validation for sections below the
checkpoint.
|
|
|
|
|
|
| |
* core: fix chain indexer reorg bug
* core: prevent reverting valid section when reorg happens
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* all: implement simple checkpoint syncing
cmd, les, node: remove callback mechanism
cmd, node: remove callback definition
les: simplify the registrar
les: expose checkpoint rpc services in the light client
les, light: don't store untrusted receipt
cmd, contracts, les: discard stale checkpoint
cmd, contracts/registrar: loose restriction of registeration
cmd, contracts: add replay-protection
all: off-chain multi-signature contract
params: deploy checkpoint contract for rinkeby
cmd/registrar: add raw signing mode for registrar
cmd/registrar, contracts/registrar, les: fixed messages
* cmd/registrar, contracts/registrar: fix lints
* accounts/abi/bind, les: address comments
* cmd, contracts, les, light, params: minor checkpoint sync cleanups
* cmd, eth, les, light: move checkpoint config to config file
* cmd, eth, les, params: address comments
* eth, les, params: address comments
* cmd: polish up the checkpoint admin CLI
* cmd, contracts, params: deploy new version contract
* cmd/checkpoint-admin: add another flag for clef mode signing
* cmd, contracts, les: rename and regen checkpoint oracle with abigen
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core/state, cmd/geth: streaming json output dump cmd + optional code+storage
* dump: add option to continue even if preimages are missing
* core, evm: lint nits
* cmd: use local flags for dump, omit empty code/storage
* core/state: fix state dump test
|
|
|
|
| |
(#19737)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core: move TxPool reorg and events to background goroutine
This change moves internal queue re-shuffling work in TxPool to a
background goroutine, TxPool.runReorg. Requests to execute runReorg are
accumulated by the new scheduleReorgLoop. The new loop also accumulates
transaction events.
The motivation for this change is making sends to txFeed synchronous
instead of sending them in one-off goroutines launched by 'add' and
'promoteExecutables'. If a downstream consumer of txFeed is blocked for
a while, reorg requests and events will queue up.
* core: remove homestead check in TxPool
This change removes tracking of the homestead block number from TxPool.
The homestead field was used to enforce minimum gas of 53000 for
contract creations after the homestead fork, but not before it. Since
nobody would want configure a non-homestead chain nowadays and contract
creations usually take more than 53000 gas, the extra correctness is
redundant and can be removed.
* core: fixes for review comments
* core: remove BenchmarkPoolInsert
This is useless now because there is no separate code path for
individual transactions anymore.
* core: fix pending counter metric
* core: fix pool tests
* core: dedup txpool announced events, discard stales
* core: reorg tx promotion/demotion to avoid weird pending gaps
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Fix file system access for Windows
* Encapsulate file accesses
* Style fixes
|
|
|
| |
les, les/flowcontrol: implement LES/3
|
|
|
|
|
|
|
|
| |
* core: reinit chain from freezer in batches
* core/rawdb: concurrent database reinit from freezer dump
* core/rawdb: reinit from freezer in sequential order
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core, eth: some fixes for freezer
* vendor, core/rawdb, cmd/geth: add db inspector
* core, cmd/utils: check ancient store path forceily
* cmd/geth, common, core/rawdb: a few fixes
* cmd/geth: support windows file rename and fix rename error
* core: support ancient plugin
* core, cmd: streaming file copy
* cmd, consensus, core, tests: keep genesis in leveldb
* core: write txlookup during ancient init
* core: bump database version
|
|
|
|
|
|
|
|
| |
* freezer: disable compression on hashes and difficulties
* core/rawdb: address review concerns
* core/rawdb: address review concerns
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* all: freezer style syncing
core, eth, les, light: clean up freezer relative APIs
core, eth, les, trie, ethdb, light: clean a bit
core, eth, les, light: add unit tests
core, light: rewrite setHead function
core, eth: fix downloader unit tests
core: add receipt chain insertion test
core: use constant instead of hardcoding table name
core: fix rollback
core: fix setHead
core/rawdb: remove canonical block first and then iterate side chain
core/rawdb, ethdb: add hasAncient interface
eth/downloader: calculate ancient limit via cht first
core, eth, ethdb: lots of fixes
* eth/downloader: print ancient disable log only for fast sync
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* freezer: implement split files for data
* freezer: add tests
* freezer: close old head-file when opening next
* freezer: fix truncation
* freezer: more testing around close/open
* rawdb/freezer: address review concerns
* freezer: fix minor review concerns
* freezer: fix remaining concerns + testcases around truncation
* freezer: docs
* freezer: implement multithreading
* core/rawdb: fix freezer nitpicks + change offsets to uint32
* freezer: preopen files, simplify lock constructs
* freezer: delete files during truncation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core, eth, trie: bloom filter for trie node dedup during fast sync
* eth/downloader, trie: address review comments
* core, ethdb, trie: restart fast-sync bloom construction now and again
* eth/downloader: initialize fast sync bloom on startup
* eth: reenable eth/62 until we properly remove it
|
| |
|
|
|
|
|
|
|
|
| |
* move error variable to error.go
* Update error.go
Edit "Genesis" to "genesis"
|
|
|
|
|
|
|
|
|
|
| |
* core: fix import errors on clique crashes + empty blocks
* cosensus/clique, core: add test for the mirrored state issue
* core: address todo question wrt log count
* core: raise a louder warning for non-clique known blocks
|
|
|
|
|
|
|
|
|
|
| |
* core: import known blocks if they can be inserted as canonical blocks
* core: insert knowns blocks
* core: remove useless
* core: doesn't process head block in reorg function
|
|
|
|
|
|
| |
* core: add tests for canonicality confusion
* core: delete stale future canon number mappings during reorg to shorter+heavier chain
|
| |
|
|
|
|
|
|
|
|
| |
* consensus,core,miner: avoid overhead of creating a new block
* consensus: nitpick dot
* consensus: fix some comment formatting nits
|
|
|
|
|
|
| |
* typo fix
* change to stores
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core: lookup txs by block number instead of block hash
Transaction hashes now store a reference to their corresponding
block number as opposed to their hash. In benchmarks this was
shown to reduce storage by over 12 GB.
The main limitation of this approach is that transactions on
non-canonical blocks could never be looked up, however that is
currently not supported.
The database version has been upgraded to version 5 and the
transaction lookup process is backwards-compatible with the
prior two transaction lookup formats prexisting in the
database instance. Tests have been added to ensure this.
* core/rawdb: tiny review nit fixes
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* core/state: fix state iterator
* core: fix state iterator more elegant
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This PR makes it easy to generate and execute testcases for VM arithmetic operations. By enabling and running the testcase TestWriteExpectedValues, a set of json files are created which contain input and output for each arith operation.
The test TestJsonTestcases executes all of those tests.
While meaningless as is, this PR makes it less risky to make changes (optimizations) to the vm operations, since there will be a larger body of testcases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* all: simplify timestamps to uint64
* tests: update definitions
* clef, faucet, mobile: leftover uint64 fixups
* ethash: fix tests
* graphql: update schema for timestamp
* ethash: remove unused variable
|
|\
| |
| | |
core: prefetch next block state concurrently
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
core/vm: Correct the Memory Gas Overflow condition
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
previous overflow condition is too big to use.
0x7FFFFFFFF squre operation is overflowed uint64.
0x7FFFFFFFF^2 = 0x3F FFFF FFF0 0000 0001
|
|/ |
|
|
|
|
| |
Solves #15210 without changing consensus, in a backwards compatible way,
by adding tx inclusion information to the Receipt struct.
|
| |
|
|
|
|
|
| |
This PR is a more advanced form of the dirty-to-clean cacher (#18995),
where we reuse previous database write batches as datasets to uncache,
saving a dirty-trie-iteration and a dirty-trie-rlp-reencoding per block.
|
|\
| |
| | |
core: make txpool handle reorg due to setHead
|
| | |
|
| | |
|
|/
|
|
|
|
| |
* core: split out detailed trie access metrics from insertion time
* cmd, core, metrics: support expensive optional metrics
|
|
|
|
|
|
| |
* cmd, core, eth, trie: get rid of trie cache generations
* core, trie: get rid of remainder of cache gen boilerplate
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core/vm: remove function call for stack validation from evm runloop
* core/vm: separate gas calc into static + dynamic
* core/vm: optimize push1
* core/vm: reuse pooled bigints for ADDRESS, ORIGIN and CALLER
* core/vm: use generic error message for jump/jumpi, to avoid string interpolation
* testdata: fix tests for new error message
* core/vm: use 64-bit memory calculations
* core/vm: fix error in memory calculation
* core/vm: address review concerns
* core/vm: avoid unnecessary use of big.Int:BitLen()
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change
- implements concurrent LES request serving even for a single peer.
- replaces the request cost estimation method with a cost table based on
benchmarks which gives much more consistent results. Until now the
allowed number of light peers was just a guess which probably contributed
a lot to the fluctuating quality of available service. Everything related
to request cost is implemented in a single object, the 'cost tracker'. It
uses a fixed cost table with a global 'correction factor'. Benchmark code
is included and can be run at any time to adapt costs to low-level
implementation changes.
- reimplements flowcontrol.ClientManager in a cleaner and more efficient
way, with added capabilities: There is now control over bandwidth, which
allows using the flow control parameters for client prioritization.
Target utilization over 100 percent is now supported to model concurrent
request processing. Total serving bandwidth is reduced during block
processing to prevent database contention.
- implements an RPC API for the LES servers allowing server operators to
assign priority bandwidth to certain clients and change prioritized
status even while the client is connected. The new API is meant for
cases where server operators charge for LES using an off-protocol mechanism.
- adds a unit test for the new client manager.
- adds an end-to-end test using the network simulator that tests bandwidth
control functions through the new API.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core: remove unnecessary fields in log
* core: bump blockchain database version
* core, les: remove unnecessary fields in txlookup
* eth: print db version explicitly
* core/rawdb: drop txlookup entry struct wrapper
|
|
|
|
|
|
|
|
|
|
| |
* blockchain: more tests for sidechain import, fixes #19105
* core/blockchain: rework import of pruned canon blocks and canon-prepended sidechains
* core/blockchain: minor clarity change
* core/blockchain: remove unused method
|
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
cmd, core, params: add support for Goerli
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
For more information about this light client mode, read
https://hackmd.io/s/HJy7jjZpm
|
|
|
|
|
| |
This replaces the GasSlowStep constant with params.ExpGas.
Both constants have value 10.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg,
but the genesis/config field is ConstantinopleFix.
The block numbers are:
7280000 for Constantinople on Mainnet
7280000 for ConstantinopleFix on Mainnet
4939394 for ConstantinopleFix on Ropsten
9999999 for ConstantinopleFix on Rinkeby (real number decided later)
This PR also defaults to using the same ConstantinopleFix number as whatever
Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix
is not set.This means that for private networks which have already transitioned
to Constantinople, this PR will break the network unless ConstantinopleFix is
explicitly set!
|
|
|
| |
receipts may be null for very short time in some condition. For this case, we should not add the null value into cache. Because you will not get the right result if you keep requesting that receipt.
|
| |
|
|
|
|
|
|
| |
* core, eth: fix database version
* eth: polish error message
|
|\
| |
| | |
core/types: update incorrect comment
|
| | |
|
|/ |
|
|
|
|
|
|
| |
* core: sanitize more TxPoolConfig fields
* core: fix TestTransactionPendingMinimumAllowance
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* geth/core/eth: implement constantinople override flag
* les: implemnent constantinople override flag for les clients
* cmd/geth, eth, les: fix typo, move flag to experimentals
|
|
|
|
| |
filesystem
|
|
|
|
|
|
|
|
|
|
|
| |
Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config`
would be taken so as to set some options, based on the default configuration. If some extra
configuration switches were passed to the blockchain, those would be ignored.
This PR adds a function to get the config from the blockchain, and this is what is now used
for RPC calls.
Some subsequent changes need to be made, see https://github.com/ethereum/go-ethereum/pull/17955#pullrequestreview-182237244
for the details of the discussion.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* core: return error if repair block failed
* make error a bit shorter
|
|\
| |
| | |
core: better side-chain importing
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
* core/blockchain: better printout of receipts in bad block reports
* fix splleing
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* rawdb: remove unused parameter for WritePreimages func and modify a
spelling mistake
* rawdb: update the doc for function WritePreimages
|
|
|
|
| |
The lock in StateDB is useless. It's only held in Copy, but Copy is safe
for concurrent use because all it does is read.
|
|\
| |
| | |
core/vm: check empty in extcodehash
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* core: speed up GenerateChain
Use a mock implementation of ChainReader instead of creating
and destroying a BlockChain object for each generated block.
* eth/downloader: speed up tests by generating chain only once
This change reworks the downloader tests so they share a common test
blockchain instead of generating a chain in every test. The tests are
roughly twice as fast now.
|
|/ |
|
|
|
|
| |
This fixes the import cycle build error in core/vm tests.
There is no need to refer to core/vm for a type definition.
|
|
|
|
|
|
|
| |
This adds the global accumulated refund counter to the standard
json output as a numeric json value. Previously this was not very
interesting since it was not used much, but with the new sstore
gas changes the value is a lot more interesting from a consensus
investigation perspective.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* first impl of eth_getProof
* fixed docu
* added comments and refactored based on comments from holiman
* created structs
* handle errors correctly
* change Value to *hexutil.Big in order to have the same output as parity
* use ProofList as return type
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* core/vm : fix failing testcase
* core/vm: fix nitpick
|
|
|
|
|
|
|
|
| |
* core/vm: create2 address generation tests
* core/vm: per byte cost of CREATE2
* core/vm: fix linter issue in test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core/vm/runtim: benchmark create/create2
* core/vm: do less hashing in CREATE2
* core/vm: avoid storing jumpdest analysis for initcode
* core/vm: avoid unneccesary lookups, remove unused fields
* core/vm: go formatting tests
* core/vm: save jumpdest analysis locally
* core/vm: use common.Hash instead of nil, fix review comments
* core/vm: removed type destinations
* core/vm: correct check for empty hash
* eth: more elegant api_tracer
* core/vm: address review concerns
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Eip1283
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Interpreter initialization is left to the PRs implementing them.
Options for external interpreters are passed after a colon in the
`--vm.ewasm` and `--vm.evm` switches.
|
|/ |
|
|\
| |
| | |
consensus/clique, core: chain maker clique + error tests
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
Makes Interface interface a bit more stateless and abstract.
Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
opcode (#17538)
This commit does a few things at once:
- Updates the tests to contain the latest data from ethereum/tests repo.
- Enables Constantinople state tests. This is needed to be able to
fuzz-test the evm with constantinople rules.
- Fixes the error in opSAR that we've known about for some time. I was
kind of saving it to see if we hit upon it with the random test
generator, but it's difficult to both enable the tests and have the
bug there -- we don't want to forget about it, so maybe it's better
to just fix it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* miner: commit state which is relative with sealing result
* consensus, core, miner, mobile: introduce sealHash interface
* miner: evict pending task with threshold
* miner: go fmt
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* miner: regenerate mining work every 3 seconds
* miner: polish
|
|
|
|
|
|
|
| |
This PR enables the indexers to work in light client mode by
downloading a part of these tries (the Merkle proofs of the last
values of the last known section) in order to be able to add new
values and recalculate subsequent hashes. It also adds CHT data to
NodeInfo.
|
|
|
|
|
|
|
|
| |
* miner: move agent logic to worker
* miner: polish
* core: persist block before reorg
|
| |
|
| |
|
|
|
|
| |
antything --> anything
:P
|
|
|
|
|
|
| |
- Update benchmarks to use a pool of int pools.
Unless benchmarks are aborted with segmentation fault.
Signed-off-by: Hyung-Kyu Choi <hqueue@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
| |
* all: simplify switches
* silly mistake
|
|
|
|
|
|
| |
* core/blockchain: export progress
* core: polish up chain export progress report a bit
|
|
|
|
|
|
| |
- Define an Interpreter interface
- One contract can call contracts from other interpreter types.
- Pass the interpreter to the operands instead of the evm.
This is meant to prevent type assertions in operands.
|
| |
|
| |
|
|
|
|
|
|
| |
* fixed-typo
* core: fix txpool guarantee comment
|
|
|
|
|
|
|
|
| |
* core/vm, params: implement EXTCODEHASH opcode
* core, params: tiny fixes and polish
* core: add function description
|
|
|
|
|
|
|
|
|
|
| |
* core, crypto, params: implement CREATE2 evm instrction
* core/vm: add opcode to string mapping
* core: remove past fork checking
* core, crypto: use option2 to generate new address
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* ethdb: fix memory database
* core: fix bloombits checking
* core: minor polish
|
|
|
|
|
|
|
|
|
| |
* core: fix func TxDifference
fix a typo in func comment;
change named return to unnamed as there's explicit return in the body
* fix another typo in TxDifference
|
|
|
|
|
|
|
|
| |
* core/vm: A pool for int pools
* core/vm: fix rebase issue
* core/vm: push leftover stack items after execution, not before
|
| |
|
|
|
|
|
|
|
|
| |
* core/vm: clear linter warnings
* core/vm: review input
* core/vm.go: revert lint in noop as per request
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current trie memory database/cache that we do pruning on stores
trie nodes as binary rlp encoded blobs, and also stores the node
relationships/references for GC purposes. However, most of the trie
nodes (everything apart from a value node) is in essence just a
collection of references.
This PR switches out the RLP encoded trie blobs with the
collapsed-but-not-serialized trie nodes. This permits most of the
references to be recovered from within the node data structure,
avoiding the need to track them a second time (expensive memory wise).
|
|
|
|
|
|
| |
* core: move test util var/func to test file
* core: remove useless func
|
|
|
|
|
|
|
|
| |
* core/asm/compiler: correct comments typo
core/asm/compiler: correct comments typo
* Correct comments typo
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* vm/test: add tests+benchmarks for mstore
* core/vm: less alloc and copying for mstore
* core/vm: less allocs in sload
* vm: check for errors more correctly
|
|
|
| |
core/asm/lexer: correct comments typo
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* core/rawdb: use wrappered helper to assemble key
* core/rawdb: wrappered helper to assemble key
* core/rawdb: rewrite the wrapper, pass common.Hash
|
|
|
|
|
|
|
|
| |
* core: improve getBadBlocks to return full block rlp
* core, eth, ethapi: changes to getBadBlocks formatting
* ethapi: address review concerns
|
| |
|
|\
| |
| | |
core: concurrent background transaction sender ecrecover
|
| | |
|
|/
|
| |
params: fix golint warnings
|
| |
|