Skip to content

Commit c880687

Browse files
authored
Test validator installer now sources from version 2.0.x line (#3640)
1 parent 29d1e28 commit c880687

File tree

13 files changed

+29
-199
lines changed

13 files changed

+29
-199
lines changed

.changeset/wicked-bikes-pay.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@solana/sysvars': minor
3+
---
4+
5+
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
6+
7+
```
8+
% solana feature status JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG
9+
Feature | Status | Activation Slot | Description
10+
JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG | active since epoch 483 | 208656004 | disable fees sysvar
11+
```

packages/rpc-api/src/__tests__/get-program-accounts-test.ts

+2-20
Original file line numberDiff line numberDiff line change
@@ -1083,24 +1083,6 @@ describe('getProgramAccounts', () => {
10831083
},
10841084
pubkey: 'SysvarEpochSchedu1e111111111111111111111111',
10851085
},
1086-
{
1087-
account: {
1088-
data: {
1089-
parsed: {
1090-
info: expect.any(Object),
1091-
type: 'fees',
1092-
},
1093-
program: 'sysvar',
1094-
space: 8n,
1095-
},
1096-
executable: false,
1097-
lamports: 946560n,
1098-
owner: 'Sysvar1111111111111111111111111111111111111',
1099-
rentEpoch: expect.any(BigInt),
1100-
space: 8n,
1101-
},
1102-
pubkey: 'SysvarFees111111111111111111111111111111111',
1103-
},
11041086
{
11051087
account: {
11061088
data: {
@@ -2063,7 +2045,7 @@ describe('getProgramAccounts', () => {
20632045
data: {
20642046
parsed: {
20652047
info: expect.any(Object),
2066-
type: 'fees',
2048+
type: 'lastRestartSlot',
20672049
},
20682050
program: 'sysvar',
20692051
space: 8n,
@@ -2074,7 +2056,7 @@ describe('getProgramAccounts', () => {
20742056
rentEpoch: expect.any(BigInt),
20752057
space: 8n,
20762058
},
2077-
pubkey: 'SysvarFees111111111111111111111111111111111',
2059+
pubkey: 'SysvarLastRestartS1ot1111111111111111111111',
20782060
},
20792061
{
20802062
account: {

packages/rpc-api/src/__tests__/simulate-transaction-test.ts

+15
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ describe('simulateTransaction', () => {
174174
err: null,
175175
innerInstructions: null,
176176
logs: expect.any(Array),
177+
replacementBlockhash: null,
177178
returnData: null,
178179
unitsConsumed: expect.any(BigInt),
179180
},
@@ -284,6 +285,7 @@ describe('simulateTransaction', () => {
284285
err: null,
285286
innerInstructions: null,
286287
logs: expect.any(Array),
288+
replacementBlockhash: null,
287289
returnData: null,
288290
unitsConsumed: expect.any(BigInt),
289291
},
@@ -323,6 +325,7 @@ describe('simulateTransaction', () => {
323325
err: 'BlockhashNotFound',
324326
innerInstructions: null,
325327
logs: expect.any(Array),
328+
replacementBlockhash: null,
326329
returnData: null,
327330
unitsConsumed: expect.any(BigInt),
328331
},
@@ -362,6 +365,10 @@ describe('simulateTransaction', () => {
362365
err: null,
363366
innerInstructions: null,
364367
logs: expect.any(Array),
368+
replacementBlockhash: {
369+
blockhash: expect.any(String),
370+
lastValidBlockHeight: expect.any(BigInt),
371+
},
365372
returnData: null,
366373
unitsConsumed: expect.any(BigInt),
367374
},
@@ -464,6 +471,7 @@ describe('simulateTransaction', () => {
464471
err: 'AccountNotFound',
465472
innerInstructions: null,
466473
logs: expect.any(Array),
474+
replacementBlockhash: null,
467475
returnData: null,
468476
unitsConsumed: expect.any(BigInt),
469477
},
@@ -513,6 +521,7 @@ describe('simulateTransaction', () => {
513521
err: null,
514522
innerInstructions: null,
515523
logs: expect.any(Array),
524+
replacementBlockhash: null,
516525
returnData: null,
517526
unitsConsumed: expect.any(BigInt),
518527
},
@@ -562,6 +571,7 @@ describe('simulateTransaction', () => {
562571
err: null,
563572
innerInstructions: null,
564573
logs: expect.any(Array),
574+
replacementBlockhash: null,
565575
returnData: null,
566576
unitsConsumed: expect.any(BigInt),
567577
},
@@ -628,6 +638,7 @@ describe('simulateTransaction', () => {
628638
err: null,
629639
innerInstructions: null,
630640
logs: expect.any(Array),
641+
replacementBlockhash: null,
631642
returnData: null,
632643
unitsConsumed: expect.any(BigInt),
633644
},
@@ -678,6 +689,7 @@ describe('simulateTransaction', () => {
678689
err: null,
679690
innerInstructions: null,
680691
logs: expect.any(Array),
692+
replacementBlockhash: null,
681693
returnData: null,
682694
unitsConsumed: expect.any(BigInt),
683695
},
@@ -727,6 +739,7 @@ describe('simulateTransaction', () => {
727739
innerInstructions: null,
728740

729741
logs: expect.any(Array),
742+
replacementBlockhash: null,
730743
returnData: null,
731744
unitsConsumed: expect.any(BigInt),
732745
},
@@ -781,6 +794,7 @@ describe('simulateTransaction', () => {
781794
err: null,
782795
innerInstructions: null,
783796
logs: expect.any(Array),
797+
replacementBlockhash: null,
784798
returnData: null,
785799
unitsConsumed: expect.any(BigInt),
786800
},
@@ -821,6 +835,7 @@ describe('simulateTransaction', () => {
821835
err: null,
822836
innerInstructions: null,
823837
logs: expect.any(Array),
838+
replacementBlockhash: null,
824839
returnData: null,
825840
unitsConsumed: expect.any(BigInt),
826841
},

packages/rpc-graphql/src/__tests__/account-test.ts

-41
Original file line numberDiff line numberDiff line change
@@ -994,47 +994,6 @@ describe('account', () => {
994994
},
995995
});
996996
});
997-
it('can get the fees sysvar', async () => {
998-
expect.assertions(1);
999-
const variableValues = {
1000-
address: 'SysvarFees111111111111111111111111111111111',
1001-
};
1002-
const source = /* GraphQL */ `
1003-
query testQuery($address: Address!) {
1004-
account(address: $address) {
1005-
address
1006-
lamports
1007-
ownerProgram {
1008-
address
1009-
}
1010-
rentEpoch
1011-
space
1012-
... on SysvarFeesAccount {
1013-
feeCalculator {
1014-
lamportsPerSignature
1015-
}
1016-
}
1017-
}
1018-
}
1019-
`;
1020-
const result = await rpcGraphQL.query(source, variableValues);
1021-
expect(result).toMatchObject({
1022-
data: {
1023-
account: {
1024-
address: 'SysvarFees111111111111111111111111111111111',
1025-
feeCalculator: {
1026-
lamportsPerSignature: expect.any(BigInt),
1027-
},
1028-
lamports: expect.any(BigInt),
1029-
ownerProgram: {
1030-
address: 'Sysvar1111111111111111111111111111111111111',
1031-
},
1032-
rentEpoch: expect.any(BigInt),
1033-
space: expect.any(BigInt),
1034-
},
1035-
},
1036-
});
1037-
});
1038997
it('can get the last restart slot sysvar', async () => {
1039998
expect.assertions(1);
1040999
const variableValues = {

packages/rpc-graphql/src/schema/type-defs/account.ts

-14
Original file line numberDiff line numberDiff line change
@@ -470,20 +470,6 @@ export const accountTypeDefs = /* GraphQL */ `
470470
lamportsPerSignature: Lamports
471471
}
472472
473-
"""
474-
Sysvar Fees
475-
"""
476-
type SysvarFeesAccount implements Account {
477-
address: Address
478-
data(encoding: AccountEncoding!, dataSlice: DataSlice): String
479-
executable: Boolean
480-
lamports: Lamports
481-
ownerProgram: Account
482-
space: BigInt
483-
rentEpoch: Epoch
484-
feeCalculator: FeeCalculator
485-
}
486-
487473
"""
488474
Sysvar Last Restart Slot
489475
"""

packages/rpc-graphql/src/schema/type-resolvers/account.ts

-7
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ export const accountTypeResolvers = {
147147
if (jsonParsedConfigs.accountType === 'epochSchedule') {
148148
return 'SysvarEpochScheduleAccount';
149149
}
150-
if (jsonParsedConfigs.accountType === 'fees') {
151-
return 'SysvarFeesAccount';
152-
}
153150
if (jsonParsedConfigs.accountType === 'lastRestartSlot') {
154151
return 'SysvarLastRestartSlotAccount';
155152
}
@@ -271,10 +268,6 @@ export const accountTypeResolvers = {
271268
data: resolveAccountData(),
272269
ownerProgram: resolveAccount('ownerProgram'),
273270
},
274-
SysvarFeesAccount: {
275-
data: resolveAccountData(),
276-
ownerProgram: resolveAccount('ownerProgram'),
277-
},
278271
SysvarLastRestartSlotAccount: {
279272
data: resolveAccountData(),
280273
ownerProgram: resolveAccount('ownerProgram'),

packages/sysvars/src/__tests__/fees-test.ts

-29
This file was deleted.

packages/sysvars/src/__tests__/sysvar-test.ts

-17
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
fetchJsonParsedSysvarAccount,
77
SYSVAR_CLOCK_ADDRESS,
88
SYSVAR_EPOCH_SCHEDULE_ADDRESS,
9-
SYSVAR_FEES_ADDRESS,
109
SYSVAR_LAST_RESTART_SLOT_ADDRESS,
1110
SYSVAR_RECENT_BLOCKHASHES_ADDRESS,
1211
SYSVAR_RENT_ADDRESS,
@@ -77,22 +76,6 @@ describe('sysvar account', () => {
7776
});
7877
});
7978
});
80-
describe('fees', () => {
81-
it('fetch encoded', async () => {
82-
expect.assertions(3);
83-
await assertValidEncodedSysvarAccount(SYSVAR_FEES_ADDRESS);
84-
});
85-
it('fetch JSON-parsed', async () => {
86-
expect.assertions(3);
87-
await assertValidJsonParsedSysvarAccount(SYSVAR_FEES_ADDRESS, {
88-
data: {
89-
feeCalculator: {
90-
lamportsPerSignature: expect.any(String), // JsonParsed converts to string
91-
},
92-
},
93-
});
94-
});
95-
});
9679
// `Instructions` does not exist on-chain.
9780
describe('last restart slot', () => {
9881
it('fetch encoded', async () => {

packages/sysvars/src/__typetests__/sysvar-typetest.ts

-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type { JsonParsedSysvarAccount } from '@solana/rpc-parsed-types';
66
import { fetchSysvarClock, type SysvarClock } from '../clock';
77
import { fetchSysvarEpochRewards, type SysvarEpochRewards } from '../epoch-rewards';
88
import { fetchSysvarEpochSchedule, type SysvarEpochSchedule } from '../epoch-schedule';
9-
import { fetchSysvarFees, type SysvarFees } from '../fees';
109
import { fetchSysvarLastRestartSlot, type SysvarLastRestartSlot } from '../last-restart-slot';
1110
import { fetchSysvarRecentBlockhashes, type SysvarRecentBlockhashes } from '../recent-blockhashes';
1211
import { fetchSysvarRent, type SysvarRent } from '../rent';
@@ -79,14 +78,6 @@ const rpc = null as unknown as Parameters<typeof fetchEncodedSysvarAccount>[0];
7978
fetchSysvarEpochSchedule(rpc) satisfies Promise<{ foo: string }>;
8079
}
8180

82-
// `fetchSysvarFees`
83-
{
84-
// Returns a `SysvarFees`.
85-
fetchSysvarFees(rpc) satisfies Promise<SysvarFees>;
86-
// @ts-expect-error Returns a `SysvarFees`.
87-
fetchSysvarFees(rpc) satisfies Promise<{ foo: string }>;
88-
}
89-
9081
// `fetchSysvarLastRestartSlot`
9182
{
9283
// Returns a `SysvarLastRestartSlot`.

packages/sysvars/src/fees.ts

-57
This file was deleted.

packages/sysvars/src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export * from './clock';
22
export * from './epoch-rewards';
33
export * from './epoch-schedule';
4-
export * from './fees';
54
export * from './last-restart-slot';
65
export * from './recent-blockhashes';
76
export * from './rent';

0 commit comments

Comments
 (0)