Introduction to Hash Ahead

HashAhead

What is Blockchain?

The best way to describe a blockchain is as a public database that is updated and shared by many computers in a network.

"Blocking" means that data and state are stored in sequential batches or "blocks". If you send HAH to others, you need to add the transaction data to a block to be considered successful.

"Chain" refers to each block cryptographically referencing its parent block. In other words, blocks are chained together. The data in a block cannot be changed without changing all subsequent blocks, but changing subsequent blocks requires the consensus of the entire network.

Every computer in the network must agree on every new block and chain. These computers are called "nodes". Nodes guarantee that everyone who interacts with the blockchain has the same data. To complete this distributed agreement, the blockchain needs a consensus mechanism.

Hash Ahead adopts a delegated proof-of-stake consensus mechanism. Anyone who wants to add a new block to the chain needs to stake at least 100,000 HAH in the deposit contract and run the validator software. They are then randomly selected to propose blocks, which are checked by other validators and added to the blockchain. In this model, there is usually only one chain, but due to network delays and dishonest behavior, multiple blocks may exist at the same location near the chain head. To solve this problem, a fork selection algorithm selects a set of canonical blocks. The blocks chosen are the ones that make up the chain with the largest possible weight, where "weight" is the number of validators who endorsed the block (and weighted by the HAH staked by the validators). There is also a reward and punishment system where participants are strongly encouraged to be as honest and online as possible.

Introduction to Hash Ahead

Hash Ahead is a blockchain with computers embedded in it. It is the foundation upon which applications and organizations are built in a decentralized, permissionless, and censorship-resistant manner.

In the Hash Ahead universe, there is one normalized computer (called the Hash Ahead Virtual Machine, or EVMC) whose state is unanimously agreed upon by everyone in the Hash Ahead network. Everyone participating in the Hash Ahead network (each Hash Ahead node) will save a copy of the state of the computer. Additionally, any participant can broadcast requests to this computer to perform arbitrary computations. Every time such a request is broadcast, other participants on the network check, verify, and perform (“execute”) that computation. This execution results in a state change of the Hash Ahead virtual machine, which is propagated throughout the network.

Computational requests are called transaction requests; a record of all transactions and the current state of the Hash Ahead virtual machine are stored in the blockchain, which in turn is stored and agreed upon by all nodes.

Encryption mechanisms ensure that once a transaction has been verified as valid and added to the blockchain, it cannot be tampered with afterwards. The same mechanism also ensures that all transactions are signed and executed with the proper "authority" (no one can send digital assets from Alice's account except Alice herself).

What are HAH?

HAH is the native cryptocurrency on Hash Ahead. The purpose of HAH is to allow computing to be marketable. Such markets provide an economic incentive for participants to validate and execute transaction requests, providing computing resources to the network.

Any participant broadcasting a transaction request must also provide a certain amount of HAH to the network as a bonus. The network will award this bounty to whoever finally validates the transaction, executes it, commits it to the blockchain, and broadcasts it to the network.

The amount of HAH paid corresponds to the resources required to perform the computation. Such rewards can also deter malicious actors from intentionally clogging the network by requesting the execution of infinite computations or other resource-intensive scripts, since these actors must pay for computing resources.

HAH is also used to provide cryptoeconomic security to the network in three main ways: 1) as a means of rewarding validators who propose blocks or point out dishonest behavior by other validators; Collateral to deter dishonesty - if validators try to misbehave, their HAH may be destroyed; 3) Used to weight "votes" for newly proposed blocks and influence the fork selection part of the consensus mechanism .

What is a smart contract?

In fact, participants do not write new code every time a computation is requested on the Hash Ahead virtual machine. Instead, application developers upload programs (reusable code snippets) to the Hash Ahead virtual machine state, and users make requests to execute those code snippets with different parameters. We call these programs uploaded to the network and executed by the network smart contracts.

In simple terms, you can imagine a smart contract as a kind of vending machine: after calling a script with specific parameters, if certain conditions are met, some operations or calculations will be performed. For example, a simple seller smart contract can create and assign digital asset ownership if the caller sends HAH to a specific recipient.

Any developer can create a smart contract and use the blockchain as its data layer, exposing it to the network for a payment of HAH to the network. Any user can then invoke the smart contract to execute its code and pay the network again.

Therefore, through smart contracts, developers can arbitrarily build and deploy complex user-oriented applications and services, such as markets, financial instruments, games, etc.

The Term

Blockchain

A sequence of all blocks submitted to the Hash Ahead network in the history of the Hash Ahead network. It is so named because each block contains a reference to the previous block, which helps keep all blocks in order and thus maintains the order of the precise history.

HAH

HAH is the native cryptocurrency on Hash Ahead. Users pay other users HAH to complete their own code execution requests.

More information on HAH

EVMC Hash Ahead virtual machine

The Hash Ahead Virtual Machine is a global virtual computer whose state is stored and agreed upon by every participant in the Hash Ahead network. Any participant can request arbitrary code execution on the Hash Ahead virtual machine; code execution changes the state of the Hash Ahead virtual machine.

More information about the Hash Ahead virtual machine

Nodes

The physical computer that stores the state of the Hash Ahead virtual machine. Nodes communicate with each other, disseminating information about the state of Hash Ahead and its new state changes. Any user can also request code execution by broadcasting a code execution request from a node. The Hash Ahead network itself is the collection of all Hash Ahead nodes and their communications.

More information about nodes

Account

The account is where the HAH is stored. Users can initialize an account, deposit HAH into the account, and transfer HAH in their account to other users. Accounts and account balances are stored in a large table in the Hash Ahead VM and are part of the overall state of the Hash Ahead VM.

More information about accounts

Trade

A "transaction request" is the formal term for a request for code execution on the Hash Ahead virtual machine. "Transaction" refers to a completed transaction request and related Hash Ahead virtual machine state changes. Any user can broadcast a transaction request from a node to the network. In order for a transaction request to affect the agreed-upon Hash Ahead virtual machine state, it must be verified, executed, and "committed to the network" by other nodes. Execution of any code will result in a state change of the Hash Ahead virtual machine; once committed, the state change will be broadcast to all nodes in the network. Here are some transaction examples:

  • Send X HAH from my account to Alice's account.

  • Publish some smart contract code into the Hash Ahead virtual machine state.

  • Execute the smart contract code of X address in EVMC with Y parameter.

More information about the transaction

Block

Transaction volumes are huge, so transactions are "committed" in batches or blocks. Blocks typically contain tens to hundreds of transactions.

More about blocks

Smart Contract

Refers to the reusable code fragments (programs) released by developers to the Hash Ahead virtual machine state. Anyone can request the execution of smart contract code by making a transaction request. Because developers can write arbitrary executable applications (games, markets, financial instruments, etc.) into the Hash Ahead virtual machine by publishing smart contracts.

More information about smart contracts

\

Last updated