Skip to content

Commit 42ad274

Browse files
authored
Merge pull request #3 from informalsystems/dangush/poolrseed
refactor: Rseed as Fq
2 parents 97dd547 + 3968704 commit 42ad274

File tree

24 files changed

+94
-72
lines changed

24 files changed

+94
-72
lines changed

.github/workflows/buf-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
# Run our bespoke tooling for codegen, consuming the protocol buffer definitions
4949
# and emitting generated code. Afterward, there should be no uncommitted changes.
5050
build:
51-
runs-on: buildjet-16vcpu-ubuntu-2204
51+
runs-on: ubuntu-latest
5252
steps:
5353
- name: Checkout the source code
5454
uses: actions/checkout@v4

.github/workflows/containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
workflow_dispatch:
1313
jobs:
1414
penumbra:
15-
runs-on: buildjet-16vcpu-ubuntu-2204
15+
runs-on: ubuntu-latest
1616
permissions:
1717
contents: read
1818
packages: write

.github/workflows/crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
publish:
17-
runs-on: buildjet-16vcpu-ubuntu-2204
17+
runs-on: ubuntu-latest
1818
env:
1919
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2020
steps:

.github/workflows/docs-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
# We use a custom script to generate the index page for https://rustdoc.penumbra.zone,
1111
# and refactors to rust deps can break that generation. Let's ensure this script exits 0
1212
# on PRs, but we'll still only deploy after merge into main.
13-
runs-on: buildjet-8vcpu-ubuntu-2204
13+
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
1616
with:
@@ -38,7 +38,7 @@ jobs:
3838
# In particular, links are checked within the docs.
3939
mdbook:
4040
# Downgrading runner size to 4vcpu, since we're not compiling code.
41-
runs-on: buildjet-4vcpu-ubuntu-2204
41+
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@v4
4444
with:

.github/workflows/notes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# and only runs post-merge on main, so 10m isn't bad.
1414
build:
1515
timeout-minutes: 30
16-
runs-on: buildjet-16vcpu-ubuntu-2204
16+
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout the source code
1919
uses: actions/checkout@v4

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
jobs:
1616
lint:
17-
runs-on: buildjet-16vcpu-ubuntu-2204
17+
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
2020
with:
@@ -58,7 +58,7 @@ jobs:
5858
# As of 2025Q1, the "features" job is the slowest in the CI suite.
5959
# Consider moving to a scheduled job on main, rather than running on PRs.
6060
features:
61-
runs-on: buildjet-16vcpu-ubuntu-2204
61+
runs-on: ubuntu-latest
6262
steps:
6363
- uses: actions/checkout@v4
6464
with:
@@ -86,7 +86,7 @@ jobs:
8686
run: nix develop --command ./deployments/scripts/check-wasm-compat.sh
8787

8888
test:
89-
runs-on: buildjet-16vcpu-ubuntu-2204
89+
runs-on: ubuntu-latest
9090
steps:
9191
- uses: actions/checkout@v4
9292
with:

.github/workflows/smoke.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
jobs:
1616
smoke:
17-
runs-on: buildjet-16vcpu-ubuntu-2204
17+
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
2020
with:
@@ -40,7 +40,7 @@ jobs:
4040
run: nix develop --command just smoke
4141

4242
pmonitor:
43-
runs-on: buildjet-16vcpu-ubuntu-2204
43+
runs-on: ubuntu-latest
4444
steps:
4545
- uses: actions/checkout@v4
4646
with:
@@ -66,7 +66,7 @@ jobs:
6666
# Temporarily disabling these in CI, as the testnet endpoints are
6767
# incompatible with `main`, given GH5010.
6868
# testnet:
69-
# runs-on: buildjet-16vcpu-ubuntu-2204
69+
# runs-on: ubuntu-latest
7070
# steps:
7171
# - uses: actions/checkout@v4
7272
# with:

crates/bench/benches/nullifier_derivation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn nullifier_derivation_proving_time(c: &mut Criterion) {
3838
let note = Note::from_parts(
3939
address,
4040
Value::from_str("1upenumbra").expect("valid value"),
41-
Rseed([1u8; 32]),
41+
Rseed::from([1u8; 32]),
4242
)
4343
.expect("can make a note");
4444
let nullifier = Nullifier(Fq::from(1u64));

crates/bench/benches/output.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ fn output_proving_time(c: &mut Criterion) {
3535
.expect("generated 1 address");
3636
let value_to_send = Value::from_str("1upenumbra").expect("valid value");
3737

38-
let note = Note::from_parts(address, value_to_send, Rseed([1u8; 32])).expect("can make a note");
38+
let note =
39+
Note::from_parts(address, value_to_send, Rseed::from([1u8; 32])).expect("can make a note");
3940
let balance_blinding = Fr::from(1u32);
4041
let balance_commitment = (-Balance::from(value_to_send)).commit(balance_blinding);
4142
let note_commitment = note.commit();

crates/core/component/dex/src/swap/plaintext.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ impl SwapPlaintext {
5757
let rseed_1_hash = hash_1(&OUTPUT_1_BLINDING_DOMAIN_SEPARATOR, fq_rseed);
5858
let rseed_2_hash = hash_1(&OUTPUT_2_BLINDING_DOMAIN_SEPARATOR, fq_rseed);
5959
(
60-
Rseed(rseed_1_hash.to_bytes()),
61-
Rseed(rseed_2_hash.to_bytes()),
60+
Rseed::from(rseed_1_hash.to_bytes()),
61+
Rseed::from(rseed_2_hash.to_bytes()),
6262
)
6363
}
6464

@@ -317,7 +317,7 @@ impl TryFrom<pb::SwapPlaintext> for SwapPlaintext {
317317
.trading_pair
318318
.ok_or_else(|| anyhow::anyhow!("missing trading pair in SwapPlaintext"))?
319319
.try_into()?,
320-
rseed: Rseed(plaintext.rseed.as_slice().try_into()?),
320+
rseed: Rseed::from(plaintext.rseed.as_slice()),
321321
})
322322
}
323323
}
@@ -401,7 +401,7 @@ impl TryFrom<&[u8]> for SwapPlaintext {
401401
asset_id: asset::Id::try_from(fee_asset_id_bytes)?,
402402
}),
403403
claim_address: pb_address.try_into()?,
404-
rseed: Rseed(rseed),
404+
rseed: Rseed::from(rseed),
405405
})
406406
}
407407
}

0 commit comments

Comments
 (0)