Blockbeat News

Blockchain development versus ordinary software development

Blockchain learning series 6 of 12

By Chris DW, Editor

Published

Choose what belongs on-chain and what belongs in conventional software.

Gold and blue diagram of database and shared entry above three panels: Keep private data off-chain, Share a small commitment, Design for mistakes. Full text follows.
Gold and blue mark the Blockchain learning series. Keep private data off-chain: Use ordinary storage with appropriate access control. Share a small commitment: Record a document fingerprint in the teaching project. Design for mistakes: Plan versioning, user support and recovery before launch.
Open the full-size infographic
Read the infographic as text

Blockchain development versus ordinary software development

Choose what belongs on-chain and what belongs in conventional software.

Keep private data off-chain
Use ordinary storage with appropriate access control.
Share a small commitment
Record a document fingerprint in the teaching project.
Design for mistakes
Plan versioning, user support and recovery before launch.

Learning goal: Choose what belongs on-chain and what belongs in conventional software.

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

A blockchain application still needs ordinary software. The browser displays the page, a developer manages releases, files need storage and users need help when something fails. The distinctive choice is which shared rules or records should be enforced by the network.

You should understand accounts and contracts before planning the build. No coding is required yet. This guide sets the boundary for the project so that later implementation choices have a reason.

Start with an ordinary version

Imagine a small service that records document fingerprints. A conventional implementation could store an account identifier, fingerprint and creation time in a database. A server validates requests and controls updates. An administrator can correct data under the service's policy.

That design may meet the entire need. It is familiar, can keep records private and is easier to change when requirements evolve. Users depend on the operator's controls and honesty, supported by whatever auditing or contractual arrangements apply.

The blockchain version makes a narrow record independently retrievable from a chosen network. It still needs a clear link between addresses and real organisations if readers expect to identify issuers. The development exercise is useful even if the final business decision is to retain the database.

Choose the boundary deliberately

Choose the boundary deliberately
DecisionOrdinary applicationOur blockchain project
Original documentStored with suitable access controlKept off-chain
Shared entryOperator-managed database rowCaller-scoped fingerprint entry
Code changeReplace server code under release controlsDeploy another contract; plan version handling
Failure recoveryBackups and controlled data correctionDepends on deployed rules and surrounding systems

Building on Bitcoin starts with a different transaction model

Suppose a practice wallet controls one unspent output worth 100,000 satoshis. To pay 30,000 satoshis, it could spend that output and create two new outputs: 30,000 for the recipient and 69,000 returning as change. The remaining 1,000 satoshis is the transaction fee. These are illustrative amounts, not a recommended fee. One bitcoin contains 100 million satoshis.

The original output is spent in full. The change is a new output, rather than a remainder left inside the original one. A wallet developer must select spendable inputs, create appropriate outputs, estimate the fee and manage change. Bitcoin's transaction documentation describes inputs, outputs and spending conditions. Bitcoin fee estimation concerns transaction weight and fee rate, rather than the gas calculation used by our EVM example below.

Bitcoin Script expresses conditions for spending outputs. Developers can build wallets, merchant payment systems and arrangements requiring multiple signatures or time-based conditions. The Bitcoin contracts guide illustrates agreements built from these mechanisms. Bitcoin therefore has programmability, but it does not provide the same general-purpose contract account and persistent storage model as our Solidity register.

To build a fingerprint service using Bitcoin, begin with the statement users need to verify. A design could commit a fingerprint, or a combined commitment covering several fingerprints, through a suitable transaction construction and retain the supporting documents and proofs elsewhere. Readers would need a verification procedure for that commitment. You cannot deploy our Solidity file directly to Bitcoin's base layer and expect the same callable register.

Layers and services built around Bitcoin can offer other functionality. Assess their custody, execution and settlement arrangements individually; using Bitcoin in a product does not establish that every application action receives Bitcoin base-layer enforcement. The choice is an architecture decision, not a contest between two consensus labels.

Keep the EVM project's shared part small

For the practical lessons we use the Ethereum Virtual Machine and Solidity because a small register makes state, permissions and testing visible in one project. That is a choice of execution environment. Ethereum already supported smart contracts when it used proof of work; the Merge changed its consensus mechanism while retaining the application layer. PoS is not what makes the register programmable.

Our contract will store a SHA-256 fingerprint and the block in which an address first registered it. It will not store the document, personal identity or a legal assertion of ownership. The browser calculates the fingerprint from the file's bytes. The contract accepts that value without seeing the file.

This produces a precise statement: the address submitted this fingerprint by the time this record was included. It does not establish the original creation date. A block number supplies ordering context, not a civil timestamp or a certificate of authorship.

Keeping full documents off-chain avoids treating the ledger as a general file server. It does not remove all privacy concerns: a predictable document may be guessable from its fingerprint. Ordinary access control and data minimisation remain necessary. Ethereum's storage overview explains why applications consider off-chain storage.

Deployment changes the recovery problem

A normal website release can replace server code behind the same URL. A deployed contract's code cannot simply be edited in place like a source file. Applications may use upgrade mechanisms, or deploy another contract and migrate users. Those approaches introduce permissions and coordination work.

For this course, the contract will not be upgradeable. If you change its source and deploy again, you create a new instance with a different address and empty records. The previous instance does not automatically inherit the new rules or move its data.

That makes the lesson easier to inspect, but it also shows why requirements and failure handling matter before production. Calling a contract immutable is not a substitute for a migration plan.

Costs depend on execution and storage

On a public EVM network, state-changing transactions consume gas. The total fee depends on the resources used and the applicable price and network rules. A large or complex operation is not priced like an unlimited database write. Ethereum's gas documentation explains the units and fee model.

As an illustrative calculation, 80,000 gas at an effective 2 gwei per gas is 160,000 gwei, or 0.00016 ETH. This is arithmetic, not a quoted registration price. An ETH-to-dollar conversion would require a stated exchange rate, and some layer-2 transactions have additional fee components. Measure the actual operation on the chosen network.

The local lab uses pretend balances. A successful test there establishes behaviour, not a forecast of mainnet fees or capacity.

Write the boundary before writing the code

For the register, the browser selects and hashes a file; the contract records a fingerprint for a caller; conventional storage retains any original; the interface explains the limitations. We will not add an oracle, token or payment function because the teaching task does not require one.

Try proposing a correction feature. Should an operator be allowed to erase an old fingerprint? If so, who authorises the deletion and what should an independent reader still be able to discover?

There is no automatic answer. A correction may be a new entry marking a previous claim as withdrawn, while the earlier history remains. Your design should follow the user's actual need and legal obligations. If private erasure is essential, a public permanent record may be the wrong starting point.

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