-
Notifications
You must be signed in to change notification settings - Fork 198
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
Cleanup SCRs which is informational #3600
Cleanup SCRs which is informational #3600
Conversation
Codecov Report
@@ Coverage Diff @@
## feat/SC-proc-improvements-NOV #3600 +/- ##
==============================================================
Coverage 74.00% 74.00%
==============================================================
Files 582 582
Lines 74910 74980 +70
==============================================================
+ Hits 55436 55488 +52
- Misses 15067 15088 +21
+ Partials 4407 4404 -3
Continue to review full report at Codecov.
|
process/smartContract/process.go
Outdated
return true | ||
} | ||
|
||
if core.IsSmartContractAddress(scr.GetRcvAddr()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this if could be put above L465
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope. because you can have cross shard built in function call to a user
process/smartContract/process.go
Outdated
cleanedUPSCrs = append(cleanedUPSCrs, scr) | ||
} | ||
|
||
if sc.flagCleanUpSCRData.IsSet() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !sc.flagCleanUpSCRData.IsSet()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
… cleanup-SCRs-informational
…-cleanul-SCRS Fix semi integration tests
… cleanup-SCRs-informational
@@ -619,8 +619,8 @@ func TestEnableEpochConfig(t *testing.T) { | |||
# CreateNFTThroughExecByCallerEnableEpoch represents the epoch when nft creation through execution on destination by caller is enabled | |||
CreateNFTThroughExecByCallerEnableEpoch = 47 | |||
|
|||
# CleanUpSCRDataEnableEpoch represents the epoch the informational scrs are cleaned from miniblocks | |||
CleanUpSCRDataEnableEpoch = 48 | |||
# CleanUpInformativeSCRsEnableEpoch represents the epoch when the scrs which contain only information are cleaned from miniblocks and logs are created from it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# CleanUpInformativeSCRsEnableEpoch represents the epoch when the informative-only scrs are cleaned from miniblocks and logs are created from them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
integrationTests/vm/testIndexer.go
Outdated
|
||
return ti | ||
} | ||
|
||
func (ti *testIndexer) SetTxLogProcessor(txsLogsProcessor process.TransactionLogProcessor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add mock comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, why do we need a setter function? in almost every case I've seen in this PR, you call this setter right after the constructor. Might move the setting of txsLogProcessor in the constructor and only call this setter when something custom is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -753,6 +756,15 @@ func createDefaultVMConfig() *config.VirtualMachineConfig { | |||
} | |||
} | |||
|
|||
type ResultsCreateTxProcessor struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add mock comment? also, please rename to CreateTxProcessorResults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
…ational # Conflicts: # cmd/node/config/enableEpochs.toml # config/epochConfig.go # config/tomlConfig_test.go # node/nodeRunner.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sc.flagCleanUpSCRData.Toggle(epoch >= sc.cleanupSCRDataEnableEpoch) | ||
log.Debug("scProcessor: cleanup scr data", "enabled", sc.flagCleanUpSCRData.IsSet()) | ||
sc.flagCleanUpInformativeSCRs.Toggle(epoch >= sc.cleanUpInformativeSCRsEnableEpoch) | ||
log.Debug("scProcessor: cleanup scr data", "enabled", sc.flagCleanUpInformativeSCRs.IsSet()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup informative SCRs
Cleanup SCRs which is informational