Native Programs(本机程序)

Native Programs

  • [System Program(系统程序)](#System Program(系统程序))
  • [Config Program](#Config Program)
  • [Stake Program](#Stake Program)
  • [Vote Program](#Vote Program)
  • [Address Lookup Table Program](#Address Lookup Table Program)
  • [BPF Loader](#BPF Loader)
  • [Ed25519 Program](#Ed25519 Program)
  • [Secp256k1 Program](#Secp256k1 Program)

Solana contains a small handful of native programs that are part of the validator implementation and provide various core functionalities for the network. You can find the full list of native programs here.

When developing custom programs on Solana, you will commonly interact with two native programs, the System Program and the BPF Loader.

Solana contains a small handful of native programs, which are required to run validator nodes. Unlike third-party programs, the native programs are part of the validator implementation and can be upgraded as part of cluster upgrades. Upgrades may occur to add features, fix bugs, or improve performance. Interface changes to individual instructions should rarely, if ever, occur. Instead, when change is needed, new instructions are added and previous ones are marked deprecated. Apps can upgrade on their own timeline without concern of breakages across upgrades.

For each native program the program id and description each supported instruction is provided. A transaction can mix and match instructions from different programs, as well include instructions from on-chain programs.

System Program(系统程序)

Create new accounts, allocate account data, assign accounts to owning programs, transfer lamports from System Program owned accounts and pay transaction fees.

Program id: 11111111111111111111111111111111

Config Program

Add configuration data to the chain and the list of public keys that are permitted to modify it. Unlike the other programs, the Config program does not define any individual instructions. It has just one implicit instruction, a "store" instruction. Its instruction data is a set of keys that gate access to the account, and the data to store in it.

Program id: Config1111111111111111111111111111111111111

Stake Program

Create and manage accounts representing stake and rewards for delegations to validators.

Program id: Stake11111111111111111111111111111111111111

Vote Program

Create and manage accounts that track validator voting state and rewards.

Program id: Stake11111111111111111111111111111111111111

Address Lookup Table Program

Program id: AddressLookupTab1e1111111111111111111111111

BPF Loader

Deploys, upgrades, and executes programs on the chain.

Program id: BPFLoaderUpgradeab1e11111111111111111111111

The BPF Upgradeable Loader marks itself as "owner" of the executable and program-data accounts it creates to store your program. When a user invokes an instruction via a program id, the Solana runtime will load both your the program and its owner, the BPF Upgradeable Loader. The runtime then passes your program to the BPF Upgradeable Loader to process the instruction.

Ed25519 Program

Verify ed25519 signature program. This program takes an ed25519 signature, public key, and message. Multiple signatures can be verified. If any of the signatures fail to verify, an error is returned.

Program id: Ed25519SigVerify111111111111111111111111111

The ed25519 program processes an instruction. The first u8 is a count of the number of signatures to check, which is followed by a single byte padding. After that, the following struct is serialized, one for each signature to check.

Secp256k1 Program

Verify secp256k1 public key recovery operations (ecrecover).

Program id: KeccakSecp256k11111111111111111111111111111

相关推荐
The_Ticker9 小时前
日股实时行情接口使用指南
java·经验分享·笔记·python·算法·区块链
三秋树9 小时前
从 Solv Protocol 273 万美元被黑事件,深入理解 Solidity 自重入攻击 —— ERC-3525 标准中的暗坑
区块链
MicroTech20259 小时前
微算法科技(NASDAQ: MLGO)探索量子隐形传态区块链隐私保护签名技术,增强Web 3.0元宇宙环境的效率、安全性和真实性
科技·区块链
草原猫9 小时前
公链开发:从技术筑基到生态共生,重构数字信任基础设施
重构·区块链
小白的代码日记9 小时前
区块链分叉检测与回扫系统(Go语言)
人工智能·golang·区块链
Blockchina10 小时前
Web3项目开发全流程详解:从0到1搭建DApp架构(实战版)
架构·web3·区块链·perp dex
Blockchina1 天前
Web3金融革命:PerpDEX的深度解析
金融·web3·区块链·perp dex·永续去中心化交易所
Joy T1 天前
【Web3】Solidity收款合约初探与去中心化预言机(Chainlink)机制解析
web3·去中心化·区块链·预言机·chainlink·don·datafeed
fuzamei8882 天前
【市场观察】黄金、白银等金属回归“真实资产”,区块链价值的时代也在路上
区块链
CryptoPP2 天前
开发者指南:构建实时期货黄金数据监控系统
大数据·数据结构·笔记·金融·区块链