Releasing the Aergo Chain Beta & Launching the Aergo Public Testnet (0.9.0)

A public test network that allows anyone to operate a node, execute transactions, and run smart contracts on highly-performant and stable infrastructure.

We are finally nearing the end of 2018, a year that has been full of progress and success for Aergo. After launching our pre-testnet at the end of October. We are now pleased to announce the launch of the Aergo public test network; our final major milestone ahead of our mainnet launch scheduled for Q1 2019. You will now be able to run smart contracts and execute transactions on our stable and highly-performant infrastructure.

The pre-testnet, which we launched just about two months ago, showcased Aergo’s performance, reliable architecture, and the progress we’d made in development. It also made the potential of the technology clear to our customers. This public testnet will take all of these things multiple steps further.

The testnet currently consists of thirteen block producers, but will eventually consist of twenty-three block producers. This will be done in an effort to make sure the test network represents the same environment and conditions that the main network would represent once live.

Using the Aergo Testnet

This test network allows external participants to join the Aergo network in a variety of ways. Participating in the Aergo public testnet requires that you do three things:

  1. Operate a full node
  2. Attach your client to a well-known node (i.e testnet.aergo.io)
  3. Get testnet tokens on faucet.aergoscan.io

We will provide a faucet for anyone to fund their accounts with Aergo tokens. This will allow you to pay the fees necessary to execute transactions and smart contracts on the testnet.

Operating a full node

By default, the server connects to Polaris for the testnet, registers itself, obtains addresses of other nodes, and automatically attempts to connect those nodes. If the server is in the NAT environment or has multiple NICs, additional settings are required for the external node to access the server. Set up an outside address for other nodes in the external network connection, and set internal address for the binding address.

Attaching your client to a well-known node

Using the software development kit (heraj or herajs) or the command line interface tool (aergocli), you can connect to testnet.aergo.io on port 7845. Details found here.

If you would like to set your own node up to sync with the testnet, refer to the documentation here.

Getting testnet tokens

To generate transactions on the public testnet, you need an account with a positive balance. Here’s how you can create and fund a new testnet account with Aergo tokens:

  1. Create a new account
  2. Go to faucet.aergoscan.io, enter your account address, and press ‘Request Tokens’ (wait times depend on demand)
  3. Check your account address on testnet.aergoscan.io: you should have received 1 Aergo token for testing purposes

Note: These Aergo tokens are only valid on the testnet and cannot be sold or bought. They are only used for developing and testing applications. Please only request as many tokens as you actually need.

Just for the record, this is the last record of the pre-testnet :-)

Aergo Beta Release Node 0.9.0 Overview (see the codebase on our GitHub: aergoio)

The testnet is configured using the Aergo beta release node. New features on the Aergo chain released in this version include:

  • BFT-dPOS with voting (consensus): Election now integrated. The pre-test net had the function of agreeing on blocks among the set block producers. This testnet has a function that allows it to select the block producer through a voting process.
  • Named Accounts: For user convenience, a Named Account function which allows users to regard their accounts by a set name rather than an address is provided.
  • Extended Aergo Lua: The Aergo Lua smart contract language has been extended for more convenient development.
  • Advanced Client Framework: Provides a wallet interface that interacts with keystore files and manages nonce values. Provides the ability to execute smart contracts through interface calls. Provides a contract library to issue tokens based on Aergo.
  • Hub-Enterprise: Enterprise customers see easy management and monitoring of their networks as a prerequisite. We provide the Hub-Enterprise blockchain control solution to solve this problem.
  • Merkle Bridge Verification (phase 1): StateTrie Merkle proof verifications and delegated token transfers are now implemented in the Merkle bridge.
  • Various Smart Contract Templates: Some standard smart contracts provided.

This overview goes over new features shipped with the Aergo Chain Beta. The list of items featured in the Aergo Chain Alpha in October included BFT-dPOS (without voting), AergoSQL, our ‘SHIP’ package manager, heraj/herajs/herapy (SDKs), aergocli, a browser wallet, LiteTree (branchable database engine), and StateTrie.

BFT-dPOS with Voting

Vote-based block producer election has been added to the consensus protocol. Voting can change the order of BPs that replace existing BPs or generate blocks. Voting results are based on the aggregation (rounding) of 23 units, but the results are counted up to the first round (considering that the finality of the last block is somewhat less than the old block). In other words, 23 blocks just before the start of a new round are excluded from the votes count.

Details of the agreement algorithm may change before mainnet launch.

Named Accounts

You can give your existing account’s public address an alphanumeric and 12-character name. With this feature, you do not have to memorize a long public address. The created name is used as an alias for an existing address. The name is unique within the Aergo network. Currently, everyone can name public addresses free of charge; and once a name is linked, only the owner of the name can change it.

Name ownership and transfer processes will change in the future.

Extended Aergo Lua

A new built-in function has been added to the Lua contract.

system module: getOrigin(), date(), time(), difftime()
contact module: balance()
crypto: sha256(), ecverify()
state module: map:delete(), array:ipairs()
bignum module: number()
abi module: payable()

The Extended Aergo Lua smart contract language features following:

  • Formats conversion and math functions have been added for date and time, and crypto modules for encryption and signature verification have been added. Delete methods are available to delete elements in the map, and fixed-length arrays can be easily rotated through the ipairs method.
  • Supports the payable function. You must explicitly register using the abi.payable() function for functions that require coin transmission. Otherwise, an error will occur. The number outside the representation area of the Lua number can be created and handled by the bignum module.
  • Supports the default function. The default function has the same functionalities of the fallback function on Ethereum. The default function will be executed in the case of a contract call without additional call information. We’ve also optimized the smart contract execution process to improve performance.

Advanced Client Framework

Our new advanced client framework provides a more developer-friendly and comfortable interface than the original SDK provided with the Aergo chain alpha. The newly added wallet interface automatically fills in the nonce values ​​needed for Aergo token transfers or smart contract calls. This will get rid of the troublesome nonce management developers typically face when building applications on blockchains. In addition, Java KeyStore provides an interface to store keys so that private keys can be stored more securely.

How convenient would it be to call a smart contract with a familiar interface? Heraj makes this possible by providing the ability to execute smart contracts through interface calls.

By writing an interface that exactly matches the Lua code, you can make smart contract calls with the Java interface. Make sure you don’t call the function name hard by the string; do it just as you would develop a normal application.

This beta release provides a contract library to publish tokens based on Aergo. The ATHENA-370 package provides the functionality provided by Ethereum’s ERC-20, which will allow you to create a fungible token on the Aergo chain.

Hub-Enterprise

The Aergo Hub-Enterprise is an orchestration platform for installing, managing and monitoring the Aergo network which is a blockchain configured by Enterprise users. Through Hub-Enterprise, users can do the following (among many other features):

  • Deploy a new, custom blockchain
  • Configure the installed blockchain
  • Add one or more blockchain nodes since deploying the blockchain
  • Monitor the blockchain and each blockchain node composing it
Aergo Hub-Enterprise

Hub-Enterprise includes the Aergo Horde with a web interface to provide the following functionalities:

  • Auto-provisioning of blockchains
  • Monitoring blockchain networks
  • Auto-repairing blockchain nodes
  • Monitoring blockchain nodes

Merkle Bridge Development

StateTrie Merkle proof verification:

With the newly-released crypto.sha256() and crypto.ecverify() we are now able to validate StateTrie Merkle proofs on-chain in Lua contracts. State Merkle roots are multi-signed and broadcasted between blockchains at regular intervals. To transfer tokens between blockchains, users can then construct a Merkle proof of their deposit (handled by Herapy, other SDK support to come) and the bridge contract will verify that proof before minting a new token on the other blockchain. A full blog post on the Merkle bridge will be made at a later time.

Account states and contract variable states can be queried with the Merkle proof for any block using the following remote procedure call (RPC) services:

  • rpc GetStateAndProof(AccountAndRoot) returns (StateProof) {}
  • rpc QueryContractState(StateQuery) returns (StateQueryProof) {}

Delegated token transfers:

Delegated token transfers are a powerful enhancement to the well-known ERC20 standard.

On the ERC20 standard, sending tokens to a contract using TransferFrom requires two transactions: one to set approval, and one for the receiver contract to “pull” the tokens. Increasing approval will require two transactions as well. Approval should first be set to 0 before it can be increased otherwise the first approval could be stolen by the receiver.

To avoid these hurdles, we can use delegated token transfers where all token owners now have a nonce that is increased after each transaction. Users can now sign a transaction offline and contracts can pull tokens with a single transaction. This construction enables feeless dApp interactions as users don’t need to hold Aergo tokens to execute transactions.

Various Smart Contract Templates

Aergo is a distributed application and storage platform built for use by the next generation of blockchain and enterprise-IT developers. We want as many developers as possible to realize their ideas for decentralized applications and services on blockchains; specifically, on our blockchain.

We are in the process of creating frequently used libraries (e.g. address, safemath) and templates that existing dApp developers would find friendly (e.g. token contracts, crowdsale contracts).

What’s next?

Despite timid cryptocurrency market conditions, Aergo continues to develop swiftly and aggressively. We are making great progress on the commercial front at Blocko in driving adoption of permissioned blockchain technology amongst many sectors in fintech, public services, and enterprise. Our customers are waiting patiently for the launch of the Aergo mainnet — where new opportunities in distributed networking will be possible.

We believe Aergo will be remembered as one of the fastest growing, most pragmatic open-source projects in history. The value of any technology is based on how many customers are using it and the scope of that usage. We are in firm belief that Aergo, with the support of Blocko’s intimate blockchain customer know-how and clientele base, will be one of the first to see practical use among real customers and real clients globally.

We look forward to sharing more of what we are doing at Blocko and at Aergo with you all in the near future. A future roadmap is seen here with some of the many features we’re looking to implement with our mainnet launch.

We invite any developers looking to contribute to the code to feel free to fork the code, modify the code, or create a pull request.

If you have any questions, be sure to ask us on any of our social channels (preferably Discord for development-related questions):