Commit graph

13062 commits

Author SHA1 Message Date
Daniel Liu
fb300a43fb
cmd/XDC, cmd/utils: set network flag early (#938)
* cmd/XDC: remove unused function applyValues

* cmd/XDC, cmd/utils: remove function SetupNetwork

* cmd/XDC, cmd/utils: set network flag early
2025-04-24 18:09:59 +08:00
benjamin202410
9656e2d1c4
update devnet reward parameter (#980)
Co-authored-by: liam.lai <liam.lai@us>
2025-04-24 03:03:32 -07:00
Daniel Liu
ab0ce75ede
core: simplify code of trading and lending state (#949) 2025-04-24 18:00:21 +08:00
Daniel Liu
733a1be4dc
common, core: add block age into info logs #17718 (#947) 2025-04-24 17:56:54 +08:00
JukLee0ira
10dd75e82f
node: serve JSON-RPC on custom path prefix #22184 (#952) 2025-04-24 11:34:26 +08:00
Daniel Liu
69323a2dbf
rpc: add HTTPError type for HTTP error responses #22677 (#956)
The new error type is returned by client operations contains details of
the response error code and response body.

Co-authored-by: ryanc414 <ryan@tokencard.io>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-04-22 15:16:48 +08:00
Daniel Liu
1667b1027d
p2p: fix goroutine leaks in unit tests #20666 (#954) 2025-04-22 15:14:21 +08:00
benjamin202410
4f98a8b81c
update devnet config to test reward (#951)
* update devnet config to test reward

* udpate reward

---------

Co-authored-by: liam.lai <liam.lai@us>
2025-04-21 01:46:24 -07:00
JukLee0ira
63b04b4114
eth: some typo mistake (#16802) (#948) 2025-04-21 16:36:20 +08:00
Daniel Liu
e974d96977
core/txpool: accept non-local transaction with zero tip (#950) 2025-04-21 16:11:43 +08:00
Daniel Liu
b9a6c8c32d
cmd, core, eth, trie: add trie read caching layer (#18087) (#946) 2025-04-16 17:27:43 +08:00
Daniel Liu
5759893f2b
trie: quell linter warnings in commiter.go (#21329) (#945) 2025-04-16 17:10:42 +08:00
Daniel Liu
bf893cb73b
trie: reduce allocs in insertPreimage (#21261) (#943)
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2025-04-16 17:08:31 +08:00
Daniel Liu
c91a67c4c0
common: enable cancun after 1800 blocks in eip1559 (#942) 2025-04-16 17:07:41 +08:00
wgr523
6a38aa00aa
Reward float upgrade (#940)
* feat: use float type reward

* feat: add test of float reward
2025-04-16 02:03:41 -07:00
benjamin202410
4a8800674d
Merge pull request #941 from gzliudan/rollback-eip1559
all: bump version to v2.6.1-beta
2025-04-13 14:39:43 -07:00
Daniel Liu
66aff99ca0 params: bump version to v2.6.1-beta 2025-04-12 11:38:37 +08:00
Daniel Liu
7aaf724f4f all: update parameters for rollback 2025-04-12 11:38:27 +08:00
Daniel Liu
734abb26dc Revert "core/types: fix wrong hash after EIP-1559 for EncodeIndex in PR #933 (#939)"
This reverts commit 0cc4813e48.
2025-04-12 11:30:50 +08:00
JukLee0ira
b1e08e6642
all: refactor package node #21105 (#923) 2025-04-10 18:52:49 +08:00
Daniel Liu
0cc4813e48
core/types: fix wrong hash after EIP-1559 for EncodeIndex in PR #933 (#939) 2025-04-09 00:05:21 +08:00
Wanwiset Peerapatanapokin
9a00e475b4
Merge pull request #930 from XinFinOrg/add-api-limit
consensus/XDPoS: add limit to high resource demand api
2025-04-08 15:31:50 +04:00
Daniel Liu
5328a637c0 trie: use unified emptyRootHash and emptyCodeHash (#26718) 2025-04-07 16:44:32 +08:00
Daniel Liu
c8b39cabae trie: faster trie node encoding (#24126) 2025-04-07 16:44:32 +08:00
Paweł Bylica
4df7801137 trie: simplify StackTrie implementation (#23950)
Trim the search key from head as it's being pushed deeper into the trie. Previously the search key was never modified but each node kept information how to slice and compare it in keyOffset. Now the keyOffset is not needed as this information is included in the slice of the search key. This way the keyOffset can be removed and key manipulation
simplified.
2025-04-07 16:44:32 +08:00
Paweł Bylica
ad16ad23a5 trie: more tests for stacktrie (#23936) 2025-04-07 16:44:32 +08:00
aaronbuchwald
f25180b7f8 trie: add missing copyright header (#23530)
* Add missing copyright header

* Update stacktrie_test.go

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2025-04-07 16:44:32 +08:00
Martin Holst Swende
e3efb24444 trie: make stacktrie support binary marshal/unmarshal (#22685) 2025-04-07 16:44:32 +08:00
Martin Holst Swende
a8bd860e2f trie: make stacktrie not mutate input values (#22673)
The stacktrie is a bit un-untuitive, API-wise: since it mutates input values.
Such behaviour is dangerous, and easy to get wrong if the calling code 'forgets' this quirk. The behaviour is fixed by this PR, so that the input values are not modified by the stacktrie.

Note: just as with the Trie, the stacktrie still references the live input objects, so it's still _not_ safe to mutate the values form the callsite.
2025-04-07 16:44:32 +08:00
Daniel Liu
3eb9f63513 core/types: implement DerivableList interface for transactions and receipts (#21502) 2025-04-07 16:44:32 +08:00
Daniel Liu
dcea73039c trie: bloom-filter based pruning mechanism (#21724) 2025-04-07 16:44:32 +08:00
Daniel Liu
5b8c267122 trie: use trie.NewStackTrie instead of new(trie.Trie) (#22246) 2025-04-07 16:44:32 +08:00
Martin Holst Swende
f7fd4af087 trie: stacktrie fixes (#21799)
* trie: fix error in stacktrie not committing small roots

* trie: improved tests

* trie: fix error in stacktrie with small nodes

* trie: add (skipped) testcase for stacktrie

* trie: fix docs in stacktrie
2025-04-07 16:44:32 +08:00
Martin Holst Swende
87270e3988 trie: fix flaw in stacktrie pool reuse (#21699) 2025-04-07 16:44:32 +08:00
gary rong
1424987768 trie: polish commit function (#21692)
* trie: polish commit function

* trie: fix typo
2025-04-07 16:44:32 +08:00
gary rong
9da3ae1075 trie: polishes to trie committer (#21351)
* trie: update tests to check commit integrity

* trie: polish committer

* trie: fix typo

* trie: remove hasvalue notion

According to the benchmarks, type assertion between the pointer and
interface is extremely fast.

BenchmarkIntmethod-12           1000000000               1.91 ns/op
BenchmarkInterface-12           1000000000               2.13 ns/op
BenchmarkTypeSwitch-12          1000000000               1.81 ns/op
BenchmarkTypeAssertion-12       2000000000               1.78 ns/op

So the overhead for asserting whether the shortnode has "valuenode"
child is super tiny. No necessary to have another field.

* trie: linter nitpicks

Co-authored-by: Martin Holst Swende <martin@swende.se>
2025-04-07 16:44:32 +08:00
Daniel Liu
54f73e471f trie: Derivesha with stacktrie (#21407) 2025-04-07 16:44:32 +08:00
Daniel Liu
a4c7d7f458 all: clean duplicate constants in package common 2025-04-07 16:43:01 +08:00
Daniel Liu
468babfc3e console, internal/jsre: fix autocomplete issues (#26518) 2025-04-07 16:38:42 +08:00
Daniel Liu
5a49853cb4 Makefile: add devtools and help targets, remove gc target 2025-04-07 16:38:00 +08:00
Daniel Liu
a6cd3c54eb build: support auto-completion for bash 2025-04-07 16:37:05 +08:00
wanwiset25
f3a2577a76 simplify code 2025-04-04 09:56:41 +04:00
Wanwiset Peerapatanapokin
993d08cc3a
Merge pull request #931 from XinFinOrg/fix-docker-warning
cicd: fix warning when build docker
2025-04-02 11:19:42 +04:00
Daniel Liu
7198179c2a cmd, trie: remove cmd/gc and hide some types in trie 2025-04-01 16:34:35 +08:00
Daniel Liu
91cbe818ea common, params: define cancun block for testnet and print more chain config 2025-04-01 14:41:05 +08:00
wanwiset25
f9585a5f3e fix docker build warning 2025-03-31 06:03:42 +04:00
wanwiset25
229caf0125 add limit to high resource demand api 2025-03-31 06:00:27 +04:00
benjamin202410
b8a9a8bfb1
Merge pull request #924 from XinFinOrg/update-reward-percapita
Update reward percapita
2025-03-28 23:52:33 -07:00
Daniel Liu
ff7bcf8d15 core/state: separate hashes and committer, collapse on commit (#20481) 2025-03-28 22:34:59 +08:00
Daniel Liu
db4dc24094 core/state: accumulate writes and only update tries when must (#19953) 2025-03-28 22:34:59 +08:00