-
Notifications
You must be signed in to change notification settings - Fork 205
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
Deep VM Queries (for older epochs, as well) #5801
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## rc/v1.6.next1 #5801 +/- ##
=================================================
- Coverage 80.21% 80.17% -0.04%
=================================================
Files 708 708
Lines 94124 94129 +5
=================================================
- Hits 75497 75466 -31
- Misses 13282 13316 +34
- Partials 5345 5347 +2 ☔ View full report in Codecov by Sentry. |
Add integration test for deep queries
☑️ Tested using integration test: #5935 ☑️ Tested on Testnet:
Contract used to test on Testnet: |
|
||
require.Equal(t, snapshotsOfGetState[1], historyOfGetState[1]) | ||
require.Equal(t, snapshotsOfGetNow[1].blockNonce, historyOfGetNow[1].blockNonce) | ||
// This does not seem right! |
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.
Though, I think the issue is with the test node, not with the actual implementation of deep queries. Actual implementation tested on system-test / Testnet ☑️
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.
Removed that (redundant & ambiguous) assertion.
factory/api/apiResolverFactory.go
Outdated
@@ -356,10 +356,20 @@ func createScQueryElement( | |||
return nil, errDecode | |||
} | |||
|
|||
apiBlockchain, err := blockchain.NewBlockChain(disabled.NewAppStatusHandler()) |
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.
Here we should handle metachain, as well.
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.
Fixed in #5958.
Deep queries on metachain
@@ -47,3 +48,7 @@ func CreateScQueryElement(args SCQueryElementArgs) (process.SCQueryService, erro | |||
guardedAccountHandler: args.GuardedAccountHandler, | |||
}) | |||
} | |||
|
|||
func CreateBlockchainForScQuery(selfShardID uint32) (data.ChainHandler, error) { |
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.
missing 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.
fixed
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.
Normal allin test: v1.6.15-dev-config-eb2e06c06d -> sandbox-queries-dc797c7a20
--- Specific errors ---
block hash does not match 1448
wrong nonce in block 781
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: 4
Nr. of all WARNS: 573
Nr. of new ERRORS: 0
Nr. of new WARNS: 4
Nr. of PANICS: 0
/------/
--- ERRORS ---
/------/
--- WARNINGS ---
upcloud-fra-validator-19 :
Warn: shardProcessor.createMiniBlocks error = shard is stuck shard = 2
upcloud-fra-validator-29 :
Warn: shardProcessor.createMiniBlocks error = shard is stuck shard = 2
/------/
5a3ec4d
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.
Normal allin test: v1.6.15-dev-config-eb2e06c06d -> sandbox-queries-dc797c7a20
--- Specific errors ---
block hash does not match 1448
wrong nonce in block 781
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: 4
Nr. of all WARNS: 573
Nr. of new ERRORS: 0
Nr. of new WARNS: 4
Nr. of PANICS: 0
/------/
--- ERRORS ---
/------/
--- WARNINGS ---
upcloud-fra-validator-19 :
Warn: shardProcessor.createMiniBlocks error = shard is stuck shard = 2
upcloud-fra-validator-29 :
Warn: shardProcessor.createMiniBlocks error = shard is stuck shard = 2
/------/
Reasoning behind the pull request
Enabled VM queries for older (all) epochs. Previously, VM queries were possible at blocks within epochs covered by the active persisters (e.g. last 3 epochs).
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?