Feedback
Sign in./start

Site navigation

Theme

Learn

  • Roadmaps

Build

  • Projects
  • Developer Tools

Contribute

  • Open Source Projects
  • Issues
  • Reviews
  • First Contribution
  • BountiesSoon
  • Feedback

Prove

  • Builders

Ecosystem

  • Partners
  • Get Funded↗
  • HackathonsSoon
Sign in./start-building

Become an Open Source Builder. Learn. Build. Contribute. Prove.

Feedback welcome — open a GitHub issue.

Learn

RoadmapsStart Building

Build

ProjectsDeveloper Tools

Contribute

Open Source ProjectsIssuesReviewsFirst ContributionSupportFeedback

Prove

Builders Directory

Account

Sign in

Legal

PrivacyTermsCredits

© 2026 Pull // code MIT · curriculum CC BY-SA 4.0

PrivacyTermsCredits

lesson // bitcoin

Bitcoin Core & RPC

Operate bitcoind and drive wallets, chain queries, and tests over RPC.

intermediate5 days

Public lesson — sign in to track progress on this roadmap.

./sign-in

On this page

Learning objectives

  • Configure bitcoind safely for development
  • Use JSON-RPC for wallet and chain operations
  • Separate RPC auth from public interfaces

study // plan

Lessons are primers. Start with Step 1 (required reading) when present, then follow the numbered steps in the article. Depth comes from primary sources, labs, reflection, and evidence.

Research on Bitcoin Search
bitcoindBitcoin Core RPCJSON-RPCbitcoin-cli

Step 1 // Required reading

Complete these before the numbered steps in the lesson body. Links are listed here once — not repeated below.

  • bookMastering Bitcoin

    Ch. 3: Bitcoin Core

Reflection prompts

  1. Explain Bitcoin Core & RPC to a teammate without jargon - what problem does it solve?
  2. What would break in production if you misunderstood Bitcoin Core & RPC?
  3. Which BIP, book chapter, or Core doc is authoritative here, and what did you verify?

Lab // Wallet + chain RPC checklist

Complete Steps 2–3. On regtest, confirm getblockchaininfo, create or load a dedicated lab wallet, fund an address with generatetoaddress, and note how RPC auth is configured (cookie vs user/pass).

evidence required

  • ·getblockchaininfo excerpt (chain = regtest)
  • ·createwallet / getnewaddress / generatetoaddress output
  • ·One sentence on how you authenticate RPC (and that it is not public)
  • ·Link to Mastering Bitcoin Ch. 3 section you used
  1. 01

    Worked mental model

    Re-read the diagrams in this lesson once out loud in plain language. If you cannot explain the flow to a friend without jargon, pause and revisit the Mastering Bitcoin / Mastering Lightning chapters linked in Resources. Chapter references are intentional, not decorative.

  2. 02

    Hands-on habit

    Every protocol idea should be paired with one local experiment. That habit turns reading into builder instinct.

    1. Reproduce the happy path on regtest (or Polar for Lightning)
    2. Break it on purpose (wrong fee, expired invoice, offline peer)
    3. Write down what error you saw and which layer produced it (wallet, node, mempool, peer)
  3. 03

    Glossary check

    Pick three terms from this lesson and define them in one sentence each without opening notes. Weak definitions mean the lesson is not finished yet.

  4. 04

    Resource order

    Use Resources in order: narrative book chapter first, then BIP/BOLT for precision, then implementation docs for commands. Jumping straight to RPC flags without the mental model creates brittle knowledge.

Bitcoin Core (bitcoind + bitcoin-cli) is the reference full node. Most serious backends either run it or carefully justify an alternative.

Complete Step 1 // Required reading in the study plan above, then continue here. You already stood up regtest in Foundations — this lesson deepens RPC habits.

Step 2 — Core idea: engine + authenticated controls

RPC is how you mine regtest blocks, fund addresses, inspect mempools, and import descriptors. Misconfigured RPC is also how servers get drained.

Analogy: bitcoind is the engine; RPC is the instrument cluster and ignition keyed to authorized operators. Never bolt the ignition onto the public internet.

Loading diagram…

Authenticated RPC controls node and wallet operations.

Useful call families:

  • Blockchain: getblock, getrawtransaction
  • Mempool: getmempoolentry, estimatesmartfee
  • Wallet: sendtoaddress, importdescriptors, PSBT RPCs

RPC exposure

Bind RPC to localhost. Use cookie auth or strong credentials. Never put rpcallowip=0.0.0.0/0 on a valued node.

Done when: You can name three RPC families and one hard rule for exposure.

Step 3 — Try it: dedicated lab wallet (lab)

bitcoin-cli -regtest getblockchaininfo
bitcoin-cli -regtest createwallet "dev-lab" || bitcoin-cli -regtest loadwallet "dev-lab"
ADDR=$(bitcoin-cli -regtest getnewaddress)
bitcoin-cli -regtest generatetoaddress 101 "$ADDR"

Confirm chain is regtest. Note cookie vs rpcuser auth from your setup.

Common mistakes

  • Using one wallet for experiments and savings
  • Forgetting -regtest and talking to the wrong chain
  • Parsing RPC errors poorly and retrying unsafe sends

Done when: Lab evidence (chain info + wallet fund flow + auth sentence + source) is complete.

Next lesson

PSBT Workflows — multi-party signing without proprietary blobs.

further reading

  • docsBitcoin Core RPC reference
  • docsbitcoin.conf options

review // club

Review club

Practice on real Bitcoin OSS changes tied to this chapter. Read the diff, use the checklist, and optionally paste your review comment URL in your lab notes.

  • Bitcoin Core RPC documentation PRs

    Find a Core RPC doc issue and leave a review comment on what's missing for a regtest workflow.

    gfi
    examplesparameter clarity
    30 min·beginneropen on GitHub
review checklist
  1. Does the change solve the stated problem?
  2. Are edge cases and rollout behavior covered?
  3. Are tests or test vectors included?
  4. Is the diff minimal and clearly explained?

More repos and GFIs on /discover and /issues.

progress // sign in

Reading is public. Sign in to mark lessons complete, sync across devices, and unlock your roadmap.

./sign-in-to-track

discussion

Discussion

prevDescriptors & MiniscriptnextPSBT Workflows

On this page

Press Shift + ? for keyboard shortcuts.

Press R to research on Bitcoin Search.

No questions yet — be the first to ask.