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

Snapshot mana epochs #2265

Merged
merged 12 commits into from
Jun 13, 2022
Merged

Snapshot mana epochs #2265

merged 12 commits into from
Jun 13, 2022

Conversation

georgysavva
Copy link
Contributor

No description provided.

@georgysavva georgysavva requested review from karimodm and daria305 June 9, 2022 10:27
plugins/messagelayer/mana_plugin.go Outdated Show resolved Hide resolved
plugins/messagelayer/mana_plugin.go Outdated Show resolved Hide resolved
packages/notarization/epoch.go Outdated Show resolved Hide resolved
plugins/messagelayer/mana_plugin.go Outdated Show resolved Hide resolved
plugins/messagelayer/mana_plugin.go Outdated Show resolved Hide resolved
)

type Snapshot struct {
LedgerSnapshot *ledger.Snapshot
ManaSnapshot *mana.Snapshot
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just have the inner struct as this now has only one field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would leave it as is for now. Maybe we will add another field in the future, then we would need to change it back.

BaseMana1: value,
}
}
func (c *ConsensusBaseManaVector) LoadSnapshot(snapshot map[identity.ID]float64) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we just store the base vector right?
Also let's maybe change the function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we populate the vector with the map data.
Sure, I changed the name.

ManaType: a.Type(),
})
}
func (a *AccessBaseManaVector) LoadSnapshot(snapshot map[identity.ID]float64) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we just store the base vector right?
Also let's maybe change the function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we populate the vector with the map data.
Sure, I changed the name.

packages/ledger/models.go Outdated Show resolved Hide resolved
@karimodm karimodm marked this pull request as ready for review June 13, 2022 12:38
@karimodm karimodm merged commit 0c0111f into feat/epoch-commitment Jun 13, 2022
@karimodm karimodm deleted the snapshot-mana-epochs branch June 13, 2022 12:38
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.

3 participants