This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
…etworks Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Note this is confirmed running as designed for moonbase at https://moonbase.moonscan.io/address/0x3aeebd0fa9701f4549753c4c8498291c1c8af8d7 and still needs to be tested for moonbeam
|
rogarcia
approved these changes
Mar 28, 2023
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.
LGTM for mbase testing
kitti-katy
approved these changes
Mar 28, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to run a single finalizer instance with one moonbeam / moonbase account for both block specimens and results we need to segregate finalization threads as two separate processes, otherwise nonce collisions can occur. We effectively cycle between the two threads that submit the finalizations and call the two BSP reward or BRP rewards functions. For this we need two db managers effectively separately the aggregation of open/closed sessions and tx submissions. We further also need separation of finalization requests that can be made to the db for finalization hashes that have been already indexed.
Further In order to make the finalization process separate for block specimen and results we made upgrades to the smart contracts which modified emitted event
SessionStarted
for any specimen/result proof submission session started toBSPSessionStarted
andBRPSessionStarted
respectively - this prevents pollution of one logged event into other logged event’s views because they come from different sources/purposes.We've re-executed these two SQLs for the same - for moonbase network to have separate views for specimen events and result events -
https://github.com/covalenthq/bsp-finalizer/blob/feature/finalize-block-results/sql/proof_chain_mbase_result.sql
https://github.com/covalenthq/bsp-finalizer/blob/feature/finalize-block-results/sql/proof_chain_mbase_specimen.sql
The same needs to be done for moonbeam main net when this PR is release to prod or
main
.https://github.com/covalenthq/bsp-finalizer/blob/feature/finalize-block-results/sql/proof_chain_mbeam_result.sql
https://github.com/covalenthq/bsp-finalizer/blob/feature/finalize-block-results/sql/proof_chain_mbeam_specimen.sql
proof_chain_result_events
which represents indexed result sessions required for finalization (and rewards) using the same finalization hash algorithm as block specimen sessions