Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 8 additions & 2 deletions src/KeyManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ contract KeyManager is Initializable, OwnableUpgradeable, UUPSUpgradeable {
uint64 id;
/// @notice wall clock time since unix epoch for this committee to be active
uint64 effectiveTimestamp;
/// @notice block number of the block in which this committee is registered
uint256 registeredBlockNumber;
/// @notice constituting members and their key materials
CommitteeMember[] members;
}
Expand Down Expand Up @@ -194,8 +196,12 @@ contract KeyManager is Initializable, OwnableUpgradeable, UUPSUpgradeable {

if (nextCommitteeId == type(uint64).max) revert CommitteeIdOverflow();

committees[nextCommitteeId] =
Committee({id: nextCommitteeId, effectiveTimestamp: effectiveTimestamp, members: members});
committees[nextCommitteeId] = Committee({
id: nextCommitteeId,
effectiveTimestamp: effectiveTimestamp,
registeredBlockNumber: block.number,
members: members
});

nextCommitteeId++;

Expand Down
2 changes: 1 addition & 1 deletion test/KeyManager.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Test, console} from "forge-std/Test.sol";
import {Test} from "forge-std/Test.sol";
import {KeyManager} from "../src/KeyManager.sol";
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
Expand Down