Skip to content

Stermi natspecs (no. 3)#963

Open
MathisGD wants to merge 6 commits into
mainfrom
pro-97
Open

Stermi natspecs (no. 3)#963
MathisGD wants to merge 6 commits into
mainfrom
pro-97

Conversation

@MathisGD
Copy link
Copy Markdown
Contributor

@MathisGD MathisGD commented Jun 2, 2026

@MathisGD MathisGD self-assigned this Jun 2, 2026
@MathisGD MathisGD requested review from QGarchery, adhusson and peyha June 2, 2026 09:25
@linear
Copy link
Copy Markdown

linear Bot commented Jun 2, 2026

PRO-97

@MathisGD MathisGD changed the title Stermi natspecs Stermi natspecs (#3) Jun 2, 2026
@MathisGD MathisGD changed the title Stermi natspecs (#3) Stermi natspecs (no. 3) Jun 2, 2026
Comment thread src/Midnight.sol Outdated
MathisGD and others added 2 commits June 2, 2026 20:38
Co-authored-by: Quentin Garchery <garchery.quentin@gmail.com>
Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
Comment thread src/periphery/interfaces/IMidnightBundles.sol
Comment thread src/periphery/MidnightBundles.sol Outdated
function isRatified(Offer memory offer, bytes memory ratifierData) external view returns (bytes32) {
(Signature memory sig, bytes32 root, uint256 leafIndex, bytes32[] memory proof) =
abi.decode(ratifierData, (Signature, bytes32, uint256, bytes32[]));
require(proof.length <= 20, HashLib.TreeTooHigh());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Strange since this reverts later anyway.

function isRatified(Offer memory offer, bytes memory ratifierData) external view returns (bytes32) {
(bytes32 root, uint256 leafIndex, bytes32[] memory proof) =
abi.decode(ratifierData, (bytes32, uint256, bytes32[]));
require(proof.length <= 20, HashLib.TreeTooHigh());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will we limit length to 20 in all future ratifiers? Wdyt moving the proof size limit comment just to ecrecover ratifier and removing the proof length checks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's 1M offers so I don't see any use-case for going above

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agree we don't care it's just that if we enforce consistency here we need to remember to be consistent in the future ones (otherwise it doesn't make sense to add the require in the setter ratifier here)

Comment thread src/Midnight.sol
Comment thread src/Midnight.sol Outdated
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