Nazarii Denha
3943547960
feat(rawdb&rpc): add block row consumption rpc ( #388 )
...
* add db api for rowconsumption
* add rpc api for block row consumption
* return nil if rc is is not known
* add method to sdk
* bump version
* small fix
* update version
---------
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
2023-07-11 22:07:09 +08:00
Péter Garamvölgyi
b14a4024cd
fix: improve L1Message RPC encoding ( #368 )
...
correctly encode L1 messages in RPC response
2023-06-19 16:44:04 +02:00
Péter Garamvölgyi
983d630244
feat: Sync and relay L1 messages ( #350 )
...
* add l1 config in genesis config (#249 )
* add l1 config in genesis config
* fix lint
* Update params/config.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* extend node configuration (#251 )
* extend node configuration
* use block number instead of hash
* accept safe, finalized and numbers for L1Confirmations
* fix typos
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* Fix/improve node config parsing (#260 )
* raise error on failed parsing
* default value
* add l1-message-type, transaction methods (#252 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* txpool l1 check, pointer change, marhsal test
* draft: start implementing l1message gas behavior
* draft: start implementing l1message gas behavior
* change to gas usage
* error comment typo
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* goimports
* update nonce, add hash test (fails), marshal test
* goimports
* target addr cant be nil
* change call msg
* comment out test
* lint
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Add L1 message database (#255 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* add L1 message store to rawdb
* remove comments
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* add range check
* fix tests
* update comments
* nit
* support blocks with 0 l1 messages
---------
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
* Fix L1Message Deep Copy, Complete Bridge Tx Hash test (#269 )
* deep copy value field, add tx hash test
comment
* typo
* Rename nonce to queueindex, increment sender nonce on L1 message execution (#271 )
* change nonce to queueindex, increment nonce on L1 message
* fix db acccessors
* Update core/types/transaction_marshalling.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* Fix db inspect command (#276 )
fix db inspect command
* Add l1 sync service (#256 )
* extend node configuration
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* use block number instead of hash
* accept safe, finalized and numbers for L1Confirmations
* add L1 message store to rawdb
* remove comments
* fix typos
* add L1 message sync service
* use l1 contract address and chain ID
* use L1DeploymentBlock
* add confirmation config
* move bridge client to separate file
* use uint64 block number
* fix bigint comparison
* rename constants
* add more logs
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* check if config is provided
* improve sync service DB batched writes
* add range check
* fix tests
* update comments
* nit
* fix flush range and improve comments
* solve circular dependency
* update stress tests
* initialize l1 client for geth
* start sync service
* add more comments
* check nil correctly
* address comments
* fix merge
* fix genesis l1config deserialization
* add sync progress logs
* initial sync
* handle leveldb not found error
* use errors.Is
* address comments
* update DefaultPollInterval
---------
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
* Add L1 message validation (#272 )
* add L1 message validation
* add comments and better error handling
* handle leveldb not found error
* update incorrect condition for genesis block
* typo
* change inclusion index logic
* disable L1 message check for legacy tests
* set NumL1MessagesPerBlock to 0 in tests
* update default genesis config
* Add L1 msg validation tests (#303 )
add L1 msg validation tests
* Update miner include l1 messages (#265 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* add L1 message store to rawdb
* add L1 message sync service
* remove comments
* use l1 contract address and chain ID
* extend node configuration
* use block number instead of hash
* accept safe, finalized and numbers for L1Confirmations
* fix typos
* use L1DeploymentBlock
* add confirmation config
* move bridge client to separate file
* use uint64 block number
* fix bigint comparison
* rename constants
* add more logs
* Fix/improve node config parsing (#260 )
* raise error on failed parsing
* default value
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* check if config is provided
* improve sync service DB batched writes
* include l1 messages in blocks: part 1
* add l1-message-type, transaction methods (#252 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* txpool l1 check, pointer change, marhsal test
* draft: start implementing l1message gas behavior
* draft: start implementing l1message gas behavior
* change to gas usage
* error comment typo
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* goimports
* update nonce, add hash test (fails), marshal test
* goimports
* target addr cant be nil
* change call msg
* comment out test
* lint
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Add L1 message database (#255 )
* add l1-message-type, transaction methods
* goimports
* Update core/types/transaction.go
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* add L1 message store to rawdb
* remove comments
* rename to l1_message
* rename variables and add comments
* write l1 msgs in a batch
* add more comments
* update tests
* allow batched and non-batched writes
* rename to accessors_l1_message
* handle error
* add range check
* fix tests
* update comments
* nit
* support blocks with 0 l1 messages
---------
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
* build(docker): auto docker push when pushing git tags (#258 )
* build(docker): update docker trigger tag prefix (#259 )
* Fix L1Message Deep Copy, Complete Bridge Tx Hash test (#269 )
* deep copy value field, add tx hash test
comment
* typo
* commitl1messages
* lint
* Revert "add L1 message sync service"
This reverts commit 5305e8a5de14766ed249e1a7d64042c7a72cf5c2.
* Revert "move bridge client to separate file"
This reverts commit 0b220bee37de93c3250545e23430db2c401a2f90.
* update branch
* use commitMessages for l1Txs
* little fix
* fix config
* fix test
* comment fixes
* fix
* fix config check
---------
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Add ErrUnknownAncestor tests (#305 )
add ErrUnknownAncestor tests
* worker test include l1 msgs (#306 )
* worker test include l1 msgs
* move L1 message index update next to block insertion
---------
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* exclude l1 messages from transaction count limit in block (#307 )
* exclude l1 messages from transaction count limit in block
* fix comments
* trigger ci
* nit
---------
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
* Expose queueIndex on Transaction (#316 )
expose queueIndex on Transaction
* test that l1msg doesn't count in maxTxPerBlock limit (#312 )
* test that l1msg doesn't count in maxTxPerBlock limit
* fix, comment
* retrigger ci
* change order inside test
---------
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: Péter Garamvölgyi <th307q@gmail.com>
* reuse trace nonce field for queueIndex
* expose scroll APIs on the geth console
* add L1 message query APIs
* Trigger new block on new l1 messages (#343 )
* trigger new block on new l1 messages
* typo
* initialize l1MsgCh
* fix worker l1msg tests (#345 )
---------
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
* test(worker): ensure that l1 messages are included in the correct order (#346 )
test that l1msgs added in correct order
* rename enqueueIndex --> queueIndex
* move QueueIndex into transaction
* improve l1 db interface
* formatting
* bump version
* print l1config
* add API to query latest included message queue index
* clean up tx limit logic
* add clarifying comments and todos to ValidateL1Messages
* improve db comments and logs
* clean up L1MessageTx type handling
* format
* format
* improve L1 message block check
* fix missing L1 event handling
* fix TestL1MessageValidationFailure
* simplify sync height resume logic
* make l1Config.l1MessageQueueAddress non-pointer
* improve command line flags
* remove todo
* use abigen tools for log filtering
* cache block L1 message count
* nit: fix variable name case
* improve logs
* flush pending writes to DB before shutdown
---------
Co-authored-by: Nazarii Denha <dengaaa2002@gmail.com>
Co-authored-by: Max Wolff <max@scroll.io>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: Max Wolff <maxcwolff@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2023-06-07 07:24:19 -07:00
maskpp
15391eeaf7
feat: add replay blockResult API ( #139 )
...
* replay trace
* replay trace
* add sdk
* fix trace test case
* fix bug
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* add comments
* fail the rpc call if get error
* adjust channel length
* fix bug
* fix bug
* remove redundant codes in worker
* add test case
* fix bug
* fix goimports
* Update eth/tracers/api_blockResult.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* fix comments
* Update ethclient/ethclient.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update ethclient/ethclient.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* rm coinbase api in miner
* fix comment
* Update eth/tracers/api.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* fix comment
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
2022-09-20 14:30:57 +08:00
maskpp
69c291cf7a
feat: add more data into the execution trace ( #20 )
2022-02-21 10:15:57 +08:00
maskpp
7745fd5840
Extract execution trace from EVM execution and provide subscription API ( #19 )
...
* Create go.yml
* Merge from zkrollup and fix conflict
* go mod tidy
* fix worker_test test case
* fix worker_test test case
* Delete go.yml
* add log content, enable memory trace
* add tracer pool handler
* Add comments and format code
* add evmTrace subscribe api
* Move the evmTrace struct.
* Fix miner bug.
* upgrade evmTrace api
* fix bug about evmTracesByHash api
* Fix the bug about block.timestamp and remove unnecessary copy.
* Update eth/filters/api.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Upgrade comments.
* Delete useless code in test file
* Update miner/worker.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Change the return result to BlockResult.
* Change return type.
* Change blockResult to blockResults.
* Add ReturnValue.
* Update core/rawdb/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update core/rawdb/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update core/types/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Add indent to the comment and rm json encoding flag.
* Rm json encoding flag.
* Update core/rawdb/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Rm json encoding flag.
* Update ethclient/ethclient.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Update eth/filters/api.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Use as the blockResult prefix flag.
* Update eth/filters/filter_system.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/filters/filter_system.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update ethclient/ethclient.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/filters/api.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2022-01-23 20:41:15 +08:00
Jules
de7ed6af40
Update mod file and all imports to use scroll-tech URL ( #15 )
...
* Update mod file and all imports to use scroll-tech URL
Fixes #14
* Update Discord link
2021-12-24 10:59:22 +01:00
Anatole
e0761432a4
eth: fix typo in comment ( #23941 )
2021-11-22 02:53:16 +01:00
Sina Mahmoodi
48496e0675
internal/ethapi: use correct signer when serving old blocks ( #23683 )
...
Fixes #23681
After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
2021-10-07 15:51:14 +02:00
Martin Holst Swende
307156cc46
eth/api: add rpc method to obtain which states are accessible ( #23646 )
...
This PR adds a method to the debug namespace, to iterate over the blocks and check where we have the roots on disk.
2021-10-05 08:13:00 +02:00
Martin Holst Swende
62ad17fb00
Revert "eth, internal/ethapi: make RPC block miner field show block sealer correctly ( #23312 )" ( #23466 )
...
This reverts commit 57feabea66 .
2021-08-26 08:35:37 +02:00
陈佳
57feabea66
eth, internal/ethapi: make RPC block miner field show block sealer correctly ( #23312 )
...
Makes the RPC block return the POA sealer for clique blocks on the 'miner' field (was previously zeroes)
2021-08-17 18:55:18 +02:00
Martin Holst Swende
d21a069619
eth, miner: add RPC method to modify miner gaslimit (pre london: ceiling) ( #23134 )
2021-07-06 10:35:39 +02:00
Martin Holst Swende
addd8824cf
cmd/geth, eth, core: snapshot dump + unify with trie dump ( #22795 )
...
* cmd/geth, eth, core: snapshot dump + unify with trie dump
* cmd/evm: dump API fixes
* cmd/geth, core, eth: fix some remaining errors
* cmd/evm: dump - add limit, support address startkey, address review concerns
* cmd, core/state, eth: minor polishes, fix snap dump crash, unify format
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-05-12 11:05:39 +03:00
Péter Szilágyi
06f44c0fd4
eth: restore eth_hashrate API endpoint
2021-04-29 12:02:30 +03:00
gary rong
a600dab7e5
eth, les: fix tracers ( #22473 )
...
* eth, les: fix tracer
* eth: isolate live trie database in tracer
* eth: fix nil
* eth: fix
* eth, les: add checkLive param
* eth/tracer: fix
2021-04-07 10:30:26 +03:00
piersy
706683ea72
internal/ethapi: fix eth_chainId method ( #22243 )
...
This removes the duplicated definition of eth_chainID
in package eth and updates the definition in internal/ethapi
to treat chain ID as a bigint.
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-04-06 12:24:39 +02:00
Péter Szilágyi
55300d4fdb
all: fix miner hashRate -> hashrate on API calls
2021-03-31 10:56:51 +03:00
gary rong
adf130def8
eth/tracers: move tracing APIs into eth/tracers ( #22161 )
...
This moves the tracing RPC API implementation to package eth/tracers.
By doing so, package eth no longer depends on tracing and the duktape JS engine.
The change also enables tracing using the light client. All tracing methods work with the
light client, but it's a lot slower compared to using a full node.
2021-01-25 14:36:39 +01:00
rene
984e752ce5
eth: return error from eth_chainID during sync before EIP-155 activates ( #21686 )
...
This changes the chainID RPC method to return an error when EIP-155 is not yet
active at the current block height. It used to simply return zero in this case, but
that's confusing.
2021-01-12 10:52:13 +01:00
gary rong
5a1b384352
core: persist bad blocks ( #21827 )
...
* core: persist bad blocks
* core, eth, internal: address comments
* core/rawdb: add badblocks to inspector
* core, eth: update
* internal: revert
* core, eth: only save 10 bad blocks
* core/rawdb: address comments
* core/rawdb: fix
* core: address comments
2021-01-10 12:54:15 +01:00
aaronbuchwald
3e82c9ef67
eth/api: fix potential nil deref in AccountRange ( #21710 )
...
* Fix potential nil pointer error when neither block number nor hash is specified to accountRange
* Update error description
2020-10-20 20:19:21 +02:00
Marius van der Wijden
de971cc845
eth: added trace_call to trace on top of arbitrary blocks ( #21338 )
...
* eth: Added TraceTransactionPending
* eth: Implement Trace_Call, remove traceTxPending
* eth: debug_call -> debug_traceCall, recompute tx environment if pruned
* eth: fix nil panic
* eth: improve block retrieving logic in tracers
* internal/web3ext: add debug_traceCall to console
2020-09-07 10:52:01 +02:00
Marius van der Wijden
16d7eae1c8
eth: updated comments ( #21490 )
2020-08-26 13:20:12 +03:00
Wenbiao Zheng
03fe9de2cb
eth: add debug_accountRange API ( #19645 )
...
This new API allows reading accounts and their content by address range.
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
2020-03-31 12:08:44 +02:00
Ryan Schneider
c4b7fdd27e
eth, internal/web3ext: add optional first and last arguments to the admin_exportChain RPC. ( #20107 )
2019-12-17 12:10:14 +01:00
Martin Holst Swende
292cf7c649
eth: disallow overwrite files via admin.exportChain
2019-08-30 10:39:29 +02:00
jwasinger
6bd896a97f
eth: add debug_accountRange ( #17438 )
...
This adds the debug_accountRange method which returns all accounts in
the state for a given block and transaction index.
2019-07-13 15:48:55 +02:00
Martin Holst Swende
1da5e0ebb0
core/state, cmd/geth: streaming json output for dump command ( #15475 )
...
* 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
2019-06-24 17:16:44 +03:00
Péter Szilágyi
ac3e7c9b3d
eth: remove redundant chain config fields
2019-03-27 13:23:08 +02:00
Péter Szilágyi
91eec1251c
cmd, core, eth, trie: get rid of trie cache generations ( #19262 )
...
* cmd, core, eth, trie: get rid of trie cache generations
* core, trie: get rid of remainder of cache gen boilerplate
2019-03-14 15:25:12 +02:00
Péter Szilágyi
434dd5bc00
cmd, core, eth, light, trie: add trie read caching layer
2018-11-15 12:22:13 +02:00
HackyMiner
107f556b2d
internal/ethapi: add eth_chainId method ( #17617 )
...
This implements EIP-695.
2018-09-29 22:07:02 +02:00
Péter Szilágyi
92381ee009
cmd, eth: clean up miner startup API, drop noop config field
2018-08-23 14:09:45 +03:00
gary rong
b2c644ffb5
cmd, eth, miner: make recommit configurable ( #17444 )
...
* cmd, eth, miner: make recommit configurable
* cmd, eth, les, miner: polish a bit
* miner: filter duplicate sealing work
* cmd: remove uncessary conversion
* miner: avoid microptimization in favor of cleaner code
2018-08-21 22:56:54 +03:00
gary rong
51db5975cc
consensus/ethash: move remote agent logic to ethash internal ( #15853 )
...
* consensus/ethash: start remote ggoroutine to handle remote mining
* consensus/ethash: expose remote miner api
* consensus/ethash: expose submitHashrate api
* miner, ethash: push empty block to sealer without waiting execution
* consensus, internal: add getHashrate API for ethash
* consensus: add three method for consensus interface
* miner: expose consensus engine running status to miner
* eth, miner: specify etherbase when miner created
* miner: commit new work when consensus engine is started
* consensus, miner: fix some logics
* all: delete useless interfaces
* consensus: polish a bit
2018-08-03 11:33:37 +03:00
williambannas
9402f96597
eth: conform better to the golint standards ( #16783 )
...
* eth: made changes to conform better to the golint standards
* eth: fix comment nit
2018-06-14 13:14:52 +03:00
Martin Holst Swende
eac16f9824
core: improve getBadBlocks to return full block rlp ( #16902 )
...
* core: improve getBadBlocks to return full block rlp
* core, eth, ethapi: changes to getBadBlocks formatting
* ethapi: address review concerns
2018-06-11 11:03:40 +03:00
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
2018-05-07 14:35:06 +03:00
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
2018-02-05 17:40:32 +01:00
Péter Szilágyi
5258785c81
cmd, core, eth/tracers: support fancier js tracing ( #15516 )
...
* cmd, core, eth/tracers: support fancier js tracing
* eth, internal/web3ext: rework trace API, concurrency, chain tracing
* eth/tracers: add three more JavaScript tracers
* eth/tracers, vendor: swap ottovm to duktape for tracing
* core, eth, internal: finalize call tracer and needed extras
* eth, tests: prestate tracer, call test suite, rewinding
* vendor: fix windows builds for tracer js engine
* vendor: temporary duktape fix
* eth/tracers: fix up 4byte and evmdis tracer
* vendor: pull in latest duktape with my upstream fixes
* eth: fix some review comments
* eth: rename rewind to reexec to make it more obvious
* core/vm: terminate tracing using defers
2017-12-21 13:56:11 +02:00
Michael Ruminer
732f5468d3
eth: make tracing API errors more user friendly ( #15589 )
2017-12-09 23:47:13 +01:00
Benoit Verkindt
eab2201f80
eth: return rlp-decoded values from debug_storageRangeAt ( #15476 )
...
Fixes #15196
2017-12-06 16:42:16 +01:00
Nick Johnson
72ed186f46
eth, internal: Implement getModifiedAccountsBy(Hash|Number) using trie diffs ( #15512 )
...
* eth, internal: Implement using trie diffs
* eth, internal: Changes in response to review
* eth: More fixes to getModifiedAccountsBy*
* eth: minor polishes on error capitalization
2017-11-20 17:18:50 +02:00
rjl493456442
94903d572b
internal, accounts, eth: utilize vm failed flag to help gas estimation
2017-10-02 15:26:40 +03:00
Ernesto del Toro
3c8656347f
eth, internal/ethapi: fix spelling of 'Ethereum' ( #15164 )
2017-09-20 11:31:31 +02:00
Felix Lange
10181b57a9
core, eth/downloader: commit block data using batches ( #15115 )
...
* ethdb: add Putter interface and Has method
* ethdb: improve docs and add IdealBatchSize
* ethdb: remove memory batch lock
Batches are not safe for concurrent use.
* core: use ethdb.Putter for Write* functions
This covers the easy cases.
* core/state: simplify StateSync
* trie: optimize local node check
* ethdb: add ValueSize to Batch
* core: optimize HasHeader check
This avoids one random database read get the block number. For many uses
of HasHeader, the expectation is that it's actually there. Using Has
avoids a load + decode of the value.
* core: write fast sync block data in batches
Collect writes into batches up to the ideal size instead of issuing many
small, concurrent writes.
* eth/downloader: commit larger state batches
Collect nodes into a batch up to the ideal size instead of committing
whenever a node is received.
* core: optimize HasBlock check
This avoids a random database read to get the number.
* core: use numberCache in HasHeader
numberCache has higher capacity, increasing the odds of finding the
header without a database lookup.
* core: write imported block data using a batch
Restore batch writes of state and add blocks, tx entries, receipts to
the same batch. The change also simplifies the miner.
This commit also removes posting of logs when a forked block is imported.
* core: fix DB write error handling
* ethdb: use RLock for Has
* core: fix HasBlock comment
2017-09-09 19:03:07 +03:00
rjl493456442
28aea46ac0
core: implement Metropolis EIP 658, receipt status byte
2017-08-22 18:35:17 +03:00
Egon Elbre
8f06b7980d
eth: fix megacheck warnings
2017-08-07 19:54:20 +03:00
Felix Lange
9e5f03b6c4
core/state: access trie through Database interface, track errors ( #14589 )
...
With this commit, core/state's access to the underlying key/value database is
mediated through an interface. Database errors are tracked in StateDB and
returned by CommitTo or the new Error method.
Motivation for this change: We can remove the light client's duplicated copy of
core/state. The light client now supports node iteration, so tracing and storage
enumeration can work with the light client (not implemented in this commit).
2017-06-27 15:57:06 +02:00