Skip to content

Conversation

@yihuang
Copy link

@yihuang yihuang commented Mar 8, 2024

Closes: #432

Description

Integrate go-block-stm to do parallel tx execution.

  • refactored the transient stores to be tx-index based, so the tx execution don't conflicts
  • add a patch call after all txs executed to decide the tx index/log size stuff.

For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@yihuang yihuang marked this pull request as draft March 8, 2024 08:22
}

go s.start(&s.wg, chHeaders, chTx, chLogs)
go s.start(&s.wg, chBlocks, chTx, chLogs)

Check notice

Code scanning / CodeQL

Spawning a Go routine

Spawning a Go routine may be a possible source of non-determinism
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {
am.keeper.BeginBlock(ctx, req)
func (am AppModule) BeginBlock(ctx context.Context) error {
return am.keeper.BeginBlock(sdk.UnwrapSDKContext(ctx))

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {
am.keeper.BeginBlock(ctx, req)
func (am AppModule) BeginBlock(ctx context.Context) error {
return am.keeper.BeginBlock(sdk.UnwrapSDKContext(ctx))

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

path flow from Begin/EndBlock to a panic call path flow from Begin/EndBlock to a panic call
Comment on lines +1047 to +998
for _, key := range app.keys {
keys = append(keys, key)
}

Check warning

Code scanning / CodeQL

Iteration over map

Iteration over map may be a possible source of non-determinism
Comment on lines +1050 to +1001
for _, key := range app.tkeys {
keys = append(keys, key)
}

Check warning

Code scanning / CodeQL

Iteration over map

Iteration over map may be a possible source of non-determinism
@yihuang yihuang force-pushed the block-stm branch 3 times, most recently from af6bc09 to c618235 Compare March 17, 2024 07:50
@yihuang yihuang force-pushed the block-stm branch 4 times, most recently from 9b11664 to 2e734ed Compare March 20, 2024 09:48
@yihuang yihuang requested a review from mmsqe March 20, 2024 09:48
@yihuang yihuang marked this pull request as ready for review March 20, 2024 09:49
@codecov
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 10.46512% with 77 lines in your changes are missing coverage. Please review.

Project coverage is 63.39%. Comparing base (4e8c133) to head (be0cadf).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #414      +/-   ##
===========================================
+ Coverage    62.94%   63.39%   +0.44%     
===========================================
  Files          127      127              
  Lines        12062     9599    -2463     
===========================================
- Hits          7593     6085    -1508     
+ Misses        3930     2977     -953     
+ Partials       539      537       -2     
Files Coverage Δ
x/evm/keeper/abci.go 100.00% <100.00%> (ø)
x/evm/keeper/gas.go 88.88% <ø> (-0.86%) ⬇️
x/evm/types/chain_config.go 59.39% <100.00%> (+7.27%) ⬆️
x/evm/types/logs.go 100.00% <100.00%> (ø)
x/evm/types/msg.go 66.98% <0.00%> (+2.66%) ⬆️
server/config/config.go 35.44% <14.28%> (+4.98%) ⬆️
app/app.go 76.69% <18.18%> (-3.83%) ⬇️
app/executor.go 5.26% <0.00%> (-44.74%) ⬇️

... and 112 files with indirect coverage changes

@yihuang yihuang marked this pull request as draft March 22, 2024 01:44
@yihuang
Copy link
Author

yihuang commented Mar 22, 2024

put to draft for now until we get the sdk ready.

@yihuang yihuang mentioned this pull request Mar 25, 2024
7 tasks
@yihuang yihuang force-pushed the block-stm branch 2 times, most recently from 2850251 to 4ae414b Compare April 4, 2024 20:21
Comment on lines +1007 to +1004
for _, key := range app.memKeys {
keys = append(keys, key)
}

Check warning

Code scanning / CodeQL

Iteration over map

Iteration over map may be a possible source of non-determinism
Comment on lines +1010 to +1007
for _, key := range app.okeys {
keys = append(keys, key)
}

Check warning

Code scanning / CodeQL

Iteration over map

Iteration over map may be a possible source of non-determinism
@yihuang yihuang marked this pull request as ready for review April 5, 2024 07:54
@yihuang yihuang requested a review from mmsqe April 5, 2024 07:54
- integrate go-block-stm as tx executor
- small optimiations

fix
yihuang added 2 commits April 8, 2024 09:54
@yihuang yihuang enabled auto-merge (squash) April 8, 2024 01:58
@yihuang yihuang disabled auto-merge April 8, 2024 02:34
@yihuang yihuang enabled auto-merge (squash) April 8, 2024 02:36
@yihuang yihuang merged commit e5c3a1c into crypto-org-chain:develop Apr 8, 2024
@yihuang yihuang deleted the block-stm branch April 8, 2024 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EPIC] block-stm integration

2 participants