Melvin's digital garden

Solana

Supports rust and C/C++, compiles to eBPF and runs with rbpf

  • downtime due to bugs in the single validator

Jump Crypto building second validator, Firedancer

State is stored in accounts. When transfering tokens to a new wallet an associated token account is created to hold the balance. The rent required is provider by the sender.

realloc can resize an account up to 10KB.

./solana-keygen pubkey ‘prompt://?key=0/0’ to derive the pubkey from seed phrase use 0/0 for first wallet, 1/0 for second wallet, etc

finality

  • at most one block per slot
  • one slot per 400ms
  • “roughly 5% of blocks don’t end up being finalized by the cluster”
  • processed -> confirmed -> finalized
  • confirmed is few slots behind processed, low chance of belonging to a dropped fork
  • finalized is about 32 slot behind confirmed block

Supply of tokens is u64

RPC calls

  • getMultipleAccounts

ALT is address lookup table. Previously capped at 32 addresses per txn, with ALT that limit is raised to 256.

At most 12M CUs worth of txn writing to any account, out of 48M CU per block.

RPC nodes simulates a transaction during preflight checks, on failure an error is returned and txn is not broadcasted to validators.

Swap from BONK/USDC to native SOL without paying gas

Close associated token accounts and recover rent in SOL

https://rugcheck.xyz/

Solana Bootcamp

Resources

Lots of failed txn on chain due to txn spamming

  • paying higher fee doesn’t guarantee landing in the block due to continuous block building
  • jito does discrete block building

Accuring value to the protocol/users instead of validators/bots

  • instead of fixed liquidation fee of x% of loan, pay fees that depends on how far it falls below threshold
  • probabilistic sandwiching of user txns
  • backrunning by bots to equalize all the pools

Heap defaults to 32kb

Links to this note