Blockbeat News

Choose a blockchain and set up a safe development environment

Blockchain learning series 7 of 12

By Chris DW, Editor

Published

Prepare a simulated network and distinguish it from a public testnet or mainnet.

Gold and blue diagram of local, test and live environments above three panels: Local simulation, Public testnet, Production network. Full text follows.
Gold and blue mark the Blockchain learning series. Local simulation: Disposable state and practice accounts; no real funds. Public testnet: Shared practice network with its own assets and limits. Production network: Real costs, operational commitments and user risk.
Open the full-size infographic
Read the infographic as text

Choose a blockchain and set up a safe development environment

Prepare a simulated network and distinguish it from a public testnet or mainnet.

Local simulation
Disposable state and practice accounts; no real funds.
Public testnet
Shared practice network with its own assets and limits.
Production network
Real costs, operational commitments and user risk.

Learning goal: Prepare a simulated network and distinguish it from a public testnet or mainnet.

Blockchain learning series 7 of 12. Educational diagrams; not a production architecture.

You can learn to deploy a contract without buying crypto or connecting a funded wallet. Start with a disposable simulation, where mistakes cost practice balances and the entire chain can be reset. Move to a shared network only when you understand what the local version leaves out.

Complete the development comparison first. The optional downloadable lab needs a computer with a current Node.js LTS release and a terminal. If you have never used a terminal, the browser-based Remix route below lets you start without that setup.

Begin the EVM development path

The next four lessons use one execution environment, the EVM, to build, test and connect the document register. They teach application development rather than how to operate a miner or validator. Their local simulator performs neither real proof-of-work mining nor real proof-of-stake consensus. Fast practice blocks are a convenience, not evidence about either system's production security.

The development comparison explains Bitcoin's output-and-script model and why our Solidity code cannot be deployed directly to its base layer. If your project is a Bitcoin wallet or payment integration, that is a different development path. The foundations about signatures, verification and external dependencies still apply, while the transaction construction and tools change.

Choose the learning environment before the network

A local simulation runs a practice chain for you. A public testnet is shared with other participants and has its own test assets. Mainnet is a production network where actions can create real costs and liabilities. These are separate environments, even when the tools look similar.

For this series we use Solidity 0.8.30 and an Ethereum-compatible virtual machine. The downloadable lab pins the compiler and dependencies and targets the Paris EVM instruction set for compatibility with its local simulator. This is a reproducible teaching choice, not a claim that this compiler or simulator is the best production stack.

Ethereum, its layer-2 networks and other EVM-compatible chains can share some tooling. Their security, fees, operation and upgrade arrangements still differ. Solana and other ecosystems have different execution and account models. Ethereum's network documentation distinguishes production and development networks; its scaling overview explains why layer-2 designs need separate assessment.

Keep the environments separate

Keep the environments separate
EnvironmentFunds and stateUse in this series
Local simulationPretend balances; resettable stateAll supplied practical exercises
Public testnetSeparate practice assets; shared infrastructureOptional later work, not required
MainnetReal fees and operational consequencesOutside this tutorial deployment

Start in the browser with Remix

Open the official Remix IDE by checking the address carefully. Create a workspace and a file named DocumentRegister.sol. In the next lesson, paste the complete contract into that file. Select compiler 0.8.30 and the Paris EVM target, compile, then use a Remix VM environment in Deploy & Run. Labels may change between IDE versions; the important check is that the environment is a simulation, not an injected wallet or public-network connection.

The Remix deployment instructions explain that workflow. The VM provides practice accounts and balances. Do not purchase coins, supply a recovery phrase or connect a wallet containing assets to complete this course.

A simulated account is convenient because the environment can authorise its transactions. That convenience would be a serious security issue if transferred to a public server handling real funds. Never reuse the lab's known accounts, keys or configuration outside the disposable environment.

Run the complete local project

The downloadable learning lab includes the contract, compiler settings, automated tests and a small website. Unzip it into a new folder. Install a supported Node.js LTS release from the official Node.js download page, then open a terminal in that folder. Run these commands one at a time:

Code · sh

npm ci
npm test
npm start

The first command installs the versions in the lockfile. It requires internet access and runs the installation steps of the declared dependencies. The second compiles and tests the contract. The third starts a local server. Read its output and open http://127.0.0.1:4173 in your browser. Stop it with Ctrl+C. Restarting creates a new simulated chain and clears the records.

If npm is not recognised, reopen the terminal after installing Node.js and check that installation. If port 4173 is in use, stop the earlier lab process before retrying. Keep the server bound to the supplied loopback address; do not publish it or run it on a shared hosting service.

Record the environment explicitly

The lab uses chain ID 1337, a disposable network identifier, and displays its contract address. Another local developer can use the same chain ID for an entirely different chain. It is not a globally unique proof of network identity. The address and records only make sense in the running lab instance.

For a real deployment, keep the network, address, compiler version, build settings, source and ABI together. Also record how to reproduce the deployment and who controls any privileged accounts. A screenshot of a successful deployment is insufficient.

Before continuing, explain the difference between a local VM balance and spendable assets on a public network. If you can also say what disappears when the lab restarts, you are ready to build the contract.

Sources

Source note: We have made reasonable efforts to provide sources for material claims. Some third-party sources could not be accessed at publication.

Latest original articles