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

Productionize RMN remote contract #1431

Merged
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
58d8150
fix pragma to 0.8.24
RyanRHall Sep 6, 2024
4e49933
switch to OwnerIsCreator
RyanRHall Sep 6, 2024
efcca8b
remove XXX comments and test functions
RyanRHall Sep 6, 2024
43de93d
reorder imports
RyanRHall Sep 6, 2024
512c7b1
reorder contract contents
RyanRHall Sep 6, 2024
8779688
create RMNRemote.t.sol and RMNHome.t.sol
RyanRHall Sep 6, 2024
ec2825a
setup RMNHome test
RyanRHall Sep 6, 2024
89cc83a
add RMNRemote constructor test
RyanRHall Sep 6, 2024
1d32ad2
add setConfig success test for RMNRemote
RyanRHall Sep 9, 2024
1773727
write setconfig tests
RyanRHall Sep 9, 2024
2e376cc
add initial verify() tests
RyanRHall Sep 9, 2024
333ec83
move RMNRemoteSetup contract to it's own file; pre-sort signing addre…
RyanRHall Sep 10, 2024
a67a1d9
add out of order / duplicate sig tests
RyanRHall Sep 10, 2024
9d3dfe9
add test_verify_unknownSigner_reverts
RyanRHall Sep 10, 2024
98ec143
write test_verify_insufficientSignatures_reverts
RyanRHall Sep 10, 2024
ba9f69d
refactor verify() tests
RyanRHall Sep 10, 2024
fb783c6
incorporate Kostis's RMNRemote changes
RyanRHall Sep 10, 2024
99aa66b
refactor
RyanRHall Sep 10, 2024
28cf1ef
rename curse functions
RyanRHall Sep 11, 2024
22bbcd0
write tests for cursing / uncursing
RyanRHall Sep 11, 2024
e235c26
add RMNRemote_global_and_legacy_curses
RyanRHall Sep 11, 2024
7448001
update comments
RyanRHall Sep 11, 2024
6b807e8
move natspec from RMNRemote to IRMNV2
RyanRHall Sep 11, 2024
07b840a
add natspec @dev comments to structs
RyanRHall Sep 12, 2024
e793eff
improve natspec
RyanRHall Sep 12, 2024
bcc03c8
ignore RMNHome from coverage checks
RyanRHall Sep 12, 2024
255109d
Update comment
RyanRHall Sep 13, 2024
3c8008d
rename i_chainSelector => i_localChainSelector
RyanRHall Sep 13, 2024
d0da905
remove storage / constructor headers
RyanRHall Sep 13, 2024
325b7a8
add comment
RyanRHall Sep 13, 2024
711a4b4
update comments
RyanRHall Sep 13, 2024
bbf4e56
add new constructor test
RyanRHall Sep 13, 2024
b4cbb9a
improve gas efficiency in verify() function
RyanRHall Sep 13, 2024
75f9ca3
PR suggested feedback
RyanRHall Sep 16, 2024
0644f96
rename destLandUpdates => merkleRoots
RyanRHall Sep 16, 2024
22595ea
rename s_cursedSubjectsSequence to s_cursedSubjects and add comment
RyanRHall Sep 16, 2024
508abaa
var rename
RyanRHall Sep 16, 2024
b80d2f7
Squashed commit of the following:
RyanRHall Sep 16, 2024
413a582
gas golf verify() function
RyanRHall Sep 16, 2024
c51a319
implement EnumerableSetBytes16 for cursedSubjects
RyanRHall Sep 16, 2024
4c44a8b
gas golf verify()
RyanRHall Sep 16, 2024
6552764
array cleanup
RyanRHall Sep 16, 2024
74a2487
test refactor
RyanRHall Sep 16, 2024
e8b345c
wrappers & snapshot
RyanRHall Sep 16, 2024
4277680
fix solhint issues
RyanRHall Sep 16, 2024
57da48d
update natspec
RyanRHall Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add natspec @dev comments to structs
  • Loading branch information
RyanRHall committed Sep 17, 2024
commit 07b840ad14650e3dcb7ed6770d6d2d83a9ebbde9
4 changes: 4 additions & 0 deletions contracts/src/v0.8/ccip/rmn/RMNRemote.sol
Original file line number Diff line number Diff line change
@@ -37,22 +37,26 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNV2 {
event Cursed(bytes16[] subjects);
event Uncursed(bytes16[] subjects);

/// @dev the configuration of an RMN signer
struct Signer {
address onchainPublicKey; // ────╮ for signing reports
RyanRHall marked this conversation as resolved.
Show resolved Hide resolved
uint64 nodeIndex; // ────────────╯ maps to nodes in home chain config, should be strictly increasing
}

/// @dev the contract config
struct Config {
bytes32 rmnHomeContractConfigDigest; // digest of the RMNHome contract config
Signer[] signers; // list of signers
uint64 minSigners; // threshold for the number of signers required to verify a report
}

/// @dev the contract config + a version number
struct VersionedConfig {
RyanRHall marked this conversation as resolved.
Show resolved Hide resolved
uint32 version; // for tracking the version of the config
Config config; // the config
}

/// @dev the payload that RMN nodes sign
RyanRHall marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: should we name it RMNReport?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Open to it! I tend to avoid re-prefixing things. Ex when used externally it would become RMNRemote.RMNReport, which feels redundant.

struct Report {
RyanRHall marked this conversation as resolved.
Show resolved Hide resolved
uint256 destChainId; // to guard against chain selector misconfiguration
uint64 destChainSelector; // the chain selector of the destination chain
RyanRHall marked this conversation as resolved.
Show resolved Hide resolved