5 releases
new 0.1.4 | Feb 5, 2025 |
---|---|
0.1.3 | Feb 4, 2025 |
0.1.2 | Feb 2, 2025 |
0.1.1 | Jan 30, 2025 |
0.1.0 | Jan 29, 2025 |
#137 in Magic Beans
406 downloads per month
Used in surfpool-cli
62KB
1.5K
SLoC
surfpool
TL;DR
surfpool
is to solana what anvil
is to ethereum: a blazing fast in-memory testnet that has the ability to point-fork Solana mainnet instantly.
Design
surfpool
uses the low level solana-svm
API through the excellent wrapper LiteSVM.
This approach provides greater flexibility and significantly faster boot times.
surfpool
is also available as a library on crates.io - facilitating its integration in other projects.
Getting Started
Install surfpool
from crates.io:
$ cargo install surfpool-cli
Start a local validator / simnet:
$ surfpool run
Status
surfpool
is in active development, here are a few todos of what's coming next.
RPC Support
- Support
HTTP Methods
- Priority 1:
- getVersion
- getSlot
- getEpochInfo
- getLatestBlockhash
- sendTransaction
- getAccountInfo
- getMultipleAccounts
- getFeeForMessage
- getSignatureStatuses
- getMinimumBalanceForRentExemption
- getBalance
- simulateTransaction
- getTransaction
- requestAirdrop
- Priority 2:
- getBlock
- getBlockCommitment
- getBlockHeight
- getBlockProduction
- getBlocks
- getBlocksWithLimit
- getBlockTime
- getClusterNodes
- getEpochSchedule
- getFirstAvailableBlock
- getGenesisHash
- getHealth
- getHighestSnapshotSlot
- getIdentity
- getInflationGovernor
- getInflationRate
- getInflationReward
- getLargestAccounts
- getLeaderSchedule
- getMaxRetransmitSlot
- getMaxShredInsertSlot
- getMinimumBalanceForRentExemption
- getProgramAccounts
- getRecentPerformanceSamples
- getRecentPrioritizationFees
- getSignaturesForAddress
- getSlotLeader
- getSlotLeaders
- getStakeMinimumDelegation
- getSupply
- getTokenAccountBalance
- getTokenAccountsByDelegate
- getTokenAccountsByOwner
- getTokenLargestAccounts
- getTokenSupply
- getTransactionCount
- getVoteAccounts
- isBlockhashValid
- minimumLedgerSlot
- Priority 1:
- Support
Websocket Methods
Configurations
- Ability to pull configuration from a
Surfpool.toml
manifest file - Ability to setup slot time (default to
400ms
) - Ability to setup epoch duration (default to
432,000
) - Ability to configure behavior:
- genesis
- point-fork mainnet
- stream-fork mainnet
- Ability to configure the RPC node URL to default to.
Going Further
- Ability to watch and update fetched account
Dependencies
~141MB
~2.5M SLoC