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

TACo application refinements #145

Merged
merged 8 commits into from
Oct 27, 2023
Merged

TACo application refinements #145

merged 8 commits into from
Oct 27, 2023

Conversation

vzotova
Copy link
Member

@vzotova vzotova commented Oct 6, 2023

No description provided.

@vzotova vzotova self-assigned this Oct 6, 2023
@vzotova vzotova changed the title [WIP] TACo application refinements TACo application refinements Oct 13, 2023
@vzotova vzotova marked this pull request as ready for review October 13, 2023 19:13
Copy link
Member

@manumonti manumonti left a comment

Choose a reason for hiding this comment

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

LGTM ✌️! I left a question more than a suggestion.

stakingProviderFromOperator[operator] = stakingProvider;
info.operatorConfirmed = false;
// TODO placeholder to notify Coordinator
if (stakingProvider == address(0) || operator == oldOperator) {
Copy link
Member

Choose a reason for hiding this comment

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

Sorry if it's a dumb question, but why not manage this with a require statement?

Suggested change
if (stakingProvider == address(0) || operator == oldOperator) {
require (stakingProvider != address(0) && operator != oldOperator);

Copy link
Member Author

Choose a reason for hiding this comment

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

it's not dumb question. Because there is no real point to fail in xchain txs, it will be just skipped and that's it. But some sanity check to decrease gas consumption we want to do

Copy link
Member

Choose a reason for hiding this comment

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

got it, thanks!

uint64 endCommitment;
}

uint256 public constant REWARD_PER_TOKEN_MULTIPLIER = 10 ** 4;
Copy link
Member

Choose a reason for hiding this comment

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

What does this constant represent? What's the multiplier? Is this something for precision?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, name is not perfect. Thing is we have variable called rewardPerToken. With increase of precision now it's actually not per token but per 10000 tokens (that multiplier).

Copy link
Member

Choose a reason for hiding this comment

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

REWARD_CALCULATION_MULTIPLIER?

Copy link
Member Author

@vzotova vzotova Oct 17, 2023

Choose a reason for hiding this comment

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

hmm, this name suits better for FLOATING_POINT_DIVISOR

- ProxyAdmin
- LynxTACoChildApplication:
_rootApplication: $MockPolygonChild
_minimumAuthorization: 40000000000000000000000
Copy link
Member

Choose a reason for hiding this comment

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

Something to think about here is that the value used in root.yml for the root application would need to match the value used here... 🤔 (cc @KPrasch )

Copy link
Member

Choose a reason for hiding this comment

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

That's why we need a separate constants section or file

Copy link
Member

@derekpierre derekpierre Oct 16, 2023

Choose a reason for hiding this comment

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

Indeed. Now that it is a yml file, perhaps we can specify a dependent constants.yml file ... that allows for a dictionary of variables/values to be specified. I'm less familiar with yml spec.

@vzotova vzotova mentioned this pull request Oct 20, 2023
7 tasks
@KPrasch KPrasch merged commit ec83330 into nucypher:main Oct 27, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

6 participants