-
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
MX-14120: repopulate tokens supplies #5204
Merged
bogdan-rosianu
merged 17 commits into
rc/v1.6.0
from
MX-14120-repopulate-tokens-supplies
May 16, 2023
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
245e527
MX-14120: repopulate tokens supplies
bogdan-rosianu 04c3205
Merge branch 'rc/v1.6.0' into MX-14120-repopulate-tokens-supplies
bogdan-rosianu 2d07755
MX-14120: fix linter issue
bogdan-rosianu 84aef9f
Merge remote-tracking branch 'origin/MX-14120-repopulate-tokens-suppl…
bogdan-rosianu 26cd750
MX-14120: fixes
bogdan-rosianu 231e7f9
Merge branch 'rc/v1.6.0' into MX-14120-repopulate-tokens-supplies
bogdan-rosianu a66b340
MX-14120: adapt tests
bogdan-rosianu 2f769c1
Merge remote-tracking branch 'origin/MX-14120-repopulate-tokens-suppl…
bogdan-rosianu 5d57d8e
MX-14120: fixes after review
bogdan-rosianu ce1eafd
bugfix + add custom rounds per epoch in local testnet
bogdan-rosianu 4fd5d96
Merge branch 'rc/v1.6.0' into MX-14120-repopulate-tokens-supplies
bogdan-rosianu 13d01bd
fix after review
bogdan-rosianu 08a2a9b
Merge remote-tracking branch 'origin/MX-14120-repopulate-tokens-suppl…
bogdan-rosianu 0e2ebb4
fixes after review
bogdan-rosianu cc695a7
Merge branch 'rc/v1.6.0' into MX-14120-repopulate-tokens-supplies
bogdan-rosianu 0148ab0
Merge branch 'rc/v1.6.0' into MX-14120-repopulate-tokens-supplies
bogdan-rosianu 7029a48
fix test are merge
bogdan-rosianu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ const defaultSpan = 300 * time.Second | |
// ConsensusComponentsFactoryArgs holds the arguments needed to create a consensus components factory | ||
type ConsensusComponentsFactoryArgs struct { | ||
Config config.Config | ||
FlagsConfig config.ContextFlagsConfig | ||
BootstrapRoundIndex uint64 | ||
CoreComponents factory.CoreComponentsHolder | ||
NetworkComponents factory.NetworkComponentsHolder | ||
|
@@ -55,6 +56,7 @@ type ConsensusComponentsFactoryArgs struct { | |
|
||
type consensusComponentsFactory struct { | ||
config config.Config | ||
flagsConfig config.ContextFlagsConfig | ||
bootstrapRoundIndex uint64 | ||
coreComponents factory.CoreComponentsHolder | ||
networkComponents factory.NetworkComponentsHolder | ||
|
@@ -88,6 +90,7 @@ func NewConsensusComponentsFactory(args ConsensusComponentsFactoryArgs) (*consen | |
|
||
return &consensusComponentsFactory{ | ||
config: args.Config, | ||
flagsConfig: args.FlagsConfig, | ||
bootstrapRoundIndex: args.BootstrapRoundIndex, | ||
coreComponents: args.CoreComponents, | ||
networkComponents: args.NetworkComponents, | ||
|
@@ -133,7 +136,10 @@ func (ccf *consensusComponentsFactory) Create() (*consensusComponents, error) { | |
return nil, err | ||
} | ||
|
||
cc.bootstrapper.StartSyncingBlocks() | ||
err = cc.bootstrapper.StartSyncingBlocks() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
epoch := ccf.getEpoch() | ||
consensusState, err := ccf.createConsensusState(epoch, cc.consensusGroupSize) | ||
|
@@ -471,6 +477,7 @@ func (ccf *consensusComponentsFactory) createShardBootstrapper() (process.Bootst | |
HistoryRepo: ccf.processComponents.HistoryRepository(), | ||
ScheduledTxsExecutionHandler: ccf.processComponents.ScheduledTxsExecutionHandler(), | ||
ProcessWaitTime: time.Duration(ccf.config.GeneralSettings.SyncProcessTimeInMillis) * time.Millisecond, | ||
RepopulateTokensSupplies: ccf.flagsConfig.RepopulateTokensSupplies, | ||
} | ||
|
||
argsShardBootstrapper := sync.ArgShardBootstrapper{ | ||
|
@@ -600,6 +607,7 @@ func (ccf *consensusComponentsFactory) createMetaChainBootstrapper() (process.Bo | |
HistoryRepo: ccf.processComponents.HistoryRepository(), | ||
ScheduledTxsExecutionHandler: ccf.processComponents.ScheduledTxsExecutionHandler(), | ||
ProcessWaitTime: time.Duration(ccf.config.GeneralSettings.SyncProcessTimeInMillis) * time.Millisecond, | ||
RepopulateTokensSupplies: ccf.flagsConfig.RepopulateTokensSupplies, | ||
} | ||
|
||
argsMetaBootstrapper := sync.ArgMetaBootstrapper{ | ||
|
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
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
Oops, something went wrong.
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.
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.
to align with the others
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.
good find. fixed