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

[OZ][N-02] Functions Are Updating the State Without Event Emissions #114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mike-CZ
Copy link
Collaborator

@Mike-CZ Mike-CZ commented Dec 13, 2024

This PR adds event emissions into ConstantsManager and SFC contracts.

@Mike-CZ Mike-CZ requested a review from thaarok December 13, 2024 10:46
snapshot.endBlock,
snapshot.baseRewardPerSecond,
snapshot.totalSupply
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am really not sure if we want to introduce an even emission into the epoch sealing...

@@ -328,6 +355,8 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version {
snapshot.totalStake = snapshot.totalStake + receivedStake;
}
snapshot.validatorIDs = nextValidatorIDs;

emit SealedEpochValidators(currentEpoch(), snapshot.totalStake, snapshot.validatorIDs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

At least I would remove the snapshot.validatorIDs from the event, as that may become big as the network grows. Who is interested may find the info in the external-internal tx calldata.

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.

2 participants