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

switch minSigners to f in RMNRemote & RMNHome #1495

Conversation

RyanRHall
Copy link
Contributor

@RyanRHall RyanRHall commented Oct 9, 2024

Motivation

In CCIPHome we have a requirement on the number of supporting oracles, but on RMNHome we have a laxer requirement of n >= minObservers which is not ideal (this was also in the initial sketch). If we have n=minObservers then liveness is not guaranteed. If we express f=minObservers-1, then we need at least n >= 2f+1 for liveness.

Similar story in RMNRemote for f=minSigners-1, where n >= 2f+1 would also be required for liveness.

Solution

Drop the minObservers/minSigners in favor of f for uniformity with CCIPConfig

Copy link
Contributor

github-actions bot commented Oct 9, 2024

LCOV of commit 26b2eb2 during Solidity Foundry #8591

Summary coverage rate:
  lines......: 97.9% (2286 of 2336 lines)
  functions..: 95.1% (429 of 451 functions)
  branches...: 93.6% (540 of 577 branches)

Files changed coverage rate: n/a

@RyanRHall RyanRHall changed the title switch minsigners to f in RMNRemote switch minSigners to f in RMNRemote & RMNHome Oct 10, 2024
@RyanRHall RyanRHall changed the title switch minSigners to f in RMNRemote & RMNHome switch minSigners to f in RMNRemote & RMNHome Oct 10, 2024
@RyanRHall RyanRHall requested review from RensR and RayXpub October 10, 2024 13:05
@RyanRHall RyanRHall enabled auto-merge (squash) October 10, 2024 13:38
@RyanRHall RyanRHall disabled auto-merge October 10, 2024 13:38
@RyanRHall RyanRHall enabled auto-merge (squash) October 10, 2024 13:39
@@ -92,10 +92,13 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote {
Signature[] calldata signatures,
uint256 rawVs
) external view {
(bool enabled, uint64 f) = (s_config.enabled, s_config.f);
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's pretty non-standard notation. Both are also used only once, does inlining te storage read really add a significant amount of gas?

@RyanRHall RyanRHall force-pushed the CCIP-3614-have-rmn-be-more-in-line-with-ccip-config branch from 0cff04e to 9468868 Compare October 15, 2024 19:00
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@RyanRHall
Copy link
Contributor Author

closing in favor of smartcontractkit/chainlink#14817

@RyanRHall RyanRHall closed this Oct 16, 2024
auto-merge was automatically disabled October 16, 2024 20:54

Pull request was closed

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