Skip to main content

17 docs tagged with "AntelopeIO/reference-contracts"

View All Tags

CPU as system resource

The system resource CPU provides processing power to blockchain accounts. The amount of CPU an account has is measured in microseconds and it is referred to as cpu bandwidth on the cleos get account command output. The cpu bandwidth represents the amount of processing time an account has at its disposal when actions sent to its contract are executed by the blockchain. When a transaction is executed by the blockchain it consumes CPU and NET, therefore sufficient CPU must be staked in order for transactions to complete.

How to buy RAM

Setup an account that require multiple signatures for signing a transaction

How to use eosio.wrap

The eosio.wrap contract needs to be installed on a privileged account to function. It is recommended to use the account eosio.wrap.

NET as system resource

NET, as CPU and RAM, is a very important system resource in Antelope-based blockchains. NET is measured by the byte size of the transactions saved in the blockchain database and it is referred to as net bandwidth on the cleos get account command result. When a transaction is executed by the blockchain it consumes CPU and NET, therefore sufficient NET must be staked in order for transactions to complete.

Overview

The Antelope blockchain framework is unique in that the features and characteristics of the blockchain built on it are flexible, that is, they can be changed, or modified completely to suit each business case requirement. Core blockchain features such as consensus, fee schedules, account creation and modification, token economics, block producer registration, voting, multi-sig, etc., are implemented inside smart contracts which are deployed on the blockchain built on the Antelope framework.

Reference contracts

Reference contracts are a collection of contracts deployable to an Antelope blockchain which implements a lot of critical functionality that goes beyond what is provided by the base Antelope protocol.

System contracts, system accounts, privileged accounts

At the genesis of an Antelope-based blockchain, there is only one account present, eosio account, which is the main system account. There are other system accounts, created by eosio account, which control specific actions of the system contracts mentioned in previous section. Note the terms system contract and system account. Privileged accounts are accounts which can execute a transaction while skipping the standard authorization check. To ensure that this is not a security hole, the permission authority over these accounts is granted to eosio.prods system account.

Upgrading the system contract

Cleos currently provides tools to propose an action with the eosio.msig contract, but it does not provide an easy interface to propose a custom transaction.

vote

In an Antelope-based network the blockchain is kept alive by nodes which are interconnected between each other, communicating with each other via peer to peer protocols. Some of these nodes are elected, via a voting process, by the token holders to be producer nodes. They produce blocks, validate them and reach consensus on what transactions are allowed in each block, their order, and what blocks are finalized and stored forever in the blockchain. This way the governance, the mechanism by which collective decisions are made, of the blockchain is achieved through the 21 active block producers which are appointed by token holders' votes. It's the 21 active block producers which continuously create the blockchain by creating blocks, and securing them by validating them, and reaching consensus. Consensus is reached when 2/3+1 active block producers agree on validity of a block, that is all transactions contained in it and their order. The 21 producers is the default value however it can be configured to be higher or smaller to meet each business case requirements.