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

Universal nonce #119

Merged
merged 3 commits into from
Jun 6, 2022
Merged

Universal nonce #119

merged 3 commits into from
Jun 6, 2022

Conversation

adlerjohn
Copy link
Member

Fixes #118

@adlerjohn adlerjohn added the enhancement New feature or request label Jun 5, 2022
@adlerjohn adlerjohn self-assigned this Jun 5, 2022
/// @param _dataRootTupleRoot The Merkle root of data root tuples.
/// @param _currentValidatorSet The current validator set.
/// @param _sigs Signatures.
function submitDataRootTupleRoot(
uint256 _nonce,
uint256 _newNonce,
uint256 _validatorSetNonce,
Copy link
Member Author

Choose a reason for hiding this comment

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

Rather than passing in the latest validator set nonce as a parameter, this could be saved in storage. Opinions either way @evan-forbes @sweexordious?

Copy link
Member

Choose a reason for hiding this comment

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

I'm okey either way.

Copy link
Member

Choose a reason for hiding this comment

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

same. How much gas would that cost? It would only save a few queries for the relayer, and not that many people will be running relayers I don't think, so probably not worth it add storage me thinks.

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 would be more expensive in every way to use storage.

@adlerjohn adlerjohn marked this pull request as ready for review June 5, 2022 19:09
@adlerjohn adlerjohn requested review from evan-forbes and rach-id June 5, 2022 19:09
Copy link
Member

@rach-id rach-id left a comment

Choose a reason for hiding this comment

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

LGTM to me. Deferring to @evan-forbes

/// @param _dataRootTupleRoot The Merkle root of data root tuples.
/// @param _currentValidatorSet The current validator set.
/// @param _sigs Signatures.
function submitDataRootTupleRoot(
uint256 _nonce,
uint256 _newNonce,
uint256 _validatorSetNonce,
Copy link
Member

Choose a reason for hiding this comment

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

I'm okey either way.

Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

linking to celestiaorg/celestia-app#464 again for posterity

LGTM 👍

/// @param _dataRootTupleRoot The Merkle root of data root tuples.
/// @param _currentValidatorSet The current validator set.
/// @param _sigs Signatures.
function submitDataRootTupleRoot(
uint256 _nonce,
uint256 _newNonce,
uint256 _validatorSetNonce,
Copy link
Member

Choose a reason for hiding this comment

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

same. How much gas would that cost? It would only save a few queries for the relayer, and not that many people will be running relayers I don't think, so probably not worth it add storage me thinks.

@adlerjohn adlerjohn merged commit 210a1fb into master Jun 6, 2022
@adlerjohn adlerjohn deleted the adlerjohn/universal-nonce branch June 6, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add support for universal nonce
3 participants