-
Notifications
You must be signed in to change notification settings - Fork 35
feat: implement devnet3 committee aggregation spec #552
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
Changes from all commits
c01fb8b
3a1441f
a70286f
198df09
c3ed098
5475ecb
45c79c9
4ad9682
c4fafc2
941607d
323e437
a93dfcd
487465a
8e5ec28
6847d7a
2010e40
c81b4c2
892c1ee
abb20af
83cc656
fe9bfbb
1bf85bd
9b8bf49
137fa07
388761d
1562fae
c984a63
3e355e0
8a4b613
9b36bf4
8907c39
2f6d497
ac8610c
f2a590e
0cfc7d4
9f51288
c2c2883
205f6d9
5d475c7
0323eba
099453c
f9042ea
f485d76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -69,6 +69,7 @@ pub const NodeCommand = struct { | |||||||||
| @"network-dir": []const u8 = "./network", | ||||||||||
| @"data-dir": []const u8 = constants.DEFAULT_DATA_DIR, | ||||||||||
| @"checkpoint-sync-url": ?[]const u8 = null, | ||||||||||
| @"is-aggregator": bool = false, | ||||||||||
|
|
||||||||||
| pub const __shorts__ = .{ | ||||||||||
| .help = .h, | ||||||||||
|
|
@@ -88,6 +89,7 @@ pub const NodeCommand = struct { | |||||||||
| .@"sig-keys-dir" = "Relative path of custom genesis to signature key directory", | ||||||||||
| .@"data-dir" = "Path to the data directory", | ||||||||||
| .@"checkpoint-sync-url" = "URL to fetch finalized checkpoint state from for checkpoint sync (e.g., http://localhost:5052/lean/v0/states/finalized)", | ||||||||||
| .@"is-aggregator" = "Enable aggregator mode for committee signature aggregation", | ||||||||||
| .help = "Show help information for the node command", | ||||||||||
| }; | ||||||||||
| }; | ||||||||||
|
|
@@ -98,15 +100,15 @@ const BeamCmd = struct { | |||||||||
| @"api-port": u16 = constants.DEFAULT_API_PORT, | ||||||||||
| @"metrics-port": u16 = constants.DEFAULT_METRICS_PORT, | ||||||||||
| data_dir: []const u8 = constants.DEFAULT_DATA_DIR, | ||||||||||
| @"is-aggregator": bool = true, | ||||||||||
|
|
||||||||||
| pub fn format(self: BeamCmd, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { | ||||||||||
| _ = fmt; | ||||||||||
| _ = options; | ||||||||||
| try writer.print("BeamCmd{{ mockNetwork={}, api-port={d}, metrics-port={d}, data_dir=\"{s}\" }}", .{ | ||||||||||
| pub fn format(self: BeamCmd, writer: anytype) !void { | ||||||||||
|
||||||||||
| pub fn format(self: BeamCmd, writer: anytype) !void { | |
| pub fn format(self: BeamCmd, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { | |
| _ = fmt; | |
| _ = options; |
Copilot
AI
Feb 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This format method no longer matches Zig's expected formatting hook signature (format(self, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype)). If BeamCmd is formatted via std.fmt (e.g., {} / {any}), this will stop compiling. Restore the standard signature (or rename this method and call it explicitly) to keep formatting working.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,7 +24,11 @@ pub const ChainConfig = struct { | |||||||||||||||||||||||||||||||
| pub fn init(chainId: Chain, chainOptsOrNull: ?ChainOptions) !Self { | ||||||||||||||||||||||||||||||||
| switch (chainId) { | ||||||||||||||||||||||||||||||||
| .custom => { | ||||||||||||||||||||||||||||||||
| if (chainOptsOrNull) |*chainOpts| { | ||||||||||||||||||||||||||||||||
| if (chainOptsOrNull) |chain_opts_in| { | ||||||||||||||||||||||||||||||||
| var chainOpts = chain_opts_in; | ||||||||||||||||||||||||||||||||
| if (chainOpts.attestation_committee_count == null) { | ||||||||||||||||||||||||||||||||
| chainOpts.attestation_committee_count = 1; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| const genesis = utils.Cast(types.GenesisSpec, chainOpts); | ||||||||||||||||||||||||||||||||
| // transfer ownership of any allocated memory in chainOpts to spec | ||||||||||||||||||||||||||||||||
| const spec = utils.Cast(types.ChainSpec, chainOpts); | ||||||||||||||||||||||||||||||||
|
Comment on lines
+27
to
34
|
||||||||||||||||||||||||||||||||
| if (chainOptsOrNull) |chain_opts_in| { | |
| var chainOpts = chain_opts_in; | |
| if (chainOpts.attestation_committee_count == null) { | |
| chainOpts.attestation_committee_count = 1; | |
| } | |
| const genesis = utils.Cast(types.GenesisSpec, chainOpts); | |
| // transfer ownership of any allocated memory in chainOpts to spec | |
| const spec = utils.Cast(types.ChainSpec, chainOpts); | |
| if (chainOptsOrNull) |*chainOpts| { | |
| if (chainOpts.attestation_committee_count == null) { | |
| chainOpts.attestation_committee_count = 1; | |
| } | |
| const genesis = utils.Cast(types.GenesisSpec, chainOpts.*); | |
| // transfer ownership of any allocated memory in chainOpts to spec | |
| const spec = utils.Cast(types.ChainSpec, chainOpts.*); |
Uh oh!
There was an error while loading. Please reload this page.