Skip to content

​Clock Semantics

Timestamps are milliseconds; the clock reports secondssurfnet_timeTravel’s absoluteTimestamp is in milliseconds, like JavaScript’s Date.now(), but the Clock sysvar that programs read reports seconds. Passing a value straight from the clock back into the cheatcode lands in early 1970 — and since the clock only moves forward, the call is rejected rather than ignored. Multiply by 1000 first.
For the SDK-level equivalents of the clock cheatcodes, see Time Travel. Powerful testing utilities unique to Surfpool that allow you to directly modify account and token states. These methods are only available on Surfnet.

​surfnet_setAccount

Sets or updates an account’s properties including lamports, data, owner, and executable status. Parameters
​pubkey
string
required
The public key of the account to update, as a base-58 encoded string. This identifies which account will be modified.
​update
object
required
The account data to update. Contains the new values for lamports, owner, executable status, rent epoch, and data.
Result
​context
object
​value
null
Request
Response

​surfnet_setTokenAccount

Sets or updates a token account’s properties including balance, delegate, state, and authorities. Parameters
​owner
string
required
The public key of the token account owner, as a base-58 encoded string. This is the wallet that owns the token account.
​mint
string
required
The public key of the token mint, as a base-58 encoded string. This identifies the specific token type (e.g., USDC, SOL).
​update
object
required
The token account data to update. Contains new values for balance, delegate, state, and authorities.
​tokenProgram
string
The token program ID, as a base-58 encoded string. Defaults to SPL Token program if not specified.
Result
​context
object
​value
null
Request
Response

​surfnet_cloneProgramAccount

Clones a program account from one program ID to another, including its associated program data. Parameters
​sourceProgramId
string
required
The public key of the source program to clone, as a base-58 encoded string.
​destinationProgramId
string
required
The public key of the destination program, as a base-58 encoded string.
Result
​context
object
​value
null
Request
Response

​surfnet_profileTransaction

Profiles a transaction to analyze compute units, account changes, and execution details. Parameters
​transactionData
string
required
The transaction data to profile, as a base-64 encoded string. This should be a serialized VersionedTransaction.
​tag
string
An optional tag to identify the profiling results. Useful for grouping related transaction profiles.
​config
object
Configuration for the profile result, including encoding format and profiling depth.
Result
​context
object
​value
object
Request
Response

​surfnet_getProfileResultsByTag

Retrieves all profiling results for transactions tagged with a specific identifier. Parameters
​tag
string
required
The tag to retrieve profiling results for. Returns all transaction profiles that were tagged with this identifier.
​config
object
Configuration for the profile result, including encoding format and profiling depth.
Result
​context
object
​value
array<ProfileResultSchema>
Request
Response

​surfnet_setSupply

Configures the network supply information including total, circulating, and non-circulating amounts. Parameters
​update
object
required
The supply data to update. Contains new values for total, circulating, and non-circulating SOL amounts.
Result
​context
object
​value
null
Request
Response

​surfnet_setProgramAuthority

Sets or removes the upgrade authority for a program’s ProgramData account. Parameters
​programId
string
required
The public key of the program, as a base-58 encoded string. This is the program whose upgrade authority will be modified.
​newAuthority
string
The public key of the new authority, as a base-58 encoded string. If omitted, the program will have no upgrade authority (immutable).
Result
​context
object
​value
null
Request
Response

​surfnet_getTransactionProfile

Retrieves the detailed profile of a specific transaction by signature or UUID. The sample signature belongs to a transfer that was processed by a Surfnet earlier. The result is null for a signature this Surfnet has not processed. Parameters
​signatureOrUuid
object
required
The transaction signature (as a base-58 string) or a UUID (as a string) for which to retrieve the profile. This identifies the specific transaction to analyze. Provide exactly one of the fields below.
​config
object
Configuration for the profile result, including encoding format and profiling depth.
Result
​context
object
​value
object
Request
Response

​surfnet_registerIdl

Registers an IDL (Interface Definition Language) for a program to enable account data parsing. Parameters
​idl
object
required
The full IDL object to be registered in memory. The address field should match the program’s public key. This enables account data parsing for the program.
​slot
integer
The slot at which to register the IDL. If omitted, uses the latest slot. This determines when the IDL becomes active for account parsing.
Result
​context
object
​value
null
Request
Response

​surfnet_getActiveIdl

Retrieves the registered IDL for a specific program ID at a given slot. Empty IDL collections (accounts, types, events, errors, constants) are omitted from the returned IDL. The value is null when no IDL is registered for the program. Parameters
​programId
string
required
The public key of the program whose IDL is being requested, as a base-58 encoded string. This identifies which program’s IDL to retrieve.
​slot
integer
The slot at which to query the IDL. If omitted, the latest slot will be used. This determines which version of the IDL to return.
Result
​context
object
​value
object
Request
Response

​surfnet_getLocalSignatures

Retrieves the most recent transaction signatures from the local network. Parameters
​limit
integer
The maximum number of signatures to return. Defaults to 50 if not specified. Returns the most recent signatures first.
Result
​context
object
​value
array<RpcLogsResponse>
Request
Response

​surfnet_timeTravel

Moves the local network’s clock forward to an absolute epoch, slot, or timestamp, and returns the epoch info after the jump. Omit config to jump to one hour past the current wall-clock time (not one hour past the Surfnet clock): this fails with Cannot travel to past timestamp if the Surfnet clock is already ahead of that. The clock only moves forward: a target in the past is rejected with an error. The sample jumps to epoch 1500, which is in the future for the current mainnet epoch. Use surfnet_resetNetwork to return to the datasource clock. Parameters
​config
object
Configuration specifying how to modify the clock. Can move to a specific epoch, slot, or timestamp. Provide exactly one of the fields below.
Result
​absoluteSlot
integer
Absolute root slot
​blockHeight
integer
Block height
​epoch
integer
Current epoch
​slotIndex
integer
Current slot index within the epoch
​slotsInEpoch
integer
Total number of slots in the epoch
​transactionCount
integer
Current transaction count
Request
Response

​surfnet_pauseClock

Freezes the local network’s clock. Slot production and time progression halt until surfnet_resumeClock is called. Returns the epoch info at the moment of the pause; it carries no timestamp, and the paused state is not reported by any other method. For the simulated unix time, call getAccountInfo on SysvarC1ock11111111111111111111111111111111 with jsonParsed encoding. Result
​absoluteSlot
integer
Absolute root slot
​blockHeight
integer
Block height
​epoch
integer
Current epoch
​slotIndex
integer
Current slot index within the epoch
​slotsInEpoch
integer
Total number of slots in the epoch
​transactionCount
integer
Current transaction count
Request
Response

​surfnet_resumeClock

Resumes the local network’s clock progression after a pause, restarting slot production. Returns the epoch info after resuming. Result
​absoluteSlot
integer
Absolute root slot
​blockHeight
integer
Block height
​epoch
integer
Current epoch
​slotIndex
integer
Current slot index within the epoch
​slotsInEpoch
integer
Total number of slots in the epoch
​transactionCount
integer
Current transaction count
Request
Response

​surfnet_resetAccount

Resets an account on the local network to its original state from the remote datasource. Parameters
​pubkey
string
required
The base-58 encoded public key of the account to reset.
​config
object
Configuration for the reset operation.
Result
​context
object
​value
null
Request
Response

​surfnet_exportSnapshot

Exports a snapshot of all accounts in the Surfnet SVM. The result maps each account address to its account data; only the first entries are shown. Parameters
​config
object
Configuration for the export operation.
Result
​context
object
​value
object
Map of account public keys to their snapshots
Request
Response

​surfnet_streamAccount

Registers an account for streaming, downloading it from the datasource every time rather than caching it in the SVM. Parameters
​pubkey
string
required
The base-58 encoded public key of the account to stream.
​config
object
Configuration for the stream operation.
Result
​context
object
​value
null
Request
Response

​surfnet_streamAccounts

Registers multiple accounts for streaming from the datasource in a single batch call. See also surfnet_streamAccount. Parameters
​accounts
array[StreamAccountsEntry]
required
List of accounts to register for streaming. Each entry specifies a pubkey and an optional flag to also stream accounts it owns.
Result
​context
object
​value
null
Request
Response

​surfnet_offlineAccount

Prevents an account (and optionally accounts it owns) from being downloaded from the remote RPC. See also surfnet_streamAccount. Parameters
​pubkey
string
required
The base-58 encoded public key of the account or program to mark offline.
​config
object
Configuration for the offline operation.
Result
​context
object
​value
null
Request
Response

​surfnet_writeProgram

Writes program data at a specified offset, allowing deployment of large programs by sending data in chunks. Parameters
​programId
string
required
The public key of the program account, as a base-58 encoded string.
​data
string
required
Hex-encoded program data chunk to write, without a 0x prefix.
​offset
integer
required
The byte offset at which to write this data chunk.
​authority
string
The base-58 encoded public key of the authority allowed to write to the program. Defaults to the system program if omitted.
Result
​context
object
​value
null
Request
Response

​surfnet_registerScenario

Registers a scenario with account overrides for testing different network states. Parameters
​scenario
object
required
The scenario object containing overrides.
​slot
integer
The base slot from which relative slot offsets are calculated. If omitted, uses the current slot.
Result
​context
object
​value
null
Request
Response

​surfnet_enableCheatcode

Re-enables one or more previously disabled Surfpool cheatcode RPC methods for the current session. See also surfnet_disableCheatcode. Parameters
​cheatcodesFilter
"all" | array
required
Which cheatcodes to enable: either the string “all” or an explicit list of method names.
Result
​context
object
​value
null
Request
Response

​surfnet_disableCheatcode

Disables one or more Surfpool cheatcode RPC methods for the current session. Without lockout=true, surfnet_enableCheatcode and surfnet_disableCheatcode themselves cannot be disabled. See also surfnet_enableCheatcode. Parameters
​cheatcodesFilter
"all" | array
required
Which cheatcodes to disable: either the string “all” or an explicit list of method names.
​config
object
Optional control config. When lockout is true, surfnet_enableCheatcode and surfnet_disableCheatcode may themselves be disabled.
Result
​context
object
​value
null
Request
Response

​surfnet_resetNetwork

Resets the entire network to its initial state Result
​context
object
​value
null
Request
Response

​surfnet_getStreamedAccounts

Retrieves the list of accounts registered for streaming Result
​context
object
​value
object
Request
Response

​surfnet_getSurfnetInfo

Retrieves Surfnet network information Result
​context
object
​value
object
Request
Response