Documentation
¶
Overview ¶
Package helloworldv1 is the Go-side orchestrator for the helloworldv1 bot mode.
It implements the brain.Brain interface and is responsible for:
- Allocating a slot on a Catscope/Solpipe validator pipeline (bid = 0, free tier).
- Uploading a WASM bot image to the validator with MODE=helloworldv1.
- Completing the handshake with the running bot instance.
- Sending the child trading keypair to the bot via stdin so the bot can sign transactions independently.
- Reading LatencyReportV1 structs from the bot's stdout and writing them to a CSV-style latency log file for offline analysis.
This brain performs no live trading; the wallet-funding logic in Evaluate is disabled (if false). Its primary purpose is to verify the full Go↔WASM communication pipeline and measure validator-side latency.
Index ¶
- Constants
- Variables
- func Create(ctx context.Context, cancel context.CancelCauseFunc, parentKey sgo.PrivateKey, ...) (brain.Brain, error)
- func DoAddressLookupTable(key sgo.PublicKey, accounts []sgo.PublicKey) catmsg.FixedPair
- func DoEchoRequest(payload string) catmsg.FixedPair
- func DoWallet(key sgo.PrivateKey) catmsg.FixedPair
- type Configuration
- type LatencyReportV1
- type TxLatency
Constants ¶
View Source
const ( BudgetChildSOL graph.Lamports = sgo.LAMPORTS_PER_SOL >> 5 BudgetChildTxFeeSOL graph.Lamports = sgo.LAMPORTS_PER_SOL >> 6 )
Variables ¶
View Source
var ( MintUSDC = sgo.MustPublicKeyFromBase58("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v") MintSOL = sgo.WrappedSol )
Functions ¶
func Create ¶
func Create(ctx context.Context, cancel context.CancelCauseFunc, parentKey sgo.PrivateKey, config *Configuration) (brain.Brain, error)
Create creates a helloworld gRPC event hook.
func DoAddressLookupTable ¶ added in v0.4.14
DoAddressLookupTable sends an ALT to the bot. value layout: key(32) | n_accounts(u16 LE) | accounts(n×32)
func DoWallet ¶
func DoWallet(key sgo.PrivateKey) catmsg.FixedPair
Types ¶
type LatencyReportV1 ¶ added in v0.4.12
type LatencyReportV1 struct {
ProcessedDiff time.Duration `json:"processed_diff"`
RootDiff time.Duration `json:"commit_diff"`
AccountProcessed uint64 `json:"account_processed"`
AccountRoot uint64 `json:"account_root"`
TxProcessedFilter uint64 `json:"tx_processed_filter"`
TxProcessed uint64 `json:"tx_processed"`
TxN uint64 `json:"tx_n"`
TxP50Us uint64 `json:"tx_p50_us"`
TxP99Us uint64 `json:"tx_p99_us"`
}
func (*LatencyReportV1) Parse ¶ added in v0.4.12
func (r *LatencyReportV1) Parse(value []byte) (int, error)
func (*LatencyReportV1) String ¶ added in v0.4.12
func (r *LatencyReportV1) String() string
Source Files
¶
- eval.go
- helloworldv1.go
- instance.go
- message.go
- state.go
Click to show internal directories.
Click to hide internal directories.