Skip to content
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
8f4f411
core: naive first implmenetation of parallel block import in InsertCh…
Raneet10 Jul 22, 2025
5c6191d
core: add logic to handle dependency while parallel import
Raneet10 Jul 24, 2025
8e7f4d7
core: handle unknown ancestor + init some UTs
Raneet10 Jul 25, 2025
2922e0b
Merge branch 'stateless_sync' of github.com:maticnetwork/bor into ran…
Raneet10 Jul 25, 2025
dfc5091
core: implement alternative way to check for unknown ancestor
Raneet10 Aug 22, 2025
260b975
core: defer ValidateWitnessPreState
Raneet10 Aug 26, 2025
67dad52
zero commit
Raneet10 Aug 26, 2025
a0b09f4
core: do sequential insert if the importing chain is small
Raneet10 Aug 27, 2025
7ad379c
core: fix error handling
Raneet10 Aug 28, 2025
8c4a5b2
core: update UTs
Raneet10 Aug 29, 2025
7f2c92b
core,eth,internal/cli: add config to enable/disable parallel import +…
Raneet10 Sep 1, 2025
ce74928
core: add metrics for seq and parallel import
Raneet10 Sep 1, 2025
24de459
Merge branch 'develop' of https://github.com/maticnetwork/bor into ps…
pratikspatil024 Sep 2, 2025
0bdc0b2
internal/cli: moved parallelstatelessimport flag to the witness config
pratikspatil024 Sep 2, 2025
5da6523
core: changed debug import log to info
pratikspatil024 Sep 2, 2025
58dde62
core: added 2 new metrics to track the number of blocks processed in …
pratikspatil024 Sep 4, 2025
2478357
core: init benchmarks
Raneet10 Sep 4, 2025
02e53a9
Merge branch 'raneet10/parallel-block-import' of github.com:maticnetw…
Raneet10 Sep 4, 2025
c4d1502
Merge branch 'v2.3.0-candidate' of https://github.com/maticnetwork/bo…
pratikspatil024 Sep 8, 2025
0e6c77d
core: fix benchmarks
Raneet10 Sep 8, 2025
dac9784
Merge branch 'raneet10/parallel-block-import' of github.com:maticnetw…
Raneet10 Sep 8, 2025
bfce765
core: use worker pool for parallel block import
Raneet10 Sep 9, 2025
e990f09
core: try parallel import for smaller batch
Raneet10 Sep 9, 2025
0a1b736
core: dedup header verification logic
Raneet10 Sep 9, 2025
6820582
zero commit
Raneet10 Sep 11, 2025
10968ee
core,eth,internal/cli: improvements based on comments
Raneet10 Sep 15, 2025
f451acd
core: add adversarial tests for stateless insert
Raneet10 Sep 15, 2025
4761167
core: re-add empty chain insertion case
Raneet10 Sep 15, 2025
8260553
zero commit to trigger CI
Raneet10 Sep 16, 2025
50ff17a
core,eth/catalyst: report correct execution stats for stateless insert
Raneet10 Sep 17, 2025
8725094
CI: temp update for running stateless tests
Raneet10 Sep 18, 2025
78bf0b3
all: fix merge conflicts
Raneet10 Sep 18, 2025
fdb9798
zero commit to trigger CI
Raneet10 Sep 18, 2025
7ceca66
zero commit to trigger CI
Raneet10 Sep 18, 2025
98b5704
CI: try running on stateless branch
Raneet10 Sep 18, 2025
9e34d66
Revert "CI: try running on stateless branch"
Raneet10 Sep 18, 2025
699f35f
zero commit to trigger CI
Raneet10 Sep 19, 2025
7088e6d
core: add log for deferred exec of blocks due to invalid root err in …
Raneet10 Sep 22, 2025
029bc3e
core: changed log to debug
pratikspatil024 Sep 23, 2025
66a9185
core,eth,internal/ethapi: suppress error log for state sync when para…
Raneet10 Sep 24, 2025
6e57b3d
Merge branch 'raneet10/parallel-block-import' of github.com:maticnetw…
Raneet10 Sep 24, 2025
dc661b9
eth/filters: fix gomock
Raneet10 Sep 25, 2025
5b5e404
Merge branch 'develop' of github.com:maticnetwork/bor into raneet10/p…
Raneet10 Oct 7, 2025
b8e9fa8
eth: add missing configs
Raneet10 Oct 7, 2025
0b3ca1c
core: retry execution in parallel import for block validator errors
Raneet10 Oct 8, 2025
cfc6012
core: commit block before retrying failed execution
Raneet10 Oct 9, 2025
a788f8b
core: rm redundant witness in execResult
Raneet10 Oct 9, 2025
7fe2bc2
core: try flushing state db asap post execution
Raneet10 Oct 10, 2025
d8f87a2
Merge branch 'develop' of github.com:maticnetwork/bor into raneet10/p…
Raneet10 Oct 10, 2025
cf63cc3
core: add temp log when committing code
Raneet10 Oct 13, 2025
54541b3
core: enable retry for first block in batch
Raneet10 Oct 13, 2025
3bd7172
Revert "core: add temp log when committing code"
Raneet10 Oct 15, 2025
96367ee
core: cap workers spun
Raneet10 Oct 15, 2025
a1d857a
Revert "core: cap workers spun"
Raneet10 Oct 15, 2025
675bc24
core: ensure statedb cleanup
Raneet10 Oct 15, 2025
30a3179
core: add temp debug logs
Raneet10 Oct 16, 2025
2c4f840
core: add temp debug logs
Raneet10 Oct 16, 2025
3483398
Merge branch 'raneet10/parallel-block-import' of github.com:maticnetw…
Raneet10 Oct 16, 2025
29b3366
core: add temp log to track sidechain
Raneet10 Oct 16, 2025
174765f
core: add temp log for contract code in commitAndFlush
Raneet10 Oct 16, 2025
3c1bfec
core: add retry for all processing and internal state db errors
Raneet10 Oct 16, 2025
21443d9
core: add state db error validation during deferred exec
Raneet10 Oct 16, 2025
f09e2eb
core: add TestParallelStateless_ContractDeployedThenCalled
Raneet10 Oct 17, 2025
390fea0
Revert "core: add temp log for contract code in commitAndFlush"
Raneet10 Oct 17, 2025
cd7f338
Revert "core: add temp log to track sidechain"
Raneet10 Oct 17, 2025
dbe1292
Revert "core: add temp debug logs"
Raneet10 Oct 17, 2025
489c505
internal/cli: turn off parallel import by default
Raneet10 Oct 17, 2025
58816a6
Merge branch 'develop' of github.com:maticnetwork/bor into raneet10/p…
Raneet10 Oct 24, 2025
d23b70b
internal/cli: update flag identation
Raneet10 Oct 24, 2025
0b9d9b0
CI: update comment
Raneet10 Oct 24, 2025
884b8d3
zero commit to trigger CI
Raneet10 Oct 27, 2025
d5b7d45
internal/cli: rm witness prune flags
Raneet10 Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/kurtosis-stateless-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- 'master'
- 'develop'
- v2.3.0-candidate # Remove after testing
types: [opened, synchronize]

concurrency:
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
uses: actions/checkout@v5
with:
repository: 0xPolygon/kurtosis-pos
ref: stateless
ref: raneet10/stateless-parallel-import # Revert after testing
path: kurtosis-pos

- name: Pre kurtosis run
Expand Down
8 changes: 4 additions & 4 deletions core/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD
}
header := block.Header()
if block.GasUsed() != res.GasUsed {
return fmt.Errorf("invalid gas used (remote: %d local: %d)", block.GasUsed(), res.GasUsed)
return fmt.Errorf("%w (remote: %d local: %d)", ErrGasUsedMismatch, block.GasUsed(), res.GasUsed)
}
// Validate the received block's bloom with the one derived from the generated receipts.
// For valid blocks this should always validate to true.
Expand All @@ -141,7 +141,7 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD
// everything.
rbloom := types.MergeBloom(res.Receipts)
if rbloom != header.Bloom {
return fmt.Errorf("invalid bloom (remote: %x local: %x)", header.Bloom, rbloom)
return fmt.Errorf("%w (remote: %x local: %x)", ErrBloomMismatch, header.Bloom, rbloom)
}
// In stateless mode, return early because the receipt and state root are not
// provided through the witness, rather the cross validator needs to return it.
Expand All @@ -151,13 +151,13 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD
// The receipt Trie's root (R = (Tr [[H1, R1], ... [Hn, Rn]]))
receiptSha := types.DeriveSha(res.Receipts, trie.NewStackTrie(nil))
if receiptSha != header.ReceiptHash {
return fmt.Errorf("invalid receipt root hash (remote: %x local: %x)", header.ReceiptHash, receiptSha)
return fmt.Errorf("%w (remote: %x local: %x)", ErrReceiptRootMismatch, header.ReceiptHash, receiptSha)
}
// Validate the parsed requests match the expected header value.
if header.RequestsHash != nil {
reqhash := types.CalcRequestsHash(res.Requests)
if reqhash != *header.RequestsHash {
return fmt.Errorf("invalid requests hash (remote: %x local: %x)", *header.RequestsHash, reqhash)
return fmt.Errorf("%w (remote: %x local: %x)", ErrRequestsHashMismatch, *header.RequestsHash, reqhash)
}
} else if res.Requests != nil {
return errors.New("block has requests before prague fork")
Expand Down
Loading
Loading