JukLee0ira
bea4431f6f
eth/filters: avoid block body retrieval when no matching logs ( #25199 )
2024-08-03 10:03:22 +08:00
JukLee0ira
09d3ede8c0
core: cleanup tests ( #25641 )
2024-08-03 10:03:22 +08:00
JukLee0ira
ad71d706fb
all: add global block logs cache ( #25459 )
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
JukLee0ira
83782e5368
eth/filters: remove use of event.TypeMux for pending logs ( #20312 )
2024-08-03 10:03:22 +08:00
Daniel Liu
4976b7cbb3
Fix some panic cuased by nil block, statedb, header ( #578 )
...
* fix panic during rollback
* eth/hooks: check nil stateDB to fix issue #271
* internal/ethapi: fix eth_call crash
* all: check nil statedb
* eth: check nil block for tracer api
* internal/ethapi: check nil header and block
2024-08-02 17:05:53 -07:00
Daniel Liu
31098e717a
core: save new blocks during reorg ( #599 )
2024-08-02 16:55:41 -07:00
Daniel Liu
e9e94e640d
core: save new blocks during reorg ( #596 )
2024-08-02 16:53:49 -07:00
wanwiset25
4be4f2eeb1
fix tests
2024-06-28 18:35:47 +04:00
wanwiset25
57b11ab4c9
try use insertblock in fetcher
2024-06-28 11:33:04 +04:00
wanwiset25
c9ee3240fb
fix tests
2024-06-28 11:33:04 +04:00
Martin Holst Swende
8f4a269437
eth, les: add sanity checks for unbounded block fields ( #19573 )
...
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.
2024-06-28 11:33:04 +04:00
Péter Szilágyi
3f87990a71
core/forkid: add two clauses for more precise validation ( #20220 )
2024-06-28 11:33:04 +04:00
wanwiset25
ae52ca6e83
eth: eth/64 - extend handshake with with fork id ( #20140 )
2024-06-28 11:31:06 +04:00
Shane Bammel
4707d1c549
core/forkid: fix off-by-one bug ( #22879 )
...
* forkid: added failing test
* forkid: fixed off-by-one bug
2024-06-28 11:30:31 +04:00
Péter Szilágyi
8e998ecabe
core/forkid: implement the forkid EIP, announce via ENR ( #19738 )
...
* 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
2024-06-28 11:30:31 +04:00
Daniel Liu
3e9bd359df
ethclient: serialize negative block number as "pending" ( #21177 )
2024-06-20 15:52:32 +08:00
Daniel Liu
aa88078dd1
core/types: convert status type from uint to uint64 ( #16784 )
2024-06-20 15:52:32 +08:00
JukLee0ira
2d89951e5b
all: use errrors.New instead of empty fmt.Errorf
2024-06-14 19:19:21 +08:00
JukLee0ira
15bbb5d3d5
XDCx,core,XDCxlending,miner: reduce duplicate calls
2024-06-06 19:33:59 +08:00
JukLee0ira
9ffacc595d
core: simplify code expression
2024-06-06 19:33:59 +08:00
JukLee0ira
0aab4ced98
common: add binary variables for system contract
2024-06-06 19:33:59 +08:00
JukLee0ira
21c62f9ef0
XDCx,XDCxlending,consensus,core: not compare adresss by String
2024-06-06 19:33:39 +08:00
Daniel Liu
fd8811cc9e
core, backends: rename callmsg to callMsg
2024-05-14 23:27:23 +08:00
Daniel Liu
e82bef5b87
core/types: remove duplication in eip2930 signer ( #27860 )
2024-05-14 23:27:23 +08:00
Daniel Liu
7a95b4f907
core, eth, internal/ethapi: create access list RPC API ( #22550 )
2024-05-14 23:27:23 +08:00
Daniel Liu
5cb014b60f
core, eth/tracer: initialize tracer statedb in CaptureStart ( #22333 )
2024-05-14 23:27:23 +08:00
Derek Chiang
5edfd8f9eb
core: fix method comment for txpool.requestReset ( #22543 )
2024-05-14 23:27:23 +08:00
Daniel Liu
349dc1bacd
core/types: improve comments in new EIP-2718 code ( #22402 )
2024-05-14 23:15:35 +08:00
Daniel Liu
0ccf119cd7
core/types: reduce allocations in GasPriceCmp ( #22456 )
2024-05-14 23:15:35 +08:00
Daniel Liu
01e1728a94
all: add support for EIP-2718, EIP-2930 transactions ( #21502 )
2024-05-14 23:15:35 +08:00
Marius van der Wijden
76b29b2f25
core: reset txpool state on sethead ( #22247 )
...
fixes an issue where local transactions that were included in the chain before a SetHead were rejected if resubmitted, since the txpool had not reset the state to the current (older) state.
2024-05-14 11:44:26 +08:00
gary rong
289304f876
core/txpool: remove "local" notion from the txpool price heap ( #21478 )
...
* core: separate the local notion from the pricedHeap
* core: add benchmarks
* core: improve tests
* core: address comments
* core: degrade the panic to error message
* core: fix typo
* core: address comments
* core: address comment
* core: use PEAK instead of POP
* core: address comments
2024-05-14 11:08:53 +08:00
Martin Holst Swende
a6d591b01b
core: fix txpool off-by-one error ( #21683 )
2024-05-14 10:09:43 +08:00
Marius van der Wijden
6935687790
core: more detailed metering for reorgs ( #21420 )
2024-05-13 22:07:04 +08:00
Hao Duan
28baf9f1fd
core: avoid modification of accountSet cache in tx_pool ( #21159 )
...
* core: avoid modification of accountSet cache in tx_pool
when runReorg, we may copy the dirtyAccounts' accountSet cache to promoteAddrs
in which accounts will be promoted, however, if we have reset request at the
same time, we may reuse promoteAddrs and modify the cache content which is
against the original intention of accountSet cache. So, we need to make a new
slice here to avoid modify accountSet cache.
* core: fix flatten condition + comment
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-05-13 22:07:04 +08:00
Daniel Liu
b9f373fb57
core: fix queued transaction eviction #21300
2024-05-13 22:07:04 +08:00
Martin Holst Swende
ff246355a2
core: transaction pool optimizations ( #21328 )
...
* core: added local tx pool test case
* core, crypto: various allocation savings regarding tx handling
* core/txlist, txpool: save a reheap operation, avoid some bigint allocs
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-05-13 22:07:03 +08:00
Daniel Liu
48f9bbed50
core: types: less allocations when hashing and tx handling ( #21265 )
2024-05-13 22:07:03 +08:00
Hao Duan
1776bf1313
core: filter out txs with invalid signatures as soon as possible ( #21170 )
...
Once we detect an invalid transaction during recovering signatures, we should
directly exclude this transaction to avoid validating the signatures hereafter.
This should optimize the validations times of transactions with invalid signatures
to only one time.
2024-05-13 22:07:03 +08:00
chenglin
cf41742040
core: collect NewTxsEvent items without holding reorg lock ( #21145 )
2024-05-13 22:07:03 +08:00
Daniel Liu
624371433e
core: fix typos in comments ( #21118 )
2024-05-13 22:07:03 +08:00
Daniel Liu
7179efd4da
core: announce based transaction propagation ( #20234 )
2024-05-13 22:07:03 +08:00
Martin Holst Swende
d972bbd681
core: set max tx size down to 2 slots (64KB)
2024-05-13 22:07:03 +08:00
Daniel Liu
b7f4362c57
core: count tx size in slots, bump max size ot 4x32KB ( #20352 )
2024-05-13 22:07:03 +08:00
Péter Szilágyi
d1415837cf
core: fix tx dedup return error count ( #20085 )
2024-05-13 22:07:03 +08:00
Daniel Liu
bef2c34e44
core: dedup known transactions without global lock, track metrics ( #20081 )
2024-05-13 22:07:03 +08:00
Martin Holst Swende
656f2a6167
core: smaller txpool status locking ( #20080 )
...
* txpool: smaller lock portion
* core/tx_pool: fix data race
2024-05-13 22:07:03 +08:00
Daniel Liu
19fb6103c0
fix: rename func AddRemoteSync to addRemoteSync
2024-05-13 22:07:03 +08:00
Daniel Liu
7cce425000
Revert "core, light, params: implement eip2028 ( #19931 )"
...
This reverts commit 67825d860b .
2024-05-11 06:11:46 +08:00
Daniel Liu
742a7f9348
core, metrics: switch some invalid counters to gauges ( #20047 )
2024-05-10 19:48:10 +08:00
Daniel Liu
67825d860b
core, light, params: implement eip2028 ( #19931 )
2024-05-10 19:48:10 +08:00
Daniel Liu
b708614470
core, les: fix les unit tests ( #19823 )
2024-05-10 19:48:10 +08:00
Daniel Liu
edaed4fd92
core: fix write concurrency in txpool ( #19835 )
2024-05-10 19:48:10 +08:00
Daniel Liu
6338a4195b
core: kill off managed state, use own tiny noncer for txpool ( #19810 )
2024-05-10 19:48:10 +08:00
Daniel Liu
74c72363d0
core: move TxPool reorg and events to background goroutine ( #19705 )
2024-05-10 19:48:10 +08:00
Daniel Liu
ddbf5d2782
core: expose various counter metrics for grafana ( #19692 )
2024-05-10 19:48:10 +08:00
Daniel Liu
65baaaaf80
core: cache tx signature before obtaining lock ( #19351 )
2024-05-10 19:48:10 +08:00
Daniel Liu
c5b22fbc32
core: make txpool handle reorg due to setHead ( #19308 )
2024-05-09 19:00:41 +08:00
Daniel Liu
676c4e8ec7
core: sanitize more TxPoolConfig fields ( #17210 )
2024-05-09 18:39:32 +08:00
Daniel Liu
6b87c07876
core: fix comment typo ( #18144 )
2024-05-09 18:38:27 +08:00
Daniel Liu
a6664651c7
core: fix a typo ( #17733 )
2024-05-09 18:38:27 +08:00
Daniel Liu
ec50ca36d9
core, eth, trie: use common/prque ( #17508 )
2024-05-09 18:38:27 +08:00
Daniel Liu
6c657ef6af
core: priority mining ( #17472 )
2024-05-09 18:38:27 +08:00
Daniel Liu
41b29a8cf8
Fixed typo addresssByHeartbeat -> addressesByHeartbeat ( #17243 )
2024-05-09 18:38:27 +08:00
Daniel Liu
241201cf0e
core: fixed typo ( #17214 )
2024-05-09 18:38:27 +08:00
Daniel Liu
5b883dee30
core/tx_pool: reduce judgement levels ( #16980 )
2024-05-09 18:38:27 +08:00
Daniel Liu
859308c03f
core: change comment to match code more closely ( #16963 )
2024-05-09 18:38:27 +08:00
Daniel Liu
4f0f6e08c7
core: concurrent background transaction sender ecrecover ( #16882 )
2024-05-09 18:38:27 +08:00
Daniel Liu
fb89a5406b
core: fix transaction event asynchronicity ( #16843 )
2024-05-09 18:38:27 +08:00
Daniel Liu
88695caf8f
core: use a wrapped map w/ sync.RWMutex for TxPool.all to remove contention in TxPool.Get. ( #16670 )
2024-05-09 18:38:27 +08:00
Daniel Liu
2060ff7eeb
core: Ensure that local transactions aren't discarded as underpriced ( #16576 )
2024-05-09 18:38:27 +08:00
Daniel Liu
702e0caa29
core: txpool stable underprice drop order, perf fixes ( #16494 )
2024-05-09 18:38:23 +08:00
Wang Gerui
4178a97560
feat: extend eth_call api with state override;
...
extend statedb and state_object with necessary code
2024-04-30 15:57:42 +08:00
Daniel Liu
8568af05cc
all: implement EIP-2929 (gas cost increases for state access opcodes) ( #21509 )
2024-04-22 21:14:54 +08:00
Daniel Liu
3b9fc516f6
Merge pull request #524 from gzliudan/revert-pr320
...
Revert PR320
2024-04-22 21:04:44 +08:00
Wanwiset Peerapatanapokin
fb91c1e802
add trigger for disable XDCx precompiles ( #509 )
2024-04-22 11:43:22 +04:00
Daniel Liu
56d9a6e39c
core, filters: not set log.BlockHash
2024-04-20 16:27:21 +08:00
Liam
ef4b8ef91b
Disable on xdcx receiver part ( #521 )
...
* update all IsTIPXDCXReceiver condition
* add TIPXDCXReceiverDisable on testnet and devnet
2024-04-19 22:17:22 +08:00
Daniel Liu
50847c9724
types, core, miner: add block location fields to receipt
2024-04-12 13:36:55 +08:00
wgr523
b5358663fe
Merge pull request #497 from XinFinOrg/xdf-05
...
XDF-05 fix: Future Blocks Are Always Verified Instead Of Queued
2024-04-01 20:48:58 +08:00
Daniel Liu
1c9f1d8279
all: change TxPreEvent to TxsPreEvent ( #16720 )
2024-03-28 11:16:21 +08:00
Wanwiset Peerapatanapokin
06b280aa0d
add log deepcopy to ensure complete replica of state ( #449 )
...
implement "deep copy" as go-ethereum
2024-03-26 13:40:07 +04:00
Gary
6fd9a5305a
fix: Future Blocks Are Always Verified Instead Of Queued
2024-03-19 20:38:57 +08:00
Wanwiset Peerapatanapokin
8edb76f08d
Revert "core/state: abort commit if errors have occurred ( #484 )" ( #489 )
...
This reverts commit 0114ecabd0 .
2024-03-13 11:54:09 +04:00
Daniel Liu
4616d59935
internal/ethapi: support block number or hash on state-related methods ( #19491 )
...
* Support for EIP-1898.
2024-03-12 10:40:03 +08:00
Wanwiset Peerapatanapokin
0114ecabd0
core/state: abort commit if errors have occurred ( #484 )
2024-03-11 13:19:24 +04:00
Wanwiset Peerapatanapokin
910d415653
Missing json Field Tags in Marshalled Struct ( #475 )
2024-03-08 15:38:33 +04:00
Daniel Liu
6a2f753cee
Merge pull request #472 from XinFinOrg/eip3855
...
core/vm: implement EIP-3855: PUSH0 instruction.
2024-03-07 23:01:33 +08:00
geruiwang
863d4f14e3
eth/tracers/js: fix isPush for push0 ( #28520 )
...
Fixes so that `push0` opcode is correctly reported as `true` by the `IsPush` function
---------
Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-03-07 22:31:19 +08:00
geruiwang
968440ce3d
core/vm: implement EIP-3855: PUSH0 instruction.
2024-03-07 21:44:37 +08:00
Wang Gerui
0e36b5be42
fix typo in EIPs
2024-03-07 21:37:33 +08:00
Wanwiset Peerapatanapokin
ae10d7090c
Rollback privacy ( #477 )
...
Rollback the previous test removal or privacy package on devnet.
This reverts commit 4f79e535b37dc85144e2d38c2f2570b0ce4305b2.
This reverts commit 5a2722c268ec4f03f3117b1af2dee2411af4b13a.
2024-03-07 10:40:55 +04:00
Daniel Liu
ece58f00b5
ethapi: add method eth_getAccountInfo
2024-03-06 14:11:15 +08:00
Daniel Liu
bbe08ac6e6
core/state: add function GetStorageRoot
2024-03-06 14:10:08 +08:00
Liam
38a192e672
Merge pull request #459 from XinFinOrg/eip4399
...
implement EIP-4399, PREVRANDAO opcode
2024-03-04 17:50:56 +11:00
Wanwiset Peerapatanapokin
b86c7f646f
Try remove privacy pkg ( #466 )
...
* try removing privacy pkg
* rm more reference
* trigger CI
2024-03-04 07:59:45 +04:00
Gerui Wang
a31489541d
implement EIP-4399, PREVRANDAO opcode.
...
and remove unused LondonBlock and BerlinBlock in `params/config.go` (already defined in constants.go)
2024-03-04 00:32:14 +08:00
Daniel Liu
928a0691ca
implement EIP-3198
2024-03-01 15:04:32 +08:00
lmittmann
b36678f7ad
core/vm: performance tweak of OpCode.String() ( #28453 )
...
make `opCodeToString` a `[256]string` array
Co-authored-by: lmittmann <lmittmann@users.noreply.github.com>
2024-03-01 14:13:24 +08:00