BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet 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 assets. More...
 
struct  graphene::protocol::account_upgrade_operation
 Manage an account's membership status. More...
 
struct  graphene::protocol::account_transfer_operation
 transfers the account to another account while clearing the white list More...
 
struct  graphene::protocol::assert_operation
 assert that some conditions are true. More...
 
struct  graphene::protocol::asset_create_operation
 
struct  graphene::protocol::asset_settle_operation
 Schedules a market-issued asset for automatic settlement. More...
 
struct  graphene::protocol::asset_fund_fee_pool_operation
 
struct  graphene::protocol::asset_update_operation
 Update options common to all assets. More...
 
struct  graphene::protocol::asset_update_bitasset_operation
 Update options specific to BitAssets. More...
 
struct  graphene::protocol::asset_update_feed_producers_operation
 Update the set of feed-producing accounts for a BitAsset. More...
 
struct  graphene::protocol::asset_publish_feed_operation
 Publish price feeds for market-issued assets. 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 asset. 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. More...
 
struct  graphene::protocol::committee_member_update_operation
 Update a committee_member object. More...
 
struct  graphene::protocol::committee_member_update_global_parameters_operation
 Used by committee_members to update the global parameters of the blockchain. More...
 
struct  graphene::protocol::credit_offer_create_operation
 Create a new credit offer. 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 credit offer, thereby creating 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::credit_deal_update_operation
 Update a credit deal. More...
 
struct  graphene::protocol::custom_operation
 provides a generic way to add higher level protocols on top of witness consensus 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_update_operation
 Update 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_update_operation
 
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 scenarios. More...
 
struct  graphene::protocol::proposal_update_operation
 The proposal_update_operation updates an existing transaction proposal. More...
 
struct  graphene::protocol::proposal_delete_operation
 The proposal_delete_operation deletes an existing transaction proposal. More...
 
struct  graphene::protocol::samet_fund_create_operation
 Create a new SameT Fund object. 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. More...
 
struct  graphene::protocol::vesting_balance_withdraw_operation
 Withdraw from a vesting balance. More...
 
struct  graphene::protocol::withdraw_permission_create_operation
 Create a new withdrawal permission. More...
 
struct  graphene::protocol::withdraw_permission_update_operation
 Update an existing withdraw permission. More...
 
struct  graphene::protocol::withdraw_permission_claim_operation
 Withdraw from an account which has published a withdrawal permission. More...
 
struct  graphene::protocol::withdraw_permission_delete_operation
 Delete an existing withdrawal permission. More...
 
struct  graphene::protocol::witness_create_operation
 Create a witness object, as a bid to hold a witness position on the network. 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 another 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, liquidity_pool_update_operation, credit_deal_update_operation, limit_order_update_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, liquidity_pool_update_operation, credit_deal_update_operation, limit_order_update_operation >

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

Definition at line 134 of file operations.hpp.

◆ operation_result

Definition at line 122 of file base.hpp.