BitShares-Core  6.1.0
BitShares blockchain implementation and command-line interface software
Modules | Classes | Typedefs
Operations

A set of valid comands for mutating the globally shared state. More...

Modules

 The BitShares Transaction Proposal Protocol
 
 The Blockchain Worker System
 

Classes

struct  graphene::protocol::account_create_operation
 
struct  graphene::protocol::account_update_operation
 Update an existing account. More...
 
struct  graphene::protocol::account_whitelist_operation
 This operation is used to whitelist and blacklist accounts, primarily for transacting in whitelisted assetsAccounts can freely specify opinions about other accounts, in the form of either whitelisting or blacklisting them. This information is used in chain validation only to determine whether an account is authorized to transact in an asset type which enforces a whitelist, but third parties can use this information for other uses as well, as long as it does not conflict with the use of whitelisted assets. More...
 
struct  graphene::protocol::account_upgrade_operation
 Manage an account's membership statusThis operation is used to upgrade an account to a member, or renew its subscription. If an account which is an unexpired annual subscription member publishes this operation with upgrade_to_lifetime_member set to false, the account's membership expiration date will be pushed backward one year. If a basic account publishes it with upgrade_to_lifetime_member set to false, the account will be upgraded to a subscription member with an expiration date one year after the processing time of this operation. More...
 
struct  graphene::protocol::account_transfer_operation
 transfers the account to another account while clearing the white listIn theory an account can be transferred by simply updating the authorities, but that kind of transfer lacks semantic meaning and is more often done to rotate keys without transferring ownership. This operation is used to indicate the legal transfer of title to this account and a break in the operation history. More...
 
struct  graphene::protocol::assert_operation
 assert that some conditions are true.This operation performs no changes to the database state, but can but used to verify pre or post conditions for other operations. More...
 
struct  graphene::protocol::asset_create_operation
 
struct  graphene::protocol::asset_settle_operation
 Schedules a market-issued asset for automatic settlementHolders of market-issued assests may request a forced settlement for some amount of their asset. This means that the specified sum will be locked by the chain and held for the settlement period, after which time the chain will choose a margin posision holder and buy the settled asset using the margin's collateral. The price of this sale will be based on the feed price for the market-issued asset being settled. The exact settlement price will be the feed price at the time of settlement with an offset in favor of the margin position, where the offset is a blockchain parameter set in the global_property_object. More...
 
struct  graphene::protocol::asset_fund_fee_pool_operation
 
struct  graphene::protocol::asset_update_operation
 Update options common to all assetsThere are a number of options which all assets in the network use. These options are enumerated in the asset_options struct. This operation is used to update these options for an existing asset. More...
 
struct  graphene::protocol::asset_update_bitasset_operation
 Update options specific to BitAssetsBitAssets have some options which are not relevant to other asset types. This operation is used to update those options an an existing BitAsset. More...
 
struct  graphene::protocol::asset_update_feed_producers_operation
 Update the set of feed-producing accounts for a BitAssetBitAssets have price feeds selected by taking the median values of recommendations from a set of feed producers. This operation is used to specify which accounts may produce feeds for a given BitAsset. More...
 
struct  graphene::protocol::asset_publish_feed_operation
 Publish price feeds for market-issued assetsPrice feed providers use this operation to publish their price feeds for market-issued assets. A price feed is used to tune the market for a particular market-issued asset. For each value in the feed, the median across all committee_member feeds for that asset is calculated and the market for the asset is configured with the median of that value. More...
 
struct  graphene::protocol::asset_issue_operation
 
struct  graphene::protocol::asset_reserve_operation
 used to take an asset out of circulation, returning to the issuer More...
 
struct  graphene::protocol::asset_update_issuer_operation
 Update issuer of an assetAn issuer has general administrative power of an asset and in some cases also its shares issued to individuals. Thus, changing the issuer today requires the use of a separate operation that needs to be signed by the owner authority. More...
 
struct  graphene::protocol::void_result
 
struct  graphene::protocol::generic_operation_result
 
struct  graphene::protocol::generic_exchange_operation_result
 
struct  graphene::protocol::extendable_operation_result_dtl
 
struct  graphene::protocol::base_operation
 
struct  graphene::protocol::committee_member_create_operation
 Create a committee_member object, as a bid to hold a committee_member seat on the network.Accounts which wish to become committee_members may use this operation to create a committee_member object which stakeholders may vote on to approve its position as a committee_member. More...
 
struct  graphene::protocol::committee_member_update_operation
 Update a committee_member object.Currently the only field which can be updated is the url field. More...
 
struct  graphene::protocol::committee_member_update_global_parameters_operation
 Used by committee_members to update the global parameters of the blockchain.This operation allows the committee_members to update the global parameters on the blockchain. These control various tunable aspects of the chain, including block and maintenance intervals, maximum data sizes, the fees charged by the network, etc. More...
 
struct  graphene::protocol::credit_offer_create_operation
 Create a new credit offerA credit offer is a fund that can be used by other accounts who provide certain collateral. More...
 
struct  graphene::protocol::credit_offer_delete_operation
 Delete a credit offer. More...
 
struct  graphene::protocol::credit_offer_update_operation
 Update a credit offer. More...
 
struct  graphene::protocol::credit_offer_accept_operation
 Accept a creadit offer and create a credit deal. More...
 
struct  graphene::protocol::credit_deal_repay_operation
 Repay a credit deal. More...
 
struct  graphene::protocol::credit_deal_expired_operation
 A credit deal expired without being fully repaid. More...
 
struct  graphene::protocol::custom_operation
 provides a generic way to add higher level protocols on top of witness consensusThere is no validation for this operation other than that required auths are valid and a fee is paid that is appropriate for the data contained. More...
 
struct  graphene::protocol::custom_authority_create_operation
 Create a new custom authority. More...
 
struct  graphene::protocol::custom_authority_update_operation
 Update a custom authority. More...
 
struct  graphene::protocol::custom_authority_delete_operation
 Delete a custom authority. More...
 
struct  graphene::protocol::liquidity_pool_create_operation
 Create a new liquidity pool. More...
 
struct  graphene::protocol::liquidity_pool_delete_operation
 Delete a liquidity pool. More...
 
struct  graphene::protocol::liquidity_pool_deposit_operation
 Deposit to a liquidity pool. More...
 
struct  graphene::protocol::liquidity_pool_withdraw_operation
 Withdraw from a liquidity pool. More...
 
struct  graphene::protocol::liquidity_pool_exchange_operation
 Exchange with a liquidity pool. More...
 
struct  graphene::protocol::limit_order_cancel_operation
 
struct  graphene::protocol::call_order_update_operation
 
struct  graphene::protocol::fill_order_operation
 
struct  graphene::protocol::bid_collateral_operation
 
struct  graphene::protocol::execute_bid_operation
 
struct  graphene::protocol::proposal_create_operation
 The proposal_create_operation creates a transaction proposal, for use in multi-sig scenariosCreates a transaction proposal. The operations which compose the transaction are listed in order in proposed_ops, and expiration_time specifies the time by which the proposal must be accepted or it will fail permanently. The expiration_time cannot be farther in the future than the maximum expiration time set in the global properties object. More...
 
struct  graphene::protocol::proposal_update_operation
 The proposal_update_operation updates an existing transaction proposalThis operation allows accounts to add or revoke approval of a proposed transaction. Signatures sufficient to satisfy the authority of each account in approvals are required on the transaction containing this operation. More...
 
struct  graphene::protocol::proposal_delete_operation
 The proposal_delete_operation deletes an existing transaction proposalThis operation allows the early veto of a proposed transaction. It may be used by any account which is a required authority on the proposed transaction, when that account's holder feels the proposal is ill-advised and he decides he will never approve of it and wishes to put an end to all discussion of the issue. Because he is a required authority, he could simply refuse to add his approval, but this would leave the topic open for debate until the proposal expires. Using this operation, he can prevent any further breath from being wasted on such an absurd proposal. More...
 
struct  graphene::protocol::samet_fund_create_operation
 Create a new SameT Fund objectA SameT Fund is a fund which can be used by a borrower and have to be repaid in the same transaction. More...
 
struct  graphene::protocol::samet_fund_delete_operation
 Delete a SameT Fund object. More...
 
struct  graphene::protocol::samet_fund_update_operation
 Update a SameT Fund object. More...
 
struct  graphene::protocol::samet_fund_borrow_operation
 Borrow from a SameT Fund. More...
 
struct  graphene::protocol::samet_fund_repay_operation
 Repay to a SameT Fund. More...
 
struct  graphene::protocol::ticket_create_operation
 Creates a new ticket. More...
 
struct  graphene::protocol::ticket_update_operation
 Updates an existing ticket. More...
 
struct  graphene::protocol::transfer_operation
 Transfers an amount of one asset from one account to another. More...
 
struct  graphene::protocol::vesting_balance_create_operation
 Create a vesting balance.The chain allows a user to create a vesting balance. Normally, vesting balances are created automatically as part of cashback and worker operations. This operation allows vesting balances to be created manually as well. More...
 
struct  graphene::protocol::vesting_balance_withdraw_operation
 Withdraw from a vesting balance.Withdrawal from a not-completely-mature vesting balance will result in paying fees. More...
 
struct  graphene::protocol::withdraw_permission_create_operation
 Create a new withdrawal permissionThis operation creates a withdrawal permission, which allows some authorized account to withdraw from an authorizing account. This operation is primarily useful for scheduling recurring payments. More...
 
struct  graphene::protocol::withdraw_permission_update_operation
 Update an existing withdraw permissionThis oeration is used to update the settings for an existing withdrawal permission. The accounts to withdraw to and from may never be updated. The fields which may be updated are the withdrawal limit (both amount and asset type may be updated), the withdrawal period length, the remaining number of periods until expiration, and the starting time of the new period. More...
 
struct  graphene::protocol::withdraw_permission_claim_operation
 Withdraw from an account which has published a withdrawal permissionThis operation is used to withdraw from an account which has authorized such a withdrawal. It may be executed at most once per withdrawal period for the given permission. On execution, amount_to_withdraw is transferred from withdraw_from_account to withdraw_to_account, assuming amount_to_withdraw is within the withdrawal limit. The withdrawal permission will be updated to note that the withdrawal for the current period has occurred, and further withdrawals will not be permitted until the next withdrawal period, assuming the permission has not expired. This operation may be executed at any time within the current withdrawal period. More...
 
struct  graphene::protocol::withdraw_permission_delete_operation
 Delete an existing withdrawal permissionThis operation cancels a withdrawal permission, thus preventing any future withdrawals using that permission. More...
 
struct  graphene::protocol::witness_create_operation
 Create a witness object, as a bid to hold a witness position on the network.Accounts which wish to become witnesses may use this operation to create a witness object which stakeholders may vote on to approve its position as a witness. More...
 
struct  graphene::protocol::witness_update_operation
 Update a witness object's URL and block signing key. More...
 
struct  graphene::protocol::worker_create_operation
 Create a new worker object. More...
 
class  graphene::protocol::limit_order_create_operation
 instructs the blockchain to attempt to sell one asset for anotherThe blockchain will atempt to sell amount_to_sell.asset_id for as much min_to_receive.asset_id as possible. The fee will be paid by the seller's account. Market fees will apply as specified by the issuer of both the selling asset and the receiving asset as a percentage of the amount exchanged. More...
 
class  graphene::protocol::override_transfer_operation
 Allows the issuer of an asset to transfer an asset from any account to any account if they have override_authority. More...
 

Typedefs

using graphene::protocol::extendable_operation_result = extension< extendable_operation_result_dtl >
 
using graphene::protocol::operation_result = fc::static_variant< void_result, object_id_type, asset, generic_operation_result, generic_exchange_operation_result, extendable_operation_result >
 
using graphene::protocol::future_extensions = static_variant< void_t >
 
using graphene::protocol::extensions_type = future_extensions::flat_set_type
 
using graphene::protocol::operation = fc::static_variant< transfer_operation, limit_order_create_operation, limit_order_cancel_operation, call_order_update_operation, fill_order_operation, account_create_operation, account_update_operation, account_whitelist_operation, account_upgrade_operation, account_transfer_operation, asset_create_operation, asset_update_operation, asset_update_bitasset_operation, asset_update_feed_producers_operation, asset_issue_operation, asset_reserve_operation, asset_fund_fee_pool_operation, asset_settle_operation, asset_global_settle_operation, asset_publish_feed_operation, witness_create_operation, witness_update_operation, proposal_create_operation, proposal_update_operation, proposal_delete_operation, withdraw_permission_create_operation, withdraw_permission_update_operation, withdraw_permission_claim_operation, withdraw_permission_delete_operation, committee_member_create_operation, committee_member_update_operation, committee_member_update_global_parameters_operation, vesting_balance_create_operation, vesting_balance_withdraw_operation, worker_create_operation, custom_operation, assert_operation, balance_claim_operation, override_transfer_operation, transfer_to_blind_operation, blind_transfer_operation, transfer_from_blind_operation, asset_settle_cancel_operation, asset_claim_fees_operation, fba_distribute_operation, bid_collateral_operation, execute_bid_operation, asset_claim_pool_operation, asset_update_issuer_operation, htlc_create_operation, htlc_redeem_operation, htlc_redeemed_operation, htlc_extend_operation, htlc_refund_operation, custom_authority_create_operation, custom_authority_update_operation, custom_authority_delete_operation, ticket_create_operation, ticket_update_operation, liquidity_pool_create_operation, liquidity_pool_delete_operation, liquidity_pool_deposit_operation, liquidity_pool_withdraw_operation, liquidity_pool_exchange_operation, samet_fund_create_operation, samet_fund_delete_operation, samet_fund_update_operation, samet_fund_borrow_operation, samet_fund_repay_operation, credit_offer_create_operation, credit_offer_delete_operation, credit_offer_update_operation, credit_offer_accept_operation, credit_deal_repay_operation, credit_deal_expired_operation >
 

Detailed Description

A set of valid comands for mutating the globally shared state.

An operation can be thought of like a function that will modify the global shared state of the blockchain. The members of each struct are like function arguments and each operation can potentially generate a return value.

Operations can be grouped into transactions (transaction) to ensure that they occur in a particular order and that all operations apply successfully or no operations apply.

Each operation is a fully defined state transition and can exist in a transaction on its own.

Design Principles

Operations have been carefully designed to include all of the information necessary to interpret them outside the context of the blockchain. This means that information about current chain state is included in the operation even though it could be inferred from a subset of the data. This makes the expected outcome of each operation well defined and easily understood without access to chain state.

Balance Calculation Principle

We have stipulated that the current account balance may be entirely calculated from just the subset of operations that are relevant to that account. There should be no need to process the entire blockchain inorder to know your account's balance.

Explicit Fee Principle

Blockchain fees can change from time to time and it is important that a signed transaction explicitly agree to the fees it will be paying. This aids with account balance updates and ensures that the sender agreed to the fee prior to making the transaction.

Explicit Authority

Each operation shall contain enough information to know which accounts must authorize the operation. This principle enables authority verification to occur in a centralized, optimized, and parallel manner.

Explicit Relevant Accounts

Each operation contains enough information to enumerate all accounts for which the operation should apear in its account history. This principle enables us to easily define and enforce the Balance Calculation Principle. This is superset of the Explicit Authority

Typedef Documentation

◆ extendable_operation_result

Definition at line 113 of file base.hpp.

◆ extensions_type

A flat_set is used to make sure that only one extension of each type is added and that they are added in order.

Note
static_variant compares only the type tag and not the content.

Definition at line 156 of file base.hpp.

◆ future_extensions

For future expansion many structus include a single member of type extensions_type that can be changed when updating a protocol. You can always add new types to a static_variant without breaking backward compatibility.

Definition at line 147 of file base.hpp.

◆ operation

using graphene::protocol::operation = typedef fc::static_variant< transfer_operation, limit_order_create_operation, limit_order_cancel_operation, call_order_update_operation, fill_order_operation, account_create_operation, account_update_operation, account_whitelist_operation, account_upgrade_operation, account_transfer_operation, asset_create_operation, asset_update_operation, asset_update_bitasset_operation, asset_update_feed_producers_operation, asset_issue_operation, asset_reserve_operation, asset_fund_fee_pool_operation, asset_settle_operation, asset_global_settle_operation, asset_publish_feed_operation, witness_create_operation, witness_update_operation, proposal_create_operation, proposal_update_operation, proposal_delete_operation, withdraw_permission_create_operation, withdraw_permission_update_operation, withdraw_permission_claim_operation, withdraw_permission_delete_operation, committee_member_create_operation, committee_member_update_operation, committee_member_update_global_parameters_operation, vesting_balance_create_operation, vesting_balance_withdraw_operation, worker_create_operation, custom_operation, assert_operation, balance_claim_operation, override_transfer_operation, transfer_to_blind_operation, blind_transfer_operation, transfer_from_blind_operation, asset_settle_cancel_operation, asset_claim_fees_operation, fba_distribute_operation, bid_collateral_operation, execute_bid_operation, asset_claim_pool_operation, asset_update_issuer_operation, htlc_create_operation, htlc_redeem_operation, htlc_redeemed_operation, htlc_extend_operation, htlc_refund_operation, custom_authority_create_operation, custom_authority_update_operation, custom_authority_delete_operation, ticket_create_operation, ticket_update_operation, liquidity_pool_create_operation, liquidity_pool_delete_operation, liquidity_pool_deposit_operation, liquidity_pool_withdraw_operation, liquidity_pool_exchange_operation, samet_fund_create_operation, samet_fund_delete_operation, samet_fund_update_operation, samet_fund_borrow_operation, samet_fund_repay_operation, credit_offer_create_operation, credit_offer_delete_operation, credit_offer_update_operation, credit_offer_accept_operation, credit_deal_repay_operation, credit_deal_expired_operation >

Defines the set of valid operations as a discriminated union type.

Definition at line 131 of file operations.hpp.

◆ operation_result

Definition at line 122 of file base.hpp.