wanwiset25
cb792ef34f
Revert EIP-2464
2024-08-24 02:31:27 +07:00
Daniel Liu
45e57e41b4
internal/ethapi: refactor func ToMessage for CallArgs
2024-08-21 15:15:53 +08:00
JukLee0ira
3f40987cca
core/rawdb: rearranging function order
2024-08-19 22:32:20 +08:00
JukLee0ira
544190f584
core: cache block hash and number
2024-08-07 14:59:36 +08:00
JukLee0ira
074095b1d5
core: fix writeBlock
2024-08-07 14:59:36 +08:00
wgr523
52077f18f3
support for golang tracers + add golang callTracer ( #558 )
...
* feat: rename Tracer interface to EVMLogger;
minor changes in API
refine api_tracer.go
refine Tracer interface
* fix: broken tracer tests
* feat: add BenchmarkTransactionTrace
* feat: tracer CaptureEnter CaptureExit in evm
* feat: upgrade js tracers with geth upstream
* chore: clean test
* feat: eth/tracers: support for golang tracers + add golang callTracer
cf. https://github.com/ethereum/go-ethereum/pull/23708
* chore: clean testdata json
* fix: change test due to IntrinsicGas is not upgraded
* feat: make native Tracer the default Tracer
* fix: update tracers.New in api
* fix: addr prefix in callTracer
* fix: remove `native` in BenchmarkTracers
* fix: return consensus error of InsufficientBalance for tx, instead of vmerr
* chore: drop js tracers: call and noop
2024-08-06 00:14:04 -07:00
JukLee0ira
9a40c26bf8
core,eth,light: remove duplicated functions
2024-08-03 10:03:22 +08:00
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
Leon
8b6db6d87a
core/vm: better handle error on eip activation check ( #25131 )
...
* core/vm: correct logic for eip check of NewEVMInterpreter
* refactor
2024-03-01 14:13:24 +08:00
Qian Bin
032b98e942
core/vm: optimize Memory.Set32 ( #24847 )
...
* core/vm: remove unnecessary memset for Memory.Set32
* core/vm: optimize Memory.Set32
2024-03-01 14:13:24 +08:00
s7v7nislands
62b62da730
core/vm: separate opcode group for 0x20 range ( #24850 )
2024-03-01 14:13:24 +08:00
s7v7nislands
ac35f0ecec
core/vm: clean up some dead functions ( #24851 )
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
b022ba2c5d
core/vm: make INVALID a defined opcode ( #24017 )
...
* core/vm: Define 0xfe opcode as INVALID
* core/vm: Remove opInvalid as opUndefined handles it
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2024-03-01 14:13:24 +08:00
Paweł Bylica
6e92486296
core/vm: reverse bit order in bytes of code bitmap ( #24120 )
...
* core/vm: reverse bit order in bytes of code bitmap
This bit order is more natural for bit manipulation operations and we
can eliminate some small number of CPU instructions.
* core/vm: drop lookup table
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
2ce30010bc
core/vm: remove unused code (IsStaticJump) ( #24085 )
2024-03-01 14:13:24 +08:00
Martin Holst Swende
fbc1cc11ba
core/vm: remove no-recursion option from config (24066)
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
4c27910a77
core/vm: move interpreter interruption check to jump instructions ( #24026 )
...
* core/vm: Remove interpreter loop interruption check
* core/vm: Unit test for interpreter loop interruption
* core/vm: Check for interpreter loop abort on every jump
2024-03-01 14:13:24 +08:00
Paweł Bylica
7d3c783bb9
core/vm: fill gaps in jump table with opUndefined ( #24031 )
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
ae267d3da7
core/vm: remove stack.pushN ( #24040 )
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
b1c03864e6
core/vm: rename opSuicide to opSelfdestruct ( #24022 )
...
The opcode was renamed in the codebase in 2017, but the functions were kept unchanged.
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
bfbb678309
core/vm: move interpreter.ReadOnly check into the opcode implementations ( #23970 )
...
* core/vm: Move interpreter.ReadOnly check into the opcode implementations
Also remove the same check from the interpreter inner loop.
* core/vm: Remove obsolete operation.writes flag
* core/vm: Capture fault states in logger
Co-authored-by: Martin Holst Swende <martin@swende.se>
* core/vm: Remove panic added for testing
Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
002be52ae9
core/vm: don't copy JumpTable when no EIP mods are needed ( #23977 )
2024-03-01 14:13:24 +08:00
Alex Beregszaszi
c097e565fd
core/vm: rename SHA3 instruction to KECCAK256 ( #23976 )
...
This was proposed in 2016, Solidity uses this since 2017, and evmone and other VMs use the keccak256 name. This brings geth in line with those.
2024-03-01 14:13:24 +08:00
Paweł Bylica
823ec33484
core/vm: simplify error handling in interpreter loop ( #23952 )
...
* core/vm: break loop on any error
* core/vm: move ErrExecutionReverted to opRevert()
* core/vm: use "stop token" to stop the loop
* core/vm: unconditionally pc++ in the loop
* core/vm: set return data in instruction impls
2024-03-01 14:13:24 +08:00
Andrei Maiboroda
6415934da9
core/vm: simplify op lookup in contract ( #23974 )
2024-03-01 14:13:23 +08:00
Martin Holst Swende
f7c6b1abd4
core/vm, core/state/snapshot: remove unused code ( #23956 )
...
* core/state/snapshot: remove wiper functionality
* core/vm: remove unused 'unofficial' opcodes
2024-03-01 14:13:23 +08:00
Paweł Bylica
3d3cc6c6d7
core/vm: use proper JumpTable type ( #23967 )
2024-03-01 14:13:23 +08:00
Martin Holst Swende
f9e14af6fd
core/vm: don't use iota for opcode definitions ( #23928 )
2024-03-01 14:13:23 +08:00
Paweł Bylica
dc8cdf3e62
core/vm: rework jumpdest analysis benchmarks ( #23499 )
...
* core/vm: rework jumpdest analysis benchmarks
For BenchmarkJumpdestOpAnalysis use fixed code size of ~1.2MB
and classic benchmark loop.
* core/vm: clear bitvec in jumpdest analysis benchmark
2024-03-01 14:13:23 +08:00
Guillaume Ballet
f05fa009e2
core/vm: fix typo in comment ( #23450 )
2024-03-01 14:13:23 +08:00
Daniel Liu
7a55b9f788
core/state: remove unused methods ReturnGas ( #23092 )
2024-03-01 14:13:23 +08:00
Evgeny Danilenko
21bbe5f568
core/vm: avoid duplicate log in json logger ( #22825 )
2024-03-01 14:13:23 +08:00
aaronbuchwald
7c6908b959
core/vm: fix interpreter comments ( #22797 )
...
* Fix interpreter comment
* Fix comment
2024-03-01 14:13:23 +08:00
Paweł Bylica
9c8d228dda
core/vm: clean up contract creation error handling ( #22766 )
...
Do not keep separate flag for "max code size exceeded" case, but instead
assign appropriate error for it sooner.
2024-03-01 14:13:23 +08:00
aaronbuchwald
6077ecb195
core/vm: replace repeated string with variable in tests ( #22774 )
2024-03-01 14:13:23 +08:00
Martin Holst Swende
446b9e86f4
core/vm, params: make 2200 in line with spec ( #21605 )
2024-03-01 14:13:23 +08:00
Péter Szilágyi
06d5da016c
core/vm: use pointers to operations vs. copy by value ( #21336 )
2024-03-01 14:13:23 +08:00
Paweł Bylica
192edc0c63
core/vm: use uint256 in EVM implementation ( #20787 )
...
* core/vm: use fixed uint256 library instead of big
* core/vm: remove intpools
* core/vm: upgrade uint256, fixes uint256.NewFromBig
* core/vm: use uint256.Int by value in Stack
* core/vm: upgrade uint256 to v1.0.0
* core/vm: don't preallocate space for 1024 stack items (only 16)
Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-03-01 14:13:23 +08:00
Daniel Liu
3f10de24b0
core/vm/privacy: fix test case in ringct_test.go ( #424 )
2024-02-19 10:52:33 +08:00
Liam
9eea134daa
Merge pull request #424 from gzliudan/RIN-07
...
check parameters not to be nil when call function curve.Add
2024-02-12 22:23:34 +11:00
Wanwiset Peerapatanapokin
b272e7418c
Fix curve ( #429 )
...
* update secp256k1 library from go-eth code
* cast deprecated functions to use new BitCurve type
* add IsOnCurve checks and tests
* add test outcome check
* fix test
2024-02-11 15:59:28 +04:00
Wanwiset Peerapatanapokin
30581274a1
RIN-08 RIN-10 RIN-11 Fix curve issues ( #425 )
...
* update secp256k1 library from go-eth code
* cast deprecated functions to use new BitCurve type
* add IsOnCurve checks and tests
* add test outcome check
2024-02-11 01:51:11 +04:00
Banana-J
f453ce8315
fix: missing validation in scalar range check ( #417 )
2024-02-09 19:56:27 +11:00
Daniel Liu
d440d1d2c6
not pass nil parameters to function curve.Add
2024-02-08 14:50:44 +08:00
Banana-J
ea7d5cc9ad
fix: remove unnecesasry int conversion in the bulletproof.go ( #419 )
...
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-02-06 22:13:28 +11:00
Liam
fea90a97df
RIN-02 Panic Due to Integer Overflow in Signature Size Calculation ( #401 )
...
* RIN-02 Panic Due to Integer Overflow in Signature Size Calculation
* assert the error
* simply overflow check
* simply overflow check
---------
Co-authored-by: Liam Lai <liam.lai@datameshgroup.com>
2024-02-03 10:02:14 +08:00
Banana-J
0664e9fc47
chore: remove the unused false return value from GetCollaterals method ( #410 )
2024-01-29 11:31:10 +11:00
Banana-J
d70c15667b
chore: remove the unused method in ringct.go ( #411 )
2024-01-29 11:31:02 +11:00
Banana-J
cac03bd960
fix: GenNewKeyRing should return out of bound error if s and ring size equal in value ( #412 )
2024-01-29 11:27:48 +11:00
Banana-J
743fc8500b
chore: return statement optimization ( #406 )
2024-01-28 16:58:41 +11:00
Banana-J
2504961a33
fix: replace all time.after with the time.newtimer ( #400 )
2024-01-27 21:01:24 +11:00
Daniel Liu
0d7dd867b7
Merge pull request #402 from gzliudan/XDP-02
...
remove key with empty value from map txs in function NewOrderTransactionByNonce
2024-01-26 10:34:33 +08:00
Daniel Liu
ffa38cd8d1
fix bug and eliminate loop in func PadTo32Bytes
2024-01-24 16:31:13 +08:00
Daniel Liu
e097f2b0df
remove key with empty value from map txs in func NewOrderTransactionByNonce
2024-01-24 13:45:50 +08:00
Wanwiset Peerapatanapokin
aaa246f60e
PDF-01 ( #397 )
...
* replace deprecated ioutil lib calls
* fix for FileInfo type required
* fix for ioutil.Discard
* fix .Discard
* fix for go-bindata generated files
2024-01-19 15:05:03 +04:00
Liam
81ff6421d0
fix Panic In ProcessOrderPending Leads To Chain Halt ( #392 )
...
Co-authored-by: Liam Lai <liamlai@Liams-Laptop.local>
2024-01-19 11:22:24 +11:00
Daniel Liu
ded4e0fd90
fix nil Error in func reportBlock ( #369 )
2023-12-05 20:29:19 +08:00
Liam
ac404683b3
Merge pull request #365 from XinFinOrg/bump-go-v2
...
Bump go v1.21
2023-11-21 23:44:14 +11:00
Liam
f7025cee2f
Merge pull request #346 from gzliudan/defer-time.Since
...
call to time.Since is not deferred
2023-11-21 23:22:58 +11:00
Liam
87ba815341
Merge pull request #336 from gzliudan/fix-func-procFutureBlocks
...
Fix a loop closure bug in func procFutureBlocks
2023-11-21 23:19:08 +11:00
Liam Lai
824d7b232f
resolve conflict
2023-11-20 23:53:49 +11:00
Liam
c215316744
Make masternode dynamic ( #356 )
...
* make masternode dynamic
* fix all the tests
* remove cmt
* fix test again
2023-11-16 23:59:19 +11:00
Liam
84994df759
Merge pull request #351 from XinFinOrg/bump-golang-1.21
...
Bump golang 1.21
2023-11-07 10:35:42 +11:00
Daniel Liu
cd9f4f8094
core: fix loop closure bug in func procFutureBlocks
2023-11-01 15:02:04 +08:00
Daniel Liu
349f71db7b
defer time.Since
2023-11-01 12:43:50 +08:00
Daniel Liu
f4154d0479
remove lendingstate.EmptyAddress
2023-10-24 12:27:03 +08:00
Daniel Liu
2c02ddc2d9
remove xdc0000000000000000000000000000000000000000
2023-10-24 12:15:30 +08:00
Daniel Liu
e2359d9b8c
filter zero address in function GetCandidates
2023-10-24 12:15:24 +08:00
Daniel Liu
320b358830
replace package sort with common/sort
2023-10-23 22:51:06 +08:00
Daniel Liu
7adb98fbe8
update gas fee
2023-10-16 11:24:47 +08:00
Daniel Liu
148e2f1699
add parameter number for function NewMessage
2023-10-16 11:24:47 +08:00
Daniel Liu
0e8b3f1d31
replace TRC21Cost with TxCost
2023-10-16 11:24:47 +08:00
Daniel Liu
9a7ffaa09f
change msg.gasPrice in function AsMessage
2023-10-16 11:24:47 +08:00
Daniel Liu
845d3d49e5
change minGasPrice in function validateTx
2023-10-16 11:24:47 +08:00
Daniel Liu
02158d06d9
core: fix blockHash for eth_getLogs, eth_getFilterLogs, eth_getTransactionReceipt ( #208 )
2023-08-31 15:26:26 +08:00
Liam Lai
5623ce8de0
merge from master
2023-07-30 16:50:45 +10:00
Wanwiset Peerapatanapokin
a959bea092
add standbynodes in GetMasternodesByNumber similar way to subnet
2023-07-21 10:07:05 +04:00
wgr523
d578e092cd
stop reorg at committed blocks ( #276 )
...
This PR makes committed blocks non-reorg-able inside `Blockchain` struct. This ensures V2 consensus safety property in the aspect of blockchain head: committed blocks' state will not be reorg and users will always see committed blocks (or their child blocks) as current head of the blockchain.
* stop reorg at committed blocks
* fix tests
* fix tests
2023-06-08 01:16:13 +08:00
wgr523
3e0505a0c7
cherry-pick from d8ada03eac ( #255 )
2023-05-25 14:23:27 +10:00
wgr523
cd74061ac2
Extend masternode candidate ( #261 )
...
* V2 truncate MaxMasternodes from candidates after penalty,
V1 same as before
TestUpdateMultipleMasterNodes: test V2, in snapshot we have all candidates, but at epoch switch, we pick MaxMasternodes
* code looks better
2023-05-16 21:43:56 +08:00
Liam
153f8d296d
Fix API penalty bug and add more info in api ( #262 )
...
* fix api bug
* remove cmd
2023-05-16 21:23:02 +10:00
Daniel Liu
fd6cbd5df1
fix nonce error for debug trace api ( #256 )
2023-05-06 09:50:25 +08:00
Liam
7b657f0c4e
API: getMasternode and getPoolStatus ( #258 )
...
* API: getMasternode and getPoolStatus
* fix test
2023-05-01 23:01:39 +10:00
Jerome
1430b74a98
Add more log info during updateM1 and change log level on devnet to 3 ( #223 )
2023-01-22 22:53:22 +11:00
Jerome
2ca1d0461d
Fix issue when resync is not getting the right consensus config values ( #221 )
...
* Fix issue when resync is not getting the right consensus config values
* add test and fix log bug
* fix test
* delete temp file
Co-authored-by: Liam Lai <liam.icheng.lai@gmail.com>
2023-01-17 21:34:42 +08:00
Liam
c4f9a552e5
Multi config bug fix ( #216 )
...
* refactor multi config
remove pool cleaner
correct message and log level
2022-12-17 20:23:46 +08:00
Liam
6ffbd3e141
Xin 259 support multi v2 config ( #210 )
...
* update timeout period and waittime
* remove wrong comment
* update config for preparing test
2022-12-06 20:08:56 +08:00
Daniel Liu
42379f530f
internal/ethapi: EstimateGas and Call handle revert error( #173 ) ( #200 )
...
hot fix for EstimateGas and Call handle revert error https://github.com/XinFinOrg/XDPoSChain/issues/173
2022-10-27 17:25:25 +08:00
Liam
dad7eff036
Xin 231 sync issues - too far messages should omit and skip to process ( #177 )
...
* omit too far v2 messages
* update error msg
* improve log
* fix test
* remove useless file
2022-09-05 10:38:45 +08:00
Jianrong
dfa1e7c098
make vote equivocation content's signer key lower case
2022-08-23 17:33:37 +08:00
Jerome
c710bd98a5
Xin-200 Vote Equivocation ( #111 ) ( #172 )
...
* Xin-200 Vote Equivocation (#111 )
* add vote same round detection
add test for vote same round detect
finish process equivocate (not finish report)
* finish vote equivocation report, refactor code (vote -> forensics)
* finish process equivocate and report, and test
* add return err
Co-authored-by: wgr523 <wgr523@gmail.com>
2022-08-13 11:50:56 +05:30
Liam
833f70bdb7
xin-203 fix wrong config hash and update v2 params on mainnet ( #109 )
...
* fix wrong config hash and update v2 params on mainnet
* update config and all the test
* hard code binary into code
* add default config for testing
* update test timestamp
2022-07-12 16:56:55 +02:00
Jerome
cfb5c6ce39
pass the forensics Id at root level ( #107 )
2022-07-05 22:01:36 +10:00
Jerome
533fe250db
forensics shall send unique id ( #106 )
2022-07-05 00:31:09 +02:00
Jerome
3ebaea1945
update forensics proof data structure to accomedate vote type ( #104 )
...
* update forensics proof data structure to accomedate vote type
* refactor log
* change blocknum type to uint64
* fix test
Co-authored-by: Liam Lai <liam.icheng.lai@gmail.com>
2022-06-29 23:58:18 +02:00
Liam
0317e871d4
add initial function during load latest block from db ( #96 )
2022-05-29 11:28:08 +02:00
Jerome
7effc71547
allow forensics send msg to stats server ( #95 )
...
* allow forensics send msg to stats server
* add test for forensics reporting mechanism
2022-05-25 19:42:30 +10:00
Jerome
455cacc1b7
move XDC consensus types into core ( #93 )
2022-05-22 11:43:25 +10:00
wgr523
8fde52c512
Xin 145 ( #82 )
...
* add HandleProposedBlock() in procFutureBlocks()
* add proposedBlockHandler for downloader
2022-04-22 00:12:44 +08:00
Jerome
e493ddfd6d
add verifyTC and verifyTimeoutMessage ( #63 )
...
* add verifyTC and verifyTimeoutMessage
* remove v2 func from adaptor
2022-03-02 09:17:57 +11:00
Liam
ff0fcd3951
add test and fix issue on happy path ( #46 )
...
* add test and fix issue on happy path
* add prepare test
* update comment
2022-01-25 10:51:17 +03:00
Jerome
f8d3f9f8c6
Xin 113 is epoch switch ( #37 )
...
* add isEpochSwitch function and refactor utils
* fix broken first v2 epoch switch block
* use adaptor epoch switch function to determine v1 v2 epoch swtich block
* add test for the GetMasternodesByNumber and GetCurrentEpochSwitchBlock function
* add v2 test for isAuthroisedAddress
* Use GetCurrentEpochSwitchBlock in findNearestSignedBlock api
2022-01-14 21:38:38 +11:00
Gerui Wang
2969548f68
add warn for reorg
2021-12-21 16:06:16 +08:00
Liam Lai
5061dd9841
add few comments in code
2021-12-21 08:47:23 +03:00
Jianrong
d901d1df6e
race condition caused by old eth bug where read before write. We fixing it by passing down header in the snapshot to avoid touching ETH code. This is just a precaution to avoid undiscovered bugs in XDC as a result of fundmental ETH implementation change
2021-12-21 10:32:55 +11:00
olumuyiwadad
afe58d79fc
fix api trace block & Change option pending block.
2021-11-11 18:49:57 +05:30
olumuyiwadad
18bfb102b4
Update Test for blockchain.go
...
- TestBlocksHashCacheUpdate
- TestAreTwoBlocksSamePath
Collection test for BlocksHashCache
cases
1. When init new chain
2. when insertChain
3. when insertFork
4. When adding new block by mining
5. When adding new block by syncing with other nodes
2021-11-08 15:41:13 +05:30
olumuyiwadad
70e0496138
fetch data from StateDB instead of Contract.
2021-11-08 14:59:32 +05:30
olumuyiwadad
cca2a7d213
missing ValidatorMapping added.
2021-11-08 14:54:41 +05:30
Gerui Wang
a1e6ae4152
make statedb_utils.go (XDCValidator reader) correct, add statedb utils test
2021-11-03 21:05:25 +08:00
Jianrong
acc2e411a6
fix or skip tests due to PR-136 change
2021-10-20 20:17:47 +11:00
Jianrong
ce106abffe
fix tests related to consensus
2021-10-10 22:05:32 +11:00
Jianrong
e34311ff45
Remove unused consensus v1 methods
2021-10-10 16:04:34 +11:00
Jianrong
0aec2a1e9e
Seperate hooks from XDPoS adaptor
2021-10-10 16:02:19 +11:00
Jianrong
fcbc5a28e1
refactor XDPoS to accommodate multiple consensus engine versions
2021-10-10 16:02:16 +11:00
olumuyiwadad
7d08fa95ba
Merge branch 'apothem' into new_EVM_Upgrade
2021-09-23 17:05:46 +05:30
olumuyiwadad
cf18ceba33
Merge branch 'forking-incident-fix' of https://github.com/hash-laboratories-au/XDPoSChain into hash-laboratories-au-forking-incident-fix
2021-09-23 17:01:19 +05:30
olumuyiwadad
22b1e3a2b5
Update trc21_reader.go
2021-09-21 18:13:01 +05:30
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
92ffe69ab4
Work around for the issue "return wrong list signers from snapshot"
...
Update signers in snapshot
Ignore signerCheck at checkpoint block 27307800
due to wrong snapshot at gap 27307799
2021-09-17 18:45:46 +05:30
olumuyiwadad
571c41f891
FIx Bad block error.
2021-09-17 17:59:06 +05:30
Liam
0a5c047600
remove duplicate update m1 call ( #8 )
2021-09-04 17:51:32 +10:00
Jianrong
9efb89dffb
fix simulator functions to choose between XDC faker and eth faker
2021-08-30 14:56:14 +10:00
Jianrong
fa2b341c9a
resolving broken eth tests
2021-08-29 17:14:10 +10:00
Jianrong
7b7e34ae00
Fix XDC forking incident with tests
2021-08-29 14:20:01 +10:00
Jianrong
0fdab2027c
add linting as the first CI task
2021-08-07 14:27:08 +10:00
AnilChinchawale
916b16de71
fix masternode stop block production.
2021-01-18 10:57:22 +05:30
AnilChinchawale
a8fc240b29
remove logs & add list of authorized signers
2020-12-30 18:00:37 +05:30
dev-vadim
dbe8c9d984
upgrade XDC.Network with v1.8.27.
2020-12-23 16:32:06 +05:30
diglspacedavid
474cc37036
upgrade codebase with ethereum:v1.8.13
2020-11-23 13:40:30 +05:30
Sinh Vu
c52f31d2c4
update max masternodes
2019-07-23 17:45:29 +07:00
Sinh Vu
3180921a7f
upgrade increase masternodes
2019-07-23 17:25:55 +07:00
Péter Szilágyi
0e63a70505
core: minor code polishes + rebase fixes
2019-04-08 12:04:31 +03:00
rjl493456442
f1b00cffc8
core: re-omit new log event when logs rebirth
2019-04-08 12:02:15 +03:00
Martin Holst Swende
af401d03a3
all: simplify timestamps to uint64 ( #19372 )
...
* all: simplify timestamps to uint64
* tests: update definitions
* clef, faucet, mobile: leftover uint64 fixups
* ethash: fix tests
* graphql: update schema for timestamp
* ethash: remove unused variable
2019-04-08 12:00:42 +03:00
Anil Chinchawale
4adc9c0fdc
Update tx_pool.go
2019-04-01 14:33:59 +05:30
AnilChinchawale
ed6533e092
Added "xdc" prefix in address
2019-03-17 16:14:42 +05:30
AnilChinchawale
bf626ddc95
Core Updated
2019-03-16 16:00:19 +05:30
AnilChinchawale
153c8ef49d
File Updated | transaction & constants
2019-03-14 15:58:42 +05:30
MestryOmkar
1861c13bcd
fetcher-hotfix
2019-03-02 15:10:35 +05:30
MestryOmkar
10694b2c6f
fixed bypass unittest
2019-02-27 15:02:33 +05:30
parmarrushabh
147e1f0baf
create new func penalties for hard fork
2019-02-19 17:25:31 +05:30
Péter Szilágyi
2072c26a96
cmd, core, params: add support for Goerli
...
(cherry picked from commit b0ed083ead )
2019-02-19 10:53:47 +02:00
Péter Szilágyi
4da2092908
core: fix pruner panic when importing low-diff-large-sidechain
2019-02-09 17:45:23 +01:00
Martin Holst Swende
3ab9dcc3bd
core: repro #18977
2019-02-09 17:44:15 +01:00
Martin Holst Swende
3a95128b22
core: fix error in block iterator ( #18986 )
2019-02-09 17:36:20 +01:00
Martin Holst Swende
c7664b0636
core, cmd/puppeth: implement constantinople fix, disable EIP-1283 ( #18486 )
...
This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg,
but the genesis/config field is ConstantinopleFix.
The block numbers are:
7280000 for Constantinople on Mainnet
7280000 for ConstantinopleFix on Mainnet
4939394 for ConstantinopleFix on Ropsten
9999999 for ConstantinopleFix on Rinkeby (real number decided later)
This PR also defaults to using the same ConstantinopleFix number as whatever
Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix
is not set.This means that for private networks which have already transitioned
to Constantinople, this PR will break the network unless ConstantinopleFix is
explicitly set!
2019-01-29 17:49:27 +01:00
AnilChinchawale
26cafb46ea
Updated changes in genesis
2019-01-19 04:40:21 +05:30
AnilChinchawale
fd51ea9fc1
Updated Core
2019-01-17 04:38:43 +05:30
AnilChinchawale
ffd60b3685
FIxed issue in core
2019-01-17 04:38:29 +05:30
AnilChinchawale
d67d59a659
Genesis updated
2019-01-16 04:37:52 +05:30