Skip to content

Commit

Permalink
Test validator installer now sources from version 2.0.x line
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed Nov 27, 2024
1 parent be3ad1e commit 88a885f
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 181 deletions.
11 changes: 11 additions & 0 deletions .changeset/wicked-bikes-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@solana/sysvars': minor
---

Removed the fees sysvar which has been disabled on the network for a year, and has now been removed from the test validator in Agave 2.0

```
% solana feature status JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG
Feature | Status | Activation Slot | Description
JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG | active since epoch 483 | 208656004 | disable fees sysvar
```
4 changes: 2 additions & 2 deletions packages/rpc-api/src/__tests__/get-program-accounts-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@ describe('getProgramAccounts', () => {
data: {
parsed: {
info: expect.any(Object),
type: 'fees',
type: 'lastRestartSlot',
},
program: 'sysvar',
space: 8n,
Expand All @@ -2074,7 +2074,7 @@ describe('getProgramAccounts', () => {
rentEpoch: expect.any(BigInt),
space: 8n,
},
pubkey: 'SysvarFees111111111111111111111111111111111',
pubkey: 'SysvarLastRestartS1ot1111111111111111111111',
},
{
account: {
Expand Down
15 changes: 15 additions & 0 deletions packages/rpc-api/src/__tests__/simulate-transaction-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -284,6 +285,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -323,6 +325,7 @@ describe('simulateTransaction', () => {
err: 'BlockhashNotFound',
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -362,6 +365,10 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: {
blockhash: expect.any(String),
lastValidBlockHeight: expect.any(BigInt),
},
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -464,6 +471,7 @@ describe('simulateTransaction', () => {
err: 'AccountNotFound',
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -513,6 +521,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -562,6 +571,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -628,6 +638,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -678,6 +689,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -727,6 +739,7 @@ describe('simulateTransaction', () => {
innerInstructions: null,

logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -781,6 +794,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down Expand Up @@ -821,6 +835,7 @@ describe('simulateTransaction', () => {
err: null,
innerInstructions: null,
logs: expect.any(Array),
replacementBlockhash: null,
returnData: null,
unitsConsumed: expect.any(BigInt),
},
Expand Down
41 changes: 0 additions & 41 deletions packages/rpc-graphql/src/__tests__/account-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,47 +994,6 @@ describe('account', () => {
},
});
});
it('can get the fees sysvar', async () => {
expect.assertions(1);
const variableValues = {
address: 'SysvarFees111111111111111111111111111111111',
};
const source = /* GraphQL */ `
query testQuery($address: Address!) {
account(address: $address) {
address
lamports
ownerProgram {
address
}
rentEpoch
space
... on SysvarFeesAccount {
feeCalculator {
lamportsPerSignature
}
}
}
}
`;
const result = await rpcGraphQL.query(source, variableValues);
expect(result).toMatchObject({
data: {
account: {
address: 'SysvarFees111111111111111111111111111111111',
feeCalculator: {
lamportsPerSignature: expect.any(BigInt),
},
lamports: expect.any(BigInt),
ownerProgram: {
address: 'Sysvar1111111111111111111111111111111111111',
},
rentEpoch: expect.any(BigInt),
space: expect.any(BigInt),
},
},
});
});
it('can get the last restart slot sysvar', async () => {
expect.assertions(1);
const variableValues = {
Expand Down
14 changes: 0 additions & 14 deletions packages/rpc-graphql/src/schema/type-defs/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,20 +470,6 @@ export const accountTypeDefs = /* GraphQL */ `
lamportsPerSignature: Lamports
}
"""
Sysvar Fees
"""
type SysvarFeesAccount implements Account {
address: Address
data(encoding: AccountEncoding!, dataSlice: DataSlice): String
executable: Boolean
lamports: Lamports
ownerProgram: Account
space: BigInt
rentEpoch: Epoch
feeCalculator: FeeCalculator
}
"""
Sysvar Last Restart Slot
"""
Expand Down
7 changes: 0 additions & 7 deletions packages/rpc-graphql/src/schema/type-resolvers/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ export const accountTypeResolvers = {
if (jsonParsedConfigs.accountType === 'epochSchedule') {
return 'SysvarEpochScheduleAccount';
}
if (jsonParsedConfigs.accountType === 'fees') {
return 'SysvarFeesAccount';
}
if (jsonParsedConfigs.accountType === 'lastRestartSlot') {
return 'SysvarLastRestartSlotAccount';
}
Expand Down Expand Up @@ -271,10 +268,6 @@ export const accountTypeResolvers = {
data: resolveAccountData(),
ownerProgram: resolveAccount('ownerProgram'),
},
SysvarFeesAccount: {
data: resolveAccountData(),
ownerProgram: resolveAccount('ownerProgram'),
},
SysvarLastRestartSlotAccount: {
data: resolveAccountData(),
ownerProgram: resolveAccount('ownerProgram'),
Expand Down
29 changes: 0 additions & 29 deletions packages/sysvars/src/__tests__/fees-test.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/sysvars/src/__tests__/sysvar-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
fetchJsonParsedSysvarAccount,
SYSVAR_CLOCK_ADDRESS,
SYSVAR_EPOCH_SCHEDULE_ADDRESS,
SYSVAR_FEES_ADDRESS,
SYSVAR_LAST_RESTART_SLOT_ADDRESS,
SYSVAR_RECENT_BLOCKHASHES_ADDRESS,
SYSVAR_RENT_ADDRESS,
Expand Down Expand Up @@ -77,22 +76,6 @@ describe('sysvar account', () => {
});
});
});
describe('fees', () => {
it('fetch encoded', async () => {
expect.assertions(3);
await assertValidEncodedSysvarAccount(SYSVAR_FEES_ADDRESS);
});
it('fetch JSON-parsed', async () => {
expect.assertions(3);
await assertValidJsonParsedSysvarAccount(SYSVAR_FEES_ADDRESS, {
data: {
feeCalculator: {
lamportsPerSignature: expect.any(String), // JsonParsed converts to string
},
},
});
});
});
// `Instructions` does not exist on-chain.
describe('last restart slot', () => {
it('fetch encoded', async () => {
Expand Down
9 changes: 0 additions & 9 deletions packages/sysvars/src/__typetests__/sysvar-typetest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type { JsonParsedSysvarAccount } from '@solana/rpc-parsed-types';
import { fetchSysvarClock, type SysvarClock } from '../clock';
import { fetchSysvarEpochRewards, type SysvarEpochRewards } from '../epoch-rewards';
import { fetchSysvarEpochSchedule, type SysvarEpochSchedule } from '../epoch-schedule';
import { fetchSysvarFees, type SysvarFees } from '../fees';
import { fetchSysvarLastRestartSlot, type SysvarLastRestartSlot } from '../last-restart-slot';
import { fetchSysvarRecentBlockhashes, type SysvarRecentBlockhashes } from '../recent-blockhashes';
import { fetchSysvarRent, type SysvarRent } from '../rent';
Expand Down Expand Up @@ -79,14 +78,6 @@ const rpc = null as unknown as Parameters<typeof fetchEncodedSysvarAccount>[0];
fetchSysvarEpochSchedule(rpc) satisfies Promise<{ foo: string }>;
}

// `fetchSysvarFees`
{
// Returns a `SysvarFees`.
fetchSysvarFees(rpc) satisfies Promise<SysvarFees>;
// @ts-expect-error Returns a `SysvarFees`.
fetchSysvarFees(rpc) satisfies Promise<{ foo: string }>;
}

// `fetchSysvarLastRestartSlot`
{
// Returns a `SysvarLastRestartSlot`.
Expand Down
57 changes: 0 additions & 57 deletions packages/sysvars/src/fees.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/sysvars/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './clock';
export * from './epoch-rewards';
export * from './epoch-schedule';
export * from './fees';
export * from './last-restart-slot';
export * from './recent-blockhashes';
export * from './rent';
Expand Down
3 changes: 0 additions & 3 deletions packages/sysvars/src/sysvar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const SYSVAR_EPOCH_REWARDS_ADDRESS =
'SysvarEpochRewards1111111111111111111111111' as Address<'SysvarEpochRewards1111111111111111111111111'>;
export const SYSVAR_EPOCH_SCHEDULE_ADDRESS =
'SysvarEpochSchedu1e111111111111111111111111' as Address<'SysvarEpochSchedu1e111111111111111111111111'>;
export const SYSVAR_FEES_ADDRESS =
'SysvarFees111111111111111111111111111111111' as Address<'SysvarFees111111111111111111111111111111111'>;
export const SYSVAR_INSTRUCTIONS_ADDRESS =
'Sysvar1nstructions1111111111111111111111111' as Address<'Sysvar1nstructions1111111111111111111111111'>;
export const SYSVAR_LAST_RESTART_SLOT_ADDRESS =
Expand All @@ -37,7 +35,6 @@ type SysvarAddress =
| typeof SYSVAR_CLOCK_ADDRESS
| typeof SYSVAR_EPOCH_REWARDS_ADDRESS
| typeof SYSVAR_EPOCH_SCHEDULE_ADDRESS
| typeof SYSVAR_FEES_ADDRESS
| typeof SYSVAR_INSTRUCTIONS_ADDRESS
| typeof SYSVAR_LAST_RESTART_SLOT_ADDRESS
| typeof SYSVAR_RECENT_BLOCKHASHES_ADDRESS
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-latest-validator-release-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(
set -e
version=$(node -e \
'fetch("https://api.github.com/repos/anza-xyz/agave/releases").then(res => res.json().then(rs => rs.filter(r => !r.prerelease && r.tag_name.startsWith("v1.18."))).then(x => console.log(x[0].tag_name)));'
'fetch("https://api.github.com/repos/anza-xyz/agave/releases").then(res => res.json().then(rs => rs.filter(r => !r.prerelease && r.tag_name.startsWith("v2.0."))).then(x => console.log(x[0].tag_name)));'
)
if [ -z $version ]; then
exit 3
Expand Down

0 comments on commit 88a885f

Please sign in to comment.