Daniel Liu
87a6b5f4c3
Merge pull request #689 from gzliudan/fix-st1005
...
all: fix staticcheck warning ST1005
2024-10-25 15:28:07 +08:00
Daniel Liu
c6e4e880ea
all: fix staticcheck warning SA4006: never used value
2024-10-24 17:37:19 +08:00
Daniel Liu
a79411fa06
all: fix staticcheck warning ST1005: incorrectly formatted error string
2024-10-24 09:48:20 +08:00
Daniel Liu
edace6ac6c
all: change format 0x%x to %#x ( #25221 )
2024-09-27 15:24:31 +08:00
Wanwiset Peerapatanapokin
0e9052b2e5
Merge branch 'master' into dev-upgrade-fix-merge
2024-09-11 14:06:38 +04:00
Daniel Liu
c47819c7d6
core, cmd: add generic LRU implementation ( #26162 )
2024-08-26 11:17:23 +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
JukLee0ira
9a40c26bf8
core,eth,light: remove duplicated functions
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
JukLee0ira
2d89951e5b
all: use errrors.New instead of empty fmt.Errorf
2024-06-14 19:19:21 +08:00
JukLee0ira
0aab4ced98
common: add binary variables for system contract
2024-06-06 19:33:59 +08:00
Daniel Liu
7a95b4f907
core, eth, internal/ethapi: create access list RPC API ( #22550 )
2024-05-14 23:27:23 +08:00
Marius van der Wijden
6935687790
core: more detailed metering for reorgs ( #21420 )
2024-05-13 22:07:04 +08:00
Daniel Liu
ec50ca36d9
core, eth, trie: use common/prque ( #17508 )
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
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
Gary
6fd9a5305a
fix: Future Blocks Are Always Verified Instead Of Queued
2024-03-19 20:38:57 +08: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
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
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
2c02ddc2d9
remove xdc0000000000000000000000000000000000000000
2023-10-24 12:15:30 +08:00
Daniel Liu
320b358830
replace package sort with common/sort
2023-10-23 22:51:06 +08: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
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
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
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
Liam
0317e871d4
add initial function during load latest block from db ( #96 )
2022-05-29 11:28:08 +02: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
70e0496138
fetch data from StateDB instead of Contract.
2021-11-08 14:59:32 +05:30
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
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