Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the state checkpoint operation #5672

Merged
merged 4 commits into from Nov 2, 2023

Conversation

BeniaminDrasovean
Copy link
Contributor

@BeniaminDrasovean BeniaminDrasovean commented Oct 27, 2023

Reasoning behind the pull request

  • The state checkpoint operation was not used anymore and it added a lot of complexity to the code.

Proposed changes

  • Remove the state checkpoint operation

Testing procedure

  • Normal testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (cec44d1) 80.31% compared to head (7d118bb) 80.34%.
Report is 1 commits behind head on rc/v1.7.0.

❗ Current head 7d118bb differs from pull request most recent head c37ba20. Consider uploading reports for the commit c37ba20 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##           rc/v1.7.0    #5672      +/-   ##
=============================================
+ Coverage      80.31%   80.34%   +0.02%     
=============================================
  Files            710      708       -2     
  Lines          94132    93768     -364     
=============================================
- Hits           75601    75335     -266     
+ Misses         13220    13149      -71     
+ Partials        5311     5284      -27     
Files Coverage Δ
...uestersContainer/baseRequestersContainerFactory.go 75.00% <ø> (-0.30%) ⬇️
...uestersContainer/metaRequestersContainerFactory.go 77.01% <ø> (+1.18%) ⬆️
...estersContainer/shardRequestersContainerFactory.go 77.27% <ø> (+0.80%) ⬆️
dataRetriever/unitType.go 100.00% <ø> (ø)
factory/api/apiResolverFactory.go 83.37% <ø> (+0.25%) ⬆️
process/block/baseProcess.go 73.57% <ø> (-0.09%) ⬇️
process/block/metablock.go 61.96% <ø> (-0.03%) ⬇️
process/block/shardblock.go 68.45% <ø> (-0.03%) ⬇️
...ocess/transactionEvaluator/simulationAccountsDB.go 61.17% <ø> (-0.46%) ⬇️
state/accountsDB.go 77.46% <ø> (-0.21%) ⬇️
... and 12 more

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BeniaminDrasovean BeniaminDrasovean marked this pull request as ready for review October 27, 2023 12:36
if check.IfNil(args.Marshalizer) {
return nil, ErrNilMarshalizer
}
if check.IfNil(args.Hasher) {
return nil, ErrNilHasher
}
if check.IfNil(args.CheckpointHashesHolder) {
return nil, ErrNilCheckpointHashesHolder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think ErrNilCheckpointHashesHolder has to be removed as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

_ = adb.GetStackDebugFirstEntry()
case 22:
case 21:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the modulo value on L2889?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -284,7 +254,6 @@ func (sm *snapshotsManager) earlySnapshotCompletion(stats *snapshotStatistics, t
}

func (sm *snapshotsManager) snapshotUserAccountDataTrie(
isSnapshot bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

return stsm.getFromOtherStorers(key)
stsm.putInPreviousStorerIfAbsent(key, val, epoch)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change ok? On the old code we called stsm.getFromOtherStorers(key)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ok. If the value was not found, it would have tried to get it from the checkpoints storer. But since we have removed the checkpoints storer, I also removed the stsm.getFromOtherStorers(key).

"github.com/multiversx/mx-chain-go/common"
"github.com/multiversx/mx-chain-go/testscommon/storageManager"
"testing"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go imports?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normal allin test: v1.5.13-dev-config-8c685c8e00 -> remove-state-checkpoint-op-c37ba204b1

--- Specific errors ---

block hash does not match 8248
wrong nonce in block 2897
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0

/------/

--- Statistics ---

Nr. of all ERRORS: 1
Nr. of all WARNS: 611
Nr. of new ERRORS: 1
Nr. of new WARNS: 34
Nr. of PANICS: 0

/------/

--- ERRORS ---

gcp-bel-validator-17 :
Error: bootstrapDataComponentsFactory create() failed: bootstrap process has failed: time is out 1

/------/

--- WARNINGS ---
/------/

@BeniaminDrasovean BeniaminDrasovean merged commit 8a01c07 into rc/v1.7.0 Nov 2, 2023
6 checks passed
@BeniaminDrasovean BeniaminDrasovean deleted the remove-state-checkpoint-operation branch November 2, 2023 10: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.

None yet

5 participants