Commit graph

54 commits

Author SHA1 Message Date
Daniel Liu
ad0eea0f07
refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046)
The upstream libray has removed the assembly-based implementation of
keccak. We need to maintain our own library to avoid a peformance
regression.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
2026-02-28 17:23:57 +04:00
Daniel Liu
398d9b693d
refactor(core): make signature of ContractCode hash-independent #27209 (#1169) 2026-02-13 09:11:43 +05:30
Daniel Liu
e39a523260
refactor(all): cleanup the APIs for initializing genesis #25473 #26747 (#2017)
* refactor(all): cleanup the APIs for initializing genesis #25473

* fix(core): fix accessor mismatch for genesis state #26747
2026-02-07 00:18:39 +05:30
Daniel Liu
3d194d4303
all: port boring changes from pbss #27176 (#1158)
* all: port boring changes from pbss

* core, trie: address comments from martin

* trie: minor fixes

* core/rawdb: update comment

* core, eth, tests, trie: address comments

* tests, trie: add extra check when update trie database

* trie/triedb/hashdb: degrade the error to warning

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2026-01-26 11:21:46 +05:30
Daniel Liu
6d4670a4ec
core, trie: refactor trie API #26995 (#1147)
In this PR, all TryXXX(e.g. TryGet) APIs of trie are renamed to XXX(e.g. Get) with an error returned.

The original XXX(e.g. Get) APIs are renamed to MustXXX(e.g. MustGet) and does not return any error -- they print a log output. A future PR will change the behaviour to panic on errorrs.

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2026-01-16 15:51:13 +05:30
Daniel Liu
70755237e7
contracts, core/rawdb: refactor read and write randomizeKey (#1806) 2025-12-09 11:01:37 +05:30
Daniel Liu
bc5794cdf5
core: refactor read and write valid sections (#1808) 2025-12-08 15:07:33 +05:30
Daniel Liu
348b7fa68f
consensus/XDPoS, core/rawdb: stop node if fail to store snapshot (#1803) 2025-12-08 15:07:22 +05:30
Daniel Liu
6450d5bbb9
core/rawdb: refactor func WriteChainConfig (#1805) 2025-12-08 13:00:25 +05:30
Daniel Liu
e3efe5e0bb
core: refactor read and write section head (#1809) 2025-12-08 12:59:23 +05:30
Daniel Liu
62dbd3bceb
core: use slices package for sorting #27489 #27909 (#1701) 2025-12-07 15:43:24 +05:30
Daniel Liu
3b3aa9b013
core, trie: prepare for path-based trie storage #26603 (#1126)
This PR moves some trie-related db accessor methods to a different file, and also removes the schema type. Instead of the schema type, a string is used to distinguish between hashbased/pathbased db accessors.
This also moves some code from trie package to rawdb package.

This PR is intended to be a no-functionality-change prep PR for #25963 .

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-11-18 11:20:00 +05:30
Daniel Liu
1fa780768f
core/rawdb: remove unused freezerdb (#1748) 2025-11-17 11:15:06 +05:30
Daniel Liu
e34bbe10c6
core: persist bad blocks #21827 #27489 (#1771) 2025-11-15 16:51:21 +05:30
Daniel Liu
eef5242fa3
all: pre-allocate memory for slices and maps, close XFN-148 (#1714) 2025-11-14 20:13:36 +05:30
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