Skip to content

Commit 6b8f663

Browse files
committed
pr feedback
1 parent 1297bf7 commit 6b8f663

File tree

5 files changed

+51
-54
lines changed

5 files changed

+51
-54
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
cache-workspaces:
7777
./mev-programs/
7878
- name: install solana toolsuite
79-
run: sh -c "$(curl -sSfL https://release.anza.xyz/v3.1.1/install)"
79+
run: sh -c "$(curl -sSfL https://release.anza.xyz/v2.2.13/install)"
8080
- name: add to path
8181
run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
8282
- name: Install anchor
@@ -114,9 +114,6 @@ jobs:
114114

115115
# Slow anchor tests
116116
- run: solana-keygen new --no-bip39-passphrase # needed for tests
117-
- name: Run priority-fee-distribution test
118-
working-directory: ./mev-programs
119-
run: RUSTUP_TOOLCHAIN=nightly-2025-04-16 anchor test --run tests/priority-fee-distribution.ts
120117
- name: Run Anchor test
121118
working-directory: ./mev-programs
122119
run: RUSTUP_TOOLCHAIN=nightly-2025-04-16 anchor test

mev-programs/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mev-programs/programs/priority-fee-distribution/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ pub mod jito_priority_fee_distribution {
6969
return Err(MaxValidatorCommissionFeeBpsExceeded.into());
7070
}
7171

72-
let valdiator_vote_account_node_pubkey =
72+
let validator_vote_account_node_pubkey =
7373
VoteState::deserialize_node_pubkey(&ctx.accounts.validator_vote_account)?;
74-
if valdiator_vote_account_node_pubkey != *ctx.accounts.signer.key {
74+
if validator_vote_account_node_pubkey != *ctx.accounts.signer.key {
7575
return Err(Unauthorized.into());
7676
}
7777

mev-programs/programs/tip-distribution/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ pub mod jito_tip_distribution {
6666
return Err(MaxValidatorCommissionFeeBpsExceeded.into());
6767
}
6868

69-
let vote_account_node_pubkey =
69+
let validator_vote_account_node_pubkey =
7070
VoteState::deserialize_node_pubkey(&ctx.accounts.validator_vote_account)?;
71-
if vote_account_node_pubkey != *ctx.accounts.signer.key {
71+
if validator_vote_account_node_pubkey != *ctx.accounts.signer.key {
7272
return Err(Unauthorized.into());
7373
}
7474

mev-programs/tests/priority-fee-distribution.ts

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ describe("tests priority_fee_distribution", () => {
5656

5757
// then
5858
try {
59-
await priorityFeeDistribution.methods
60-
.initialize(
61-
authority.publicKey,
62-
expiredFundsAccount.publicKey,
63-
numEpochsValid,
64-
maxValidatorCommissionBps,
65-
configBump
66-
)
67-
.accounts({
68-
config: configAccount,
69-
systemProgram: SystemProgram.programId,
70-
initializer: initializer.publicKey,
71-
})
72-
.signers([initializer])
73-
.rpc();
59+
await priorityFeeDistribution.rpc.initialize(
60+
authority.publicKey,
61+
expiredFundsAccount.publicKey,
62+
numEpochsValid,
63+
maxValidatorCommissionBps,
64+
configBump,
65+
{
66+
accounts: {
67+
config: configAccount,
68+
systemProgram: SystemProgram.programId,
69+
initializer: initializer.publicKey,
70+
},
71+
signers: [initializer],
72+
}
73+
);
7474
} catch (e) {
7575
assert.fail("unexpected error: " + e);
7676
}
@@ -267,19 +267,19 @@ describe("tests priority_fee_distribution", () => {
267267

268268
await sleepForEpochs(1);
269269
try {
270-
await priorityFeeDistribution.methods
271-
.uploadMerkleRoot(
272-
root.toJSON().data,
273-
maxTotalClaim,
274-
maxNumNodes
275-
)
276-
.accounts({
277-
priorityFeeDistributionAccount,
278-
merkleRootUploadAuthority: validatorVoteAccount.publicKey,
279-
config: configAccount,
280-
})
281-
.signers([validatorVoteAccount])
282-
.rpc();
270+
await priorityFeeDistribution.rpc.uploadMerkleRoot(
271+
root.toJSON().data,
272+
maxTotalClaim,
273+
maxNumNodes,
274+
{
275+
accounts: {
276+
priorityFeeDistributionAccount,
277+
merkleRootUploadAuthority: validatorVoteAccount.publicKey,
278+
config: configAccount,
279+
},
280+
signers: [validatorVoteAccount],
281+
}
282+
);
283283
} catch (e) {
284284
assert.fail("Unexpected error: " + e);
285285
}
@@ -1230,7 +1230,7 @@ describe("tests priority_fee_distribution", () => {
12301230
);
12311231
});
12321232

1233-
describe("After go_live_epoch", () => {
1233+
describe("After go_live_epoch", async () => {
12341234
before(async () => {
12351235
// Update Config.go_live_epoch to use current epoch
12361236
const [currentConfig, epochInfo] = await Promise.all([
@@ -1516,21 +1516,21 @@ const call_initTipDistributionAccount = async ({
15161516
priorityFeeDistributionAccount,
15171517
bump,
15181518
}) => {
1519-
return await priorityFeeDistribution.methods
1520-
.initializePriorityFeeDistributionAccount(
1521-
merkleRootUploadAuthority,
1522-
validatorCommissionBps,
1523-
bump
1524-
)
1525-
.accounts({
1526-
config,
1527-
systemProgram,
1528-
signer: validatorIdentityKeypair.publicKey,
1529-
validatorVoteAccount: validatorVoteAccount.publicKey,
1530-
priorityFeeDistributionAccount,
1531-
})
1532-
.signers([validatorIdentityKeypair])
1533-
.rpc();
1519+
return await priorityFeeDistribution.rpc.initializePriorityFeeDistributionAccount(
1520+
merkleRootUploadAuthority,
1521+
validatorCommissionBps,
1522+
bump,
1523+
{
1524+
accounts: {
1525+
config,
1526+
systemProgram,
1527+
signer: validatorIdentityKeypair.publicKey,
1528+
validatorVoteAccount: validatorVoteAccount.publicKey,
1529+
priorityFeeDistributionAccount,
1530+
},
1531+
signers: [validatorIdentityKeypair],
1532+
}
1533+
);
15341534
};
15351535

15361536
const setupWithUploadedMerkleRoot = async () => {

0 commit comments

Comments
 (0)