Parallel Universe
  • Learn
    • Introduction to PUT
    • Getting started with PUT
  • Architecture
    • What is a PUT Cluster?
    • Clusters
      • PUT Clusters
      • RPC Endpoints
      • Benchmark a Cluster
      • Performance Metrics
    • Consensus
      • Synchronization
      • Leader Rotation
      • Fork Generation
      • Managing Forks
      • Turbine Block Propagation
      • Commitment Status
      • Secure Vote Signing
      • Stake Delegation and Rewards
    • Validators
      • Overview
      • TPU
      • TVU
      • Blockstore
      • Gossip Service
      • The Runtime
  • CLI
    • Command-line Guide
    • Install the PUT Tool Suite
    • Command-line Wallets
      • Command Line Wallets
      • Paper Wallet
      • File System Wallet
      • Support / Troubleshooting
    • Using PUT CLI
    • Connecting to a Cluster
    • Send and Receive Tokens
    • Staking
    • Deploy a Program
    • Offline Transaction Signing
    • Durable Transaction Nonces
    • CLI Usage Reference
  • Developers
    • Get Started
      • Hello World
      • Local development
      • Rust program
    • Core Concepts
      • Accounts
      • Transactions
        • Overview
        • Versioned Transactions
        • Address Lookup Tables
      • Programs
      • Rent
      • Calling between programs
      • Runtime
    • Clients
      • JSON RPC API -1
      • JSON RPC API -2
      • JSON RPC API -3
      • Web3 JavaScript API
      • Web3 API Reference
      • Rust API
    • Writing Programs
      • Overview
      • Developing with Rust
      • Deploying
      • Debugging
      • Program Examples
      • FAQ
    • Native Programs
      • Overview
      • Sysvar Cluster Data
    • Local Development
      • PUT Test Validator
    • Backward Compatibility Policy
  • Validators
    • Running a Validator
    • Getting Started
      • Validator Requirements
    • Voting Setup
      • Starting a Validator
      • Vote Account Management
      • Staking
      • Monitoring a Validator
      • Publishing Validator Info
      • Failover Setup
      • Troubleshooting
    • Geyser
      • Geyser Plugins
  • Staking
    • Staking on PUT
    • Stake Account Structure
  • Integrations
    • Add PUT to Your Exchange
    • Retrying Transactions
  • Library
    • Introduction
    • Token Program
    • Associated Token Account Program
    • Memo Program
    • Name Service
    • Feature Proposal Program
    • NFT Program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a new NFT-Mint
        • Cast NFT
        • Transfer an NFT
        • Change account status
        • Permission settings
        • Query Interface
        • Continuous casting
        • Change the Mint attribute
      • Operation Overview
        • Create a new NFT-Mint
        • Transfer NFT
        • Destroy
        • Freeze NFT accounts
        • Update
    • PUT multi-sign program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a multi-signature account
        • Create a proposal account
        • Vote proposal
        • Verify Proposal
        • Add-singer
        • Remove-signer
      • Operation Overview
        • Create a multi-signature account
        • Create a proposal account
        • Vote
        • Verify
        • Add-singer
        • Remove-signer
  • PUT Privacy Policy
Powered by GitBook
On this page
  • What are PUT Programs?
  • Key points
  • Types of programs
  • On chain programs
  • Native programs
  • Executable
  • Upgradable
  1. Developers
  2. Core Concepts

Programs

What are PUT Programs?

PUT Programs, often referred to as "smart contracts" on other blockchains, are the executable code that interprets the instructions sent inside of each transaction on the blockchain.

They can be deployed directly into the core of the network as Native Programs, or published by anyone as On Chain Programs.

Programs are the core building blocks of the network and handle everything from sending tokens between wallets, to accepting votes of a DAOs, to tracking ownership of NFTs.

Both types of programs run on top of the Sealevel runtime, which is PUT's parallel processing model that helps to enable the high transactions speeds of the blockchain.

Key points

  • Programs are essentially special type of Accounts that is marked as "executable"

  • Programs can own other Accounts

  • Programs can only change the data or debit accounts they own

  • Any program can read or credit another account

  • Programs are considered stateless since the primary data stored in a program account is the compiled BPF code

  • Programs can be upgraded by their owner (see more on that below)

Types of programs

The PUT blockchain has two types of programs:

  • Native programs

  • On chain programs

On chain programs

These user written programs, often referred to as "smart contracts" on other blockchains, are deployed directly to the blockchain for anyone to interact with and execute. Hence the name "on chain"!

In effect, "on chain programs" are any program that is not baked directly into the PUT cluster's core code (like the native programs discussed below).

And even thoughput Labs maintains a small subset of these on chain programs (collectively known as the PUT Program Library), anyone can create or publish one.

On chain programs can also be updated directly on the blockchain by the respective program's Account owner.

Native programs

Native programs are programs that are built directly into the core of the PUT blockchain.

Similar to other "on chain" programs in PUT, native programs can be called by any other program/user. However, they can only be upgraded as part of the core blockchain and cluster updates.

These native program upgrades are controlled via the releases to the different clusters.

Examples of native programs include:

  • System Program: Create new accounts, transfer tokens, and more

  • BPF Loader Program: Deploys, upgrades, and executes programs on chain

  • Vote program: Create and manage accounts that track validator voting state and rewards.

Executable

When a PUT program is deployed onto the network, it is marked as "executable" by the BPF Loader Program.

This allows the PUT runtime to efficiently and properly execute the compiled program code.

Upgradable

Unlike other blockchains, PUT programs can be upgraded after they are deployed to the network.

Native programs can only be upgraded as part of cluster updates when new software releases are made.

On chain programs can be upgraded by the account that is marked as the "Upgrade Authority", which is usually the PUT account/address that deployed the program to begin with.

PreviousAddress Lookup TablesNextRent

Last updated 2 years ago