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

feat(consensus): add L2 registry contract (BFT-434) #555

Merged
merged 72 commits into from
Aug 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
badb7c8
Add consensus L2 contracts
moshababo Jun 27, 2024
34b571a
Add remove func
moshababo Jun 27, 2024
1924966
Update l2-contracts/contracts/AttesterRegistry.sol
moshababo Jun 27, 2024
0185b43
Update l2-contracts/contracts/ConsensusAuthority.sol
moshababo Jun 28, 2024
617eb14
Add weight segregation
moshababo Jun 28, 2024
9f9fb5b
Use nodeOwner address as a UID on registries
moshababo Jun 28, 2024
5580698
Add tests (WIP)
moshababo Jul 1, 2024
8d18140
Remove PoP verification
moshababo Jul 1, 2024
53b4d89
Remove epoch, inactivity delay and nextCommittee
moshababo Jul 3, 2024
4e16fce
Reorder struct fields for potential packing
moshababo Jul 3, 2024
b86eaee
Optimize gas: iterations
moshababo Jul 3, 2024
d1e2500
Import items explicitly
moshababo Jul 3, 2024
bce309a
Use custom errors
moshababo Jul 3, 2024
454d315
Clean delay mechanism leftovers
moshababo Jul 4, 2024
a3169ff
Add top-level setCommittee calls
moshababo Jul 9, 2024
fe60f1a
Expose committee length
moshababo Jul 9, 2024
0c2498f
Merge contracts
moshababo Jul 10, 2024
93e8cf8
Unify validator/attester structs, allow active nodes removal
moshababo Jul 11, 2024
e7fd2e6
Update l2-contracts/contracts/ConsensusRegistry.sol
moshababo Jul 12, 2024
19bfcbd
Add docs
moshababo Jul 21, 2024
07698a3
Merge branch 'main' into consensus_contracts
moshababo Jul 22, 2024
5aa42a0
Lint
moshababo Jul 22, 2024
2e5b1cb
Codespell
moshababo Jul 22, 2024
eed959e
Lint
moshababo Jul 22, 2024
9a2f49f
Prettier
moshababo Jul 22, 2024
31d42cb
Use `EfficientCall.keccak`
moshababo Jul 24, 2024
ca48a30
Use underscore prefix in function params
moshababo Jul 25, 2024
2b861ca
Update l2-contracts/contracts/ConsensusRegistry.sol
moshababo Jul 25, 2024
5d80cbc
Add docs
moshababo Jul 25, 2024
c4069e3
`IsInactive` => `active`
moshababo Jul 25, 2024
08b8dbf
Inherit `Ownable2Step`
moshababo Jul 25, 2024
6087c4f
Add requires
moshababo Jul 25, 2024
a78f7d0
Merge branch 'refs/heads/dev' into consensus_contracts
moshababo Jul 25, 2024
7895533
Add zksync-web3 to devDependencies
moshababo Jul 26, 2024
263ffce
Lint
moshababo Jul 26, 2024
8c54279
Use plain `msg.sender`
moshababo Aug 6, 2024
e04b7bb
Add custom errors for input validation
moshababo Aug 6, 2024
92b0fcc
Add events emission
moshababo Aug 6, 2024
a5b796c
Use fixed-size types
moshababo Aug 7, 2024
c13bd81
[WIP] apply latest/snapshot data modes, to be read from according to …
moshababo Aug 9, 2024
ec36993
Change nodes removal scheme
moshababo Aug 14, 2024
167bcfd
Assign latest commit number when updating
moshababo Aug 14, 2024
9137d35
Apply `_` prefix naming convention
moshababo Aug 14, 2024
3fe085f
Change Secp256k1PublicKey fields naming
moshababo Aug 14, 2024
4b717f9
Update contract doc
moshababo Aug 14, 2024
e2ea3de
Add pubKey hashes mapping for efficient lookups
moshababo Aug 14, 2024
89b4ccd
Add docs
moshababo Aug 14, 2024
f842a7d
Fix Secp256k1PublicKey struct literal
moshababo Aug 14, 2024
347229d
Unify `NodeValidatorPoPChanged` and `NodeAttesterPubKeyChanged` events
moshababo Aug 14, 2024
f90aa99
Add `IConsensusRegistry`
moshababo Aug 14, 2024
feb76be
Remove from node owners array without index finding iteration
moshababo Aug 15, 2024
8fd2100
Remove unneeded mapping
moshababo Aug 15, 2024
4157991
Add the commit counter to commit events as an arg
moshababo Aug 15, 2024
10b601a
Docs refactor
moshababo Aug 15, 2024
655f4b5
Improve pending removal inspection
moshababo Aug 16, 2024
10d7d53
`remove` to potentially trigger a deletion
moshababo Aug 16, 2024
7a2a755
Add `NodeDeleted` event
moshababo Aug 16, 2024
2c25a50
Add `_getNode` getter
moshababo Aug 16, 2024
262adb6
Add committees read functions
moshababo Aug 16, 2024
bb12557
Update existing tests
moshababo Aug 18, 2024
939e96b
Add tests
moshababo Aug 18, 2024
a973b21
pack storage (`uint256` -> `uint32`)
moshababo Aug 18, 2024
7ed0bd3
Rename function
moshababo Aug 18, 2024
e8a32b7
eslint
moshababo Aug 18, 2024
82e44f5
Merge branch 'refs/heads/dev' into consensus_contracts
moshababo Aug 18, 2024
460de55
Update l2-contracts/contracts/ConsensusRegistry.sol
RomanBrodetski Aug 19, 2024
2ebcc2d
Update l2-contracts/contracts/ConsensusRegistry.sol
RomanBrodetski Aug 19, 2024
a1ac4c3
Update l2-contracts/contracts/ConsensusRegistry.sol
RomanBrodetski Aug 19, 2024
0c4dec1
Update l2-contracts/contracts/ConsensusRegistry.sol
RomanBrodetski Aug 19, 2024
5111248
Fix the compilation
vladbochok Aug 19, 2024
43893b0
Add comment on proxy usage
vladbochok Aug 19, 2024
d4f454a
Integrate Proxy
vladbochok Aug 19, 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
Update contract doc
moshababo committed Aug 14, 2024
commit 4b717f94a3037e91ccf6871afc4f3628722a48b1
2 changes: 1 addition & 1 deletion l2-contracts/contracts/ConsensusRegistry.sol
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import {EfficientCall} from "@matterlabs/zksync-contracts/l2/system-contracts/li
/// @custom:security-contact security@matterlabs.dev
/// @title ConsensusRegistry
/// @dev Manages consensus nodes and committees for the L2 consensus protocol,
/// owned by a governance protocol. Nodes act as both validators and attesters,
/// owned by Matter Labs Multisig. Nodes act as both validators and attesters,
/// each playing a distinct role in the consensus process. This contract facilitates
/// the rotation of validator and attester committees, which represent a subset of nodes
/// expected to actively participate in the consensus process during a specific time window.