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
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
- name: Run bls tests
run: |
zig build test:bls
- name: Run swap-or-not-shuffle tests
run: |
zig build test:swap_or_not_shuffle
- name: Run state-transition tests
run: |
zig build test:state_transition
Expand Down
2 changes: 1 addition & 1 deletion bindings/napi/shuffle.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const js = @import("zapi:zapi").js;
const stInnerShuffleList = @import("state_transition").shuffle.innerShuffleList;
const stInnerShuffleList = @import("swap_or_not_shuffle").innerShuffleList;

pub fn innerShuffleList(list: js.Uint32Array, seed: js.Uint8Array, rounds: js.Number, forwards: js.Boolean) !void {
const list_u32 = try list.toSlice();
Expand Down
6 changes: 6 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,14 @@
.root_source_file = "src/bls/root.zig",
.imports = .{.blst},
},
.swap_or_not_shuffle = .{
.root_source_file = "src/swap_or_not_shuffle/root.zig",
},
.state_transition = .{
.root_source_file = "src/state_transition/root.zig",
.imports = .{
.build_options,
.swap_or_not_shuffle,
.ssz,
.config,
.consensus_types,
Expand Down Expand Up @@ -353,6 +357,7 @@
.bls,
.bls_options,
.cpu_count,
.swap_or_not_shuffle,
.hex,
.persistent_merkle_tree,
.ssz,
Expand Down Expand Up @@ -385,6 +390,7 @@
.config = .{ .root_module = .config },
.fork_types = .{ .root_module = .fork_types },
.bls = .{ .root_module = .bls },
.swap_or_not_shuffle = .{ .root_module = .swap_or_not_shuffle },
.state_transition = .{ .root_module = .state_transition },
.era = .{ .root_module = .era },
.fork_choice = .{ .root_module = .fork_choice },
Expand Down
1 change: 0 additions & 1 deletion src/state_transition/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pub const buildSlashingsCacheFromStateIfNeeded = @import("./cache/slashings_cach
pub const EpochCacheImmutableData = @import("./cache/epoch_cache.zig").EpochCacheImmutableData;
pub const EpochCache = @import("./cache/epoch_cache.zig").EpochCache;

pub const shuffle = @import("./utils/shuffle.zig");
pub const committee_indices = @import("./utils/committee_indices.zig");
pub const PubkeyCache = @import("./cache/pubkey_cache.zig").PubkeyCache;
pub const pkix = @import("./cache/pkix.zig");
Expand Down
2 changes: 1 addition & 1 deletion src/state_transition/utils/epoch_shuffling.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const preset = @import("preset").preset;
const AnyBeaconState = @import("fork_types").AnyBeaconState;
const getSeed = @import("./seed.zig").getSeed;
const c = @import("constants");
const innerShuffleList = @import("./shuffle.zig").innerShuffleList;
const innerShuffleList = @import("swap_or_not_shuffle").innerShuffleList;
const Epoch = types.primitive.Epoch.Type;
const computeStartSlotAtEpoch = @import("./epoch.zig").computeStartSlotAtEpoch;
const getBlockRootAtSlot = @import("./block_root.zig").getBlockRootAtSlot;
Expand Down
1 change: 0 additions & 1 deletion src/state_transition/utils_test_root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ test "state_transition utils" {
_ = @import("utils/pubkey_index_map.zig");
_ = @import("utils/ref_count.zig");
_ = @import("utils/seed.zig");
_ = @import("utils/shuffle.zig");
_ = @import("utils/signature_sets.zig");
_ = @import("utils/signing_root.zig");
_ = @import("utils/sync_committee.zig");
Expand Down
Loading