Daniel Liu
e2da8daab4
core/types: updates for EIP-7702 API functions #30933 ( #1827 )
2025-12-20 11:13:04 +05:30
Daniel Liu
0d381ece9f
core/types, internal/ethapi: fixes for prague RPC encoding #30926 ( #1839 )
2025-12-19 14:38:23 +04:00
Daniel Liu
142b1155d8
all: implement eip-7702 set code tx #30078 ( #1759 )
2025-12-19 14:09:45 +04:00
Daniel Liu
d976cc65d2
core/txpool: fix isGapped implementation #27404 ( #1864 )
2025-12-18 13:15:50 +04:00
Daniel Liu
503d51945b
core/txpool: disallow future churn by remote txs #26907 ( #1860 )
2025-12-16 11:05:39 +04:00
Daniel Liu
c9a730d859
core/txpool: use atomic int added in go1.19 #26913 ( #1856 )
2025-12-16 10:43:09 +04:00
Daniel Liu
999ded17da
all: change chain head markers from block to header #26777 ( #1846 )
2025-12-16 07:36:51 +04:00
Daniel Liu
cbb0605e0f
core/txpool: used priceList.Put instead of heap.Push #26863 ( #1855 )
2025-12-16 07:34:47 +04:00
Daniel Liu
ed6f9e82fc
core/txpool: allow future local tx #26930 ( #1857 )
2025-12-16 07:34:20 +04:00
Daniel Liu
0894fcdb6e
core/txpool: use types.EmptyRootHash instead of null #27230 ( #1862 )
2025-12-16 07:33:45 +04:00
Daniel Liu
ebbbdf2bff
core/state: move state log mechanism to a separate layer #30569 #30732 ( #1775 )
2025-12-16 07:33:19 +04:00
Daniel Liu
d9867ea87d
core/txpool: move some validation to outside of mutex #27006 ( #1858 )
2025-12-15 12:34:23 +04:00
Daniel Liu
322ec7f997
core/txpool : fix map size avoid resizing #27221 ( #1861 )
2025-12-15 12:33:56 +04:00
Daniel Liu
7f89733a09
eth/tracers, core: handle non-EVM tx tracing, fix #1863 ( #1865 )
...
* Detect non-EVM special transactions and construct a synthetic top level callFrame in OnTxStart.
* GetResult returns the virtual frame for non-EVM txs to preserve debug API compatibility.
* Add bounds checks in OnTxEnd and OnLog to avoid panics when callstack is empty.
* Add unit tests to verify the fix
2025-12-15 12:33:32 +04:00
Daniel Liu
12554081cd
core/txpool: implement additional DoS defenses #26648 ( #1853 )
2025-12-15 12:32:47 +04:00
wit liu
b624614ebc
core/types: use switch improve readability in function IsVotingTransaction ( #1868 )
2025-12-14 13:21:21 +05:30
wit liu
4b7963e0ae
core/types: use switch improve readability ( #1867 )
2025-12-12 16:56:25 +05:30
Daniel Liu
6ccbf98292
core/txpool: remove deprecated uses of math.rand #26710 ( #1843 )
2025-12-11 16:19:20 +05:30
Daniel Liu
d3e994377b
core: assign zero after resize in implementations of heap.Interface #26296 ( #1841 )
2025-12-11 16:18:55 +05:30
Daniel Liu
d75f2822d3
core/types: use new atomic types in caches #29411 ( #1793 )
2025-12-11 16:18:37 +05:30
Daniel Liu
d8aac24223
core/txpool: check if initcode size is exceeded #26504 ( #1842 )
2025-12-11 16:18:18 +05:30
wgr523
1089f0b4fe
record total minted API v2 ( #1769 )
...
* feat: GetTokenSupply API, total minted and burned
* feat: token supply API finish burned token. rename minted record functions
* fix(api): handle edge case about minus 1 for epoch in token supply
* fix: check both total minted and burned before breaking loop
* style: modify minor style
* style: modify by comment and rebase code
* chore: modify test based on statedb_utils
2025-12-09 19:43:19 +08:00
Daniel Liu
c287f9eddd
core/types: support yParity field in JSON transactions #27744 ( #1816 )
2025-12-09 11:27:37 +05:30
Daniel Liu
5c879a5e05
core: refactored blockchain.go to blockchain_reader.go #23735 ( #1844 )
2025-12-09 11:02:41 +05:30
Daniel Liu
5634b75866
core/types: add derived chain ID to LegacyTx JSON encoding #27452 ( #1792 )
2025-12-09 11:02:24 +05:30
Daniel Liu
f363000d2d
core/types: add json marshalling and tweaks #27256 ( #1817 )
2025-12-09 11:02:05 +05:30
wit liu
20e6a3ef9d
core/vm: refactor memory resize #33056 ( #1845 )
2025-12-09 11:01:47 +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
wit liu
d6309612fc
all: fix unnecessary whitespace ( #1800 )
2025-12-08 15:07:11 +05:30
Daniel Liu
47501c8834
core/state, trie: remove unused error-return from trie Commit operation #26641 ( #1135 )
...
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-12-08 15:05:11 +05:30
Daniel Liu
bfbb024dc4
core/vm/program: evm bytecode-building utility #30725 ( #1801 )
...
In many cases, there is a need to create somewhat nontrivial bytecode. A
recent example is the verkle statetests, where we want a `CREATE2`- op
to create a contract, which can then be invoked, and when invoked does a
selfdestruct-to-self.
It is overkill to go full solidity, but it is also a bit tricky do
assemble this by concatenating bytes. This PR takes an approach that
has been used in in goevmlab for several years.
Using this utility, the case can be expressed as:
```golang
// Some runtime code
runtime := program.New().Ops(vm.ADDRESS, vm.SELFDESTRUCT).Bytecode()
// A constructor returning the runtime code
initcode := program.New().ReturnData(runtime).Bytecode()
// A factory invoking the constructor
outer := program.New().Create2AndCall(initcode, nil).Bytecode()
```
We have a lot of places in the codebase where we concatenate bytes, cast
from `vm.OpCode` . By taking tihs approach instead, thos places can be made a
bit more maintainable/robust.
Co-authored-by: Martin HS <martin@swende.se>
2025-12-08 13:01:55 +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
8129ac77cd
core/types: implement encode/decode for TxData interface #27841 ( #1795 )
2025-12-07 15:52:27 +05:30
Daniel Liu
4881c9445a
core, eth: for types with accurate size calcs, return uint64 #26046 ( #1791 )
2025-12-07 15:52:03 +05:30
Daniel Liu
1990e73b3c
core, eth/hooks, internal/ethapi: rename xdc sort package ( #1707 )
2025-12-07 15:47:49 +05:30
Daniel Liu
93d453c4c4
core/txpool: remove a redundant heap.Init #28910 ( #1706 )
2025-12-07 15:47:20 +05:30
Daniel Liu
62dbd3bceb
core: use slices package for sorting #27489 #27909 ( #1701 )
2025-12-07 15:43:24 +05:30
wit liu
5ada9b8866
core: fix unused warnings ( #1811 )
2025-12-07 15:39:31 +05:30
Daniel Liu
940fd2adbd
core, trie: port changes from pbss #26637 ( #1127 )
2025-12-07 15:38:38 +05:30
wit liu
66e96b507c
all: use 0x-prefix for Address type in log ( #1830 )
2025-12-07 15:36:36 +05:30
Daniel Liu
c6c5778632
params: define prague block #26481 #26880 ( #1836 )
2025-12-07 15:36:02 +05:30
Daniel Liu
4c098ddf1f
core/vm: fold EVMInterpreter into EVM #32352 ( #1838 )
2025-12-04 10:31:40 +05:30
Daniel Liu
ec08863ba0
all: use WaigGroup.Go() to simplify code ( #1699 )
2025-11-29 17:17:08 +05:30
wit liu
b8feb5cffc
core/state: reduce one alloc #33024 ( #1784 )
2025-11-24 11:00:15 +05:30
Daniel Liu
6235de71ba
all: rework statedb utils ( #1785 )
2025-11-18 11:26:28 +05:30
Daniel Liu
0050bef807
all: rework trc21 ( #1777 )
2025-11-18 11:24:56 +05:30
Daniel Liu
f8553d5871
core, miner: fix inconsistent tx blacklist enforcement, close XFN-98 ( #1674 )
2025-11-18 11:24:08 +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
d47260ea98
core, trie: clean up trie interface #26388 ( #1125 )
...
* all: cleanup trie interface
* eth, trie: address comments
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-18 11:19:27 +05:30
Daniel Liu
07328dcec4
core, eth, trie: abstract node scheme #25532 ( #1123 )
...
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon.
Apart from that, a few changes are also included which is worth mentioning:
- port the changes in the stacktrie, tracking the path prefix of nodes during commit
- use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-11-17 11:25:08 +05:30
wit liu
39eb15531d
all: fix whitespace error of golangci-lint, remove extra empty lines ( #1676 )
2025-11-17 11:16:09 +05:30
Daniel Liu
1fa780768f
core/rawdb: remove unused freezerdb ( #1748 )
2025-11-17 11:15:06 +05:30
Daniel Liu
73061af2c6
core/types: fix immutability guarantees in Block #27844 , close XFN-82 ( #1727 )
2025-11-16 11:23:22 +05:30
Daniel Liu
b2664ec363
cmd, core, eth: disable prefetch by default, fix #1718 ( #1719 )
2025-11-16 11:22:48 +05:30
Daniel Liu
e34bbe10c6
core: persist bad blocks #21827 #27489 ( #1771 )
2025-11-15 16:51:21 +05:30
Daniel Liu
c66f8f9fb2
core/state: fix SetStorage override behavior #30185 ( #1764 )
2025-11-15 16:50:26 +05:30
Daniel Liu
71e8e27f84
all: remove mongodb support in XDCx ( #1679 )
...
* all: remove SDK node
* cmd: remove XDCXDBEngineFlag
* cmd: remove XDCXDBConnectionUrlFlag
* cmd, XDCx: remove XDCXDBReplicaSetNameFlag
* XDCx: remove ConnectionUrl
* all: remove mongodb support
* cmd: remove XDCXEnabledFlag
2025-11-15 16:50:02 +05:30
Daniel Liu
8f0ad36af6
core/state: get rid of field pointer in journal #30361 ( #1761 )
2025-11-15 16:48:52 +05:30
Daniel Liu
fc9ca96104
core/types, miner: remove unused parameter signers for NewTransactionsByPriceAndNonce() ( #1732 )
2025-11-14 22:37:20 +05:30
Daniel Liu
7a3ac998a3
eth: quick canceling block inserting when debug_setHead is invoked #32067 , close XFN-142 ( #1728 )
2025-11-14 21:52:35 +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
wit liu
a9db265d4e
core/state: fix bug about getting stable LogsHash result #33082 ( #1768 )
2025-11-14 20:07:32 +05:30
Daniel Liu
7d4578496c
core: fix runtime error index out of range [0] with length 0, close #1765 ( #1766 )
2025-11-14 20:05:37 +05:30
wit liu
7641bcfd19
core: replace if-else chain with tagged switch on err ( #1751 )
2025-11-14 20:04:33 +05:30
wit liu
d48adc520f
core/types: remove unused var #32989 ( #1753 )
2025-11-14 20:03:48 +05:30
Daniel Liu
782a7ff5cb
all: fix typos, close XFN-23 ( #1725 )
2025-11-14 20:02:34 +05:30
wit liu
891a386a58
core/state: using maps.Clone #29365 ( #1754 )
2025-11-14 20:00:59 +05:30
wit liu
5b873ea522
core :use batch to write chain config ( #1760 )
2025-11-14 19:59:10 +05:30
Daniel Liu
1eec428928
blockchain: ensure state exists for prefetcher #20627 , fix #1738 ( #1742 )
2025-11-14 19:58:35 +05:30
Daniel Liu
d5a03ab9e9
core, eth: fix overuse Of log.Crit, close XFN-102 ( #1648 )
...
* core: fix overuse Of `log.Crit`, close XFN-102
* eth: fix overuse Of `log.Crit`, close XFN-102
2025-11-14 16:28:36 +05:30
Daniel Liu
2c40021f71
core/state, internal/ethapi: GetAccountInfo handle error properly, close XFN-79 ( #1663 )
2025-11-14 16:28:18 +05:30
Daniel Liu
956ebb2b02
core, docs: add solidity document, close XFN-68 ( #1670 )
2025-11-14 16:25:42 +05:30
Daniel Liu
28a4f25166
cmd, core, eth, trie: track deleted nodes #22225 #25757 ( #1120 )
...
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-11-12 13:32:22 +05:30
Wanwiset Peerapatanapokin
7aaa541db1
consensus: implement DeepCopy() in PoolObj, close XFN-04 ( #1723 )
...
* add DeepCopy() for PoolObj
* PoolObj: use deepcopies and optimize locks
* optimize code
2025-11-10 21:56:10 +04:00
Wanwiset Peerapatanapokin
845137849d
consensus: change os.Exit to return error ( #1653 )
2025-11-10 21:55:45 +04:00
Daniel Liu
3af629078a
internal/ethapi: eth_simulateV1 #27720 ( #1606 )
2025-11-08 16:09:18 +05:30
Daniel Liu
13ed19bcf2
all: remove XDCx and XDCxlending public API, close XFN-74 XFN-134 ( #1675 )
...
* internal: remove XDCx public API
* XDCx, XDCxlending: remove api
* ethclient: remove SendOrderTransaction and SendLendingTransaction
* XDCx, XDCxlending: remove unused variables and function
* eth, internal/ethapi: remove function `OrderStats()`
2025-11-04 11:19:16 +05:30
Daniel Liu
851bdc45db
core: skip AddBalance for special-tx, close XFN-67 ( #1629 )
2025-11-04 11:16:26 +05:30
Daniel Liu
5732c4b11b
core/txpool: protect cache with mutex #27898 , close XFN-65 ( #1630 )
2025-11-03 14:55:30 +05:30
Daniel Liu
7fad428a8f
core/types: reuse signtx #29152 , close XFN-63 ( #1631 )
2025-11-03 14:54:31 +05:30
Daniel Liu
96d39a83e1
core: fix variable shadowing, close XFN-104 ( #1649 )
2025-11-03 12:57:52 +05:30
Daniel Liu
96fbe67bf5
core: fix untracked goroutine in procFutureBlocks, close XFN-105 ( #1650 )
2025-11-03 12:57:32 +05:30
Daniel Liu
717610c0d8
core: handle future block more elegantly, close XFN-101 ( #1672 )
2025-11-03 12:52:22 +05:30
Daniel Liu
d2706538e2
XDPoS/engines, core: fix non idiomatic "comma ok" boolean name, close XFN-126 ( #1690 )
2025-11-03 12:45:39 +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
426d4a7a9f
core/txpool: fix name shadowing of filter parameter, close XFN-66 ( #1694 )
2025-11-03 12:44:43 +05:30
Daniel Liu
9d85990309
all: fix missing nil check, close XFN-114 ( #1695 )
2025-11-01 23:21:44 +05:30
Daniel Liu
336d1f9f34
core: fix too many goroutines in InitSignerInTransactions, close XFN-75 ( #1662 )
2025-10-31 12:26:22 +05:30
wit liu
79460e4bfb
all: fix whitespace error of golangci-lint, remove extra empty lines ( #1624 )
2025-10-19 14:42:12 +08:00
Wanwiset Peerapatanapokin
d45da0a149
Merge pull request #1611 from XinFinOrg/upgrade-package-CVE
...
update package version
2025-10-08 09:32:20 +04:00
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
e5c480f234
core/txpool: add eip2681 check for incoming transactions #32726 ( #1594 )
2025-10-08 12:51:48 +08:00
Daniel Liu
6e8d261e42
all: eliminate zero owner variables ( #1587 )
2025-10-08 12:38:32 +08:00
Daniel Liu
54cd4589f0
core: check msg.value earlier in func TransitionDb ( #1582 )
2025-10-08 12:30:22 +08:00
Daniel Liu
8938e27932
all: move err to the last position of return values ( #1581 )
2025-10-08 12:29:38 +08:00
wit liu
f709ef2edb
all: remove extra empty lines ( #1574 )
2025-10-08 12:25:10 +08:00