Commit graph

39 commits

Author SHA1 Message Date
Daniel Liu
58c066f053
all: handle err from func rlp.Encode, close XFN-127 (#1692) 2025-11-03 12:45:19 +05:30
Daniel Liu
3efe26df08
all: refactor so NewBlock, WithBody take types.Body #29482 (#1605) 2025-10-08 13:12:35 +08:00
Daniel Liu
c74515fcca
core: persist bad blocks #21827 (#1603) 2025-10-08 13:10:22 +08:00
wit liu
7d5a03a46e
all: fix unnecessary conversion (#1527)
Co-authored-by: wit <wit765765346@gmail>
2025-09-21 19:45:42 +08:00
Daniel Liu
ad9003c41e
eth/tracers: live chain tracing with hooks #29189 (#1352)
Here we add a Go API for running tracing plugins within the main block import process.

As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within
that file register your custom tracer implementation. Then recompile geth and select your tracer
on the command line. Hooks defined in the tracer will run whenever a block is processed.

The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of
requiring an interface, for several reasons:

- We plan to keep this API stable long-term. The core/tracing hook API does not depend on
  on deep geth internals.
- There are a lot of hooks, and tracers will only need some of them. Using a struct allows you
   to implement only the hooks you want to actually use.

All existing tracers in eth/tracers/native have been rewritten to use the new hook system.

This change breaks compatibility with the vm.EVMLogger interface that we used to have.
If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking
your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM.

---------

Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2025-09-09 17:30:56 +08:00
Daniel Liu
516883d14c
all: snapshot dump + unify with trie dump #22795 (#1205) 2025-08-22 16:39:28 +08:00
Daniel Liu
cd407af1aa
core/rawdb: add HasCode, HasTrieNode and use them where possible #24454 (#1211) 2025-08-04 14:42:13 +08:00
Daniel Liu
f272ce1123
core/rawdb: add func HasCodeWithPrefix and HasTrieNode #24117 (#1210) 2025-07-11 10:37:10 +08:00
Daniel Liu
9a50df0b62
core/rawdb: do prefixed lookup first #24288 (#1209)
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-07-11 10:22:26 +08:00
JukLee0ira
87ed24a113
all: update to golangci-lint 1.61.0 #30587 (#1181)
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-07-01 18:10:05 +08:00
Daniel Liu
f07824db20
core, ethdb, tests, trie: implement NewBatchWithSize API for batcher #24392 (#1085) 2025-06-17 13:26:50 +08:00
Daniel Liu
a9b9f53701 core, eth, trie: add a prefix to contract code (21080) 2025-03-24 22:31:03 +08:00
Daniel Liu
3adec81483 downloader: different sync strategy (#18085) 2025-02-26 15:06:08 +08:00
Daniel Liu
7017077508 cmd/XDC, core/rawdb: add db command inspect 2025-02-21 15:32:35 +08:00
Daniel Liu
d8fb27b987 all: clean up and properly abstract database accesses (#19021) 2025-02-11 18:28:50 +08:00
Daniel Liu
ebb2c3b2ea all: new empty trie with types.EmptyRootHash instead of null (#27230) 2025-02-07 13:04:45 +08:00
Daniel Liu
85fc56733f core: lookup txs by block number instead of block hash (#19431) 2025-01-24 15:52:43 +08:00
Daniel Liu
2b8b7e68f7 all: avoid storing computable receipt metadata (#19345) 2025-01-24 15:52:43 +08:00
Daniel Liu
92f0d07e6d core: remove unnecessary fields in log (#17106 #19182) 2025-01-24 15:52:43 +08:00
Daniel Liu
97c50f97bb all: add read-only option to database 2025-01-24 14:24:39 +08:00
JukLee0ira
653b59710e core/rawdb: separate raw database access to own package (#16666 #19345) 2025-01-22 15:19:39 +08:00
Daniel Liu
2d5dc550d0 core/rawdb: rename WriteTxLookupEntries to WriteTxLookupEntriesByBlock (#21480) 2024-12-28 10:44:42 +08:00
Daniel Liu
d7e0e9d734 core: write chain data in atomic way (#20287) 2024-12-28 10:44:36 +08:00
Daniel Liu
a294c2080d all: fix null effectiveGasPrice 2024-11-01 11:36:53 +08:00
Daniel Liu
2a9d450101 core/types: add EffectiveGasPrice in Receipt (#26713) 2024-11-01 11:36:53 +08:00
JukLee0ira
47d27fed3b all: replace uses of ioutil with io and os (#24869) 2024-09-27 15:14:17 +08:00
JukLee0ira
3f40987cca core/rawdb: rearranging function order 2024-08-19 22:32:20 +08:00
JukLee0ira
bea4431f6f eth/filters: avoid block body retrieval when no matching logs (#25199) 2024-08-03 10:03:22 +08:00
JukLee0ira
f8a2b00505 core/rawdb,eth: use lightweight accessor for log filtering (#23147) 2024-08-03 10:03:22 +08:00
olumuyiwadad
b5abbfed79 new EVM Upgrade
- Solidity Upgraded up to v0.8.0
-  Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
571c41f891 FIx Bad block error. 2021-09-17 17:59:06 +05:30
gary rong
d5cad488be core, eth: fix database version (#18429)
* core, eth: fix database version

* eth: polish error message
2019-01-11 13:49:12 +02:00
Dave McGregor
33d233d3e1
vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
Péter Szilágyi
accc0fab4f
core, eth/downloader: fix ancestor lookup for fast sync 2018-11-16 13:21:20 +02:00
Corey Lin
1ff152f3a4 rawdb: remove unused parameter for WritePreimages func (#18059)
* rawdb: remove unused parameter for WritePreimages func and modify a
spelling mistake

* rawdb: update the doc for function WritePreimages
2018-11-09 12:51:07 +02:00
Wuxiang
d98c45f70f core: fix a typo (#17941) 2018-10-19 16:33:27 +03:00
Wenbiao Zheng
aab7ab04b0 core/rawdb: wrap db key creations (#16914)
* core/rawdb: use wrappered helper to assemble key

* core/rawdb: wrappered helper to assemble key

* core/rawdb: rewrite the wrapper, pass common.Hash
2018-06-11 16:06:26 +03:00
gary rong
7beccb29be all: get rid of error when creating memory database (#16716)
* all: get rid of error when create mdb

* core: clean up variables definition

* all: inline mdb definition
2018-05-09 15:24:25 +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