Skip to content

Commit

Permalink
Test validator installer now sources from version 2.0.x line (#3640)
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher authored Dec 4, 2024
1 parent 29d1e28 commit c880687
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 199 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
```
22 changes: 2 additions & 20 deletions packages/rpc-api/src/__tests__/get-program-accounts-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1083,24 +1083,6 @@ describe('getProgramAccounts', () => {
},
pubkey: 'SysvarEpochSchedu1e111111111111111111111111',
},
{
account: {
data: {
parsed: {
info: expect.any(Object),
type: 'fees',
},
program: 'sysvar',
space: 8n,
},
executable: false,
lamports: 946560n,
owner: 'Sysvar1111111111111111111111111111111111111',
rentEpoch: expect.any(BigInt),
space: 8n,
},
pubkey: 'SysvarFees111111111111111111111111111111111',
},
{
account: {
data: {
Expand Down Expand Up @@ -2063,7 +2045,7 @@ describe('getProgramAccounts', () => {
data: {
parsed: {
info: expect.any(Object),
type: 'fees',
type: 'lastRestartSlot',
},
program: 'sysvar',
space: 8n,
Expand All @@ -2074,7 +2056,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
Loading

0 comments on commit c880687

Please sign in to comment.