BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
27 #include <graphene/chain/hardfork.hpp>
29 namespace graphene {
namespace chain {
37 const asset_update_operation::ext& extensions );
40 const asset_publish_feed_operation::ext& extensions );
44 const bitasset_options& options);
49 const bitasset_options& options);
52 const asset_claim_fees_operation& op);
82 "The on_fill extension is not allowed until the core-2535 hardfork");
105 else if( HARDFORK_BSIP_48_75_PASSED(
block_time ) )
126 else if( HARDFORK_BSIP_48_75_PASSED(
block_time ) )
155 "Unable to set HTLC options before hardfork 1468");
162 "Cannot set fees for limit_order_update_operation before its hardfork time");
166 "Unable to set Custom Authority Options before hardfork BSIP 40");
168 "Unable to define fees for custom authority operations prior to hardfork BSIP 40");
170 "Unable to define fees for custom authority operations prior to hardfork BSIP 40");
172 "Unable to define fees for custom authority operations prior to hardfork BSIP 40");
176 "Unable to set maker_fee_discount_percent before hardfork BSIP 85");
180 "Unable to set market_fee_network_percent before hardfork BSIP 86");
184 "Unable to define fees for ticket operations prior to hardfork 2103");
186 "Unable to define fees for ticket operations prior to hardfork 2103");
188 if (!HARDFORK_LIQUIDITY_POOL_PASSED(
block_time)) {
190 "Unable to define fees for liquidity pool operations prior to the LP hardfork");
192 "Unable to define fees for liquidity pool operations prior to the LP hardfork");
194 "Unable to define fees for liquidity pool operations prior to the LP hardfork");
196 "Unable to define fees for liquidity pool operations prior to the LP hardfork");
198 "Unable to define fees for liquidity pool operations prior to the LP hardfork");
202 "Unable to define fees for samet fund operations prior to the core-2351 hardfork");
204 "Unable to define fees for samet fund operations prior to the core-2351 hardfork");
206 "Unable to define fees for samet fund operations prior to the core-2351 hardfork");
208 "Unable to define fees for samet fund operations prior to the core-2351 hardfork");
210 "Unable to define fees for samet fund operations prior to the core-2351 hardfork");
214 "Unable to define fees for credit offer operations prior to the core-2362 hardfork");
216 "Unable to define fees for credit offer operations prior to the core-2362 hardfork");
218 "Unable to define fees for credit offer operations prior to the core-2362 hardfork");
220 "Unable to define fees for credit offer operations prior to the core-2362 hardfork");
222 "Unable to define fees for credit offer operations prior to the core-2362 hardfork");
224 "Unable to define fees for credit offer operations prior to the core-2362 hardfork");
228 "Unable to define fees for credit deal update operation prior to the core-2595 hardfork");
232 "Unable to define fees for liquidity pool update operation prior to the core-2604 hardfork");
242 "Memo unavailable until after HARDFORK BSIP64");
245 "HASH160 unavailable until after HARDFORK BSIP64" );
270 FC_ASSERT( HARDFORK_LIQUIDITY_POOL_PASSED(
block_time),
"Not allowed until the LP hardfork" );
273 FC_ASSERT( HARDFORK_LIQUIDITY_POOL_PASSED(
block_time),
"Not allowed until the LP hardfork" );
276 FC_ASSERT( HARDFORK_CORE_2604_PASSED(
block_time),
"Not allowed until the core-2604 hardfork" );
279 FC_ASSERT( HARDFORK_LIQUIDITY_POOL_PASSED(
block_time),
"Not allowed until the LP hardfork" );
282 FC_ASSERT( HARDFORK_LIQUIDITY_POOL_PASSED(
block_time),
"Not allowed until the LP hardfork" );
285 FC_ASSERT( HARDFORK_LIQUIDITY_POOL_PASSED(
block_time),
"Not allowed until the LP hardfork" );
288 FC_ASSERT( HARDFORK_CORE_2351_PASSED(
block_time),
"Not allowed until the core-2351 hardfork" );
291 FC_ASSERT( HARDFORK_CORE_2351_PASSED(
block_time),
"Not allowed until the core-2351 hardfork" );
294 FC_ASSERT( HARDFORK_CORE_2351_PASSED(
block_time),
"Not allowed until the core-2351 hardfork" );
297 FC_ASSERT( HARDFORK_CORE_2351_PASSED(
block_time),
"Not allowed until the core-2351 hardfork" );
300 FC_ASSERT( HARDFORK_CORE_2351_PASSED(
block_time),
"Not allowed until the core-2351 hardfork" );
303 FC_ASSERT( HARDFORK_CORE_2362_PASSED(
block_time),
"Not allowed until the core-2362 hardfork" );
306 FC_ASSERT( HARDFORK_CORE_2362_PASSED(
block_time),
"Not allowed until the core-2362 hardfork" );
309 FC_ASSERT( HARDFORK_CORE_2362_PASSED(
block_time),
"Not allowed until the core-2362 hardfork" );
312 FC_ASSERT( HARDFORK_CORE_2362_PASSED(
block_time),
"Not allowed until the core-2362 hardfork" );
313 if( !HARDFORK_CORE_2595_PASSED(
block_time) ) {
315 "auto_repay unavailable until the core-2595 hardfork");
319 FC_ASSERT( HARDFORK_CORE_2362_PASSED(
block_time),
"Not allowed until the core-2362 hardfork" );
323 FC_ASSERT( HARDFORK_CORE_2595_PASSED(
block_time),
"Not allowed until the core-2595 hardfork" );
328 bool already_contains_proposal_update =
false;
336 FC_ASSERT( !already_contains_proposal_update,
337 "At most one proposal update can be nested in a proposal!" );
338 already_contains_proposal_update =
true;
352 FC_ASSERT(
false,
"Not allowed until hardfork 214");
385 if( block_time < HARDFORK_CORE_214_TIME )
398 "Proposal expiration time is too far in the future." );
401 "Proposal review period must be less than its overall lifetime." );
404 flat_set<account_id_type> tmp_required_active_auths;
405 vector<authority> other;
409 MUST_IGNORE_CUSTOM_OP_REQD_AUTHS( block_time ) );
413 std::set_difference( tmp_required_active_auths.begin(), tmp_required_active_auths.end(),
419 "Proposals containing operations requiring non-account authorities are not yet implemented." );
426 proposal_create_review_period_required,
427 "Review period not given, but at least ${min} required",
428 (
"min", global_parameters.committee_proposal_review_period) );
430 proposal_create_review_period_insufficient,
431 "Review period of ${t} specified, but at least ${min} required",
433 (
"min", global_parameters.committee_proposal_review_period) );
453 proposal.
proposer = o.fee_paying_account;
454 if( o.review_period_seconds )
461 if( chain_time > HARDFORK_CORE_1479_TIME )
463 "Cannot update/delete a proposal with a future id!" );
487 "This proposal is in its review period. No new approvals may be added." );
538 wlog(
"Proposed transaction ${id} failed to apply once approved with exception:\n"
539 "----\n${reason}\n----\nWill try again when it expires.",
557 "Provided authority is not authoritative for this proposal.",
constexpr int64_t GRAPHENE_MAX_SHARE_SUPPLY(1000000000000000LL)
const fc::time_point_sec block_time
void_result do_apply(const proposal_delete_operation &)
vector< operation > operations
The proposal_update_operation updates an existing transaction proposal.
#define FC_CAPTURE_AND_RETHROW(...)
extension< ext > extensions
Extensions.
flat_set< public_key_type > key_approvals_to_remove
const proposal_object * _proposal
void operator()(const graphene::chain::proposal_create_operation &v) const
void operator()(const graphene::chain::asset_update_bitasset_operation &v) const
void check_bitasset_options_hf_bsip77(const fc::time_point_sec &block_time, const bitasset_options &options)
#define GRAPHENE_RELAXED_COMMITTEE_ACCOUNT
Represents the current committee members.
void_result do_evaluate(const proposal_update_operation &o)
asset amount
The amount of asset to transfer from from to to.
tracks the blockchain state in an extensible manner
flat_set< account_id_type > available_owner_approvals
void check_asset_options_hf_core2467(const fc::time_point_sec &next_maint_time, const asset_options &options)
Delete a SameT Fund object.
void operator()(const graphene::chain::htlc_redeem_operation &) const
void check_bitasset_options_hf_bsip87(const fc::time_point_sec &block_time, const bitasset_options &options)
void check_asset_update_extensions_hf_bsip_48_75(const fc::time_point_sec &block_time, const asset_update_operation::ext &extensions)
proposal_id_type proposal
Used to generate a useful error report when an exception is thrown.
time_point_sec head_block_time() const
void operator()(const graphene::chain::credit_deal_repay_operation &) const
void operator()(const T &v) const
void check_asset_claim_fees_hardfork_87_74_collatfee(const fc::time_point_sec &block_time, const asset_claim_fees_operation &op)
void operator()(const graphene::chain::custom_authority_update_operation &) const
processed_transaction _processed_transaction
void operator()(const graphene::chain::asset_publish_feed_operation &v) const
time_point_sec expiration_time
void operator()(const graphene::chain::samet_fund_create_operation &) const
Create a new credit offer.
void check_asset_options_hf_core2281(const fc::time_point_sec &next_maint_time, const asset_options &options)
Create a new custom authority.
Exchange with a liquidity pool.
void operator()(const graphene::chain::asset_create_operation &v) const
flat_set< account_id_type > _required_active_auths
chain_parameters parameters
void operator()(const graphene::chain::liquidity_pool_create_operation &) const
used to transfer accumulated fees back to the issuer's balance.
void_result do_evaluate(const proposal_create_operation &o)
optional< bitasset_options > bitasset_opts
Options only available for BitAssets. MUST be non-null if and only if the asset is market-issued.
fc::time_point_sec expiration
void operator()(const proposal_update_operation &v) const
const T & create(F &&constructor)
flat_set< account_id_type > _required_owner_auths
void_result do_apply(const proposal_update_operation &o)
Create a new liquidity pool.
processed_transaction push_proposal(const proposal_object &proposal)
flat_set< account_id_type > owner_approvals_to_add
void check_asset_options_hf_bsip81(const fc::time_point_sec &block_time, const asset_options &options)
void operator()(const graphene::chain::credit_offer_accept_operation &op) const
transaction proposed_transaction
microseconds seconds(int64_t s)
extension< ext > extensions
void operator()(const T &v) const
Borrow from a SameT Fund.
flat_set< public_key_type > available_key_approvals
flat_set< public_key_type > key_approvals_to_add
void operator()(const graphene::chain::samet_fund_borrow_operation &) const
Create a new SameT Fund object.
Update a SameT Fund object.
Withdraw from a liquidity pool.
Delete a custom authority.
extension< ext > extensions
uint64_t instance() const
bool is_authorized_to_execute(database &db) const
const fc::time_point_sec next_maintenance_time
bitasset_options new_options
void operator()(const graphene::chain::htlc_extend_operation &) const
void operator()(const graphene::chain::credit_offer_update_operation &) const
void check_bitasset_options_hf_bsip_48_75(const fc::time_point_sec &block_time, const bitasset_options &options)
extensions_type extensions
Update options common to all assets.
void operator()(const graphene::chain::ticket_create_operation &) const
extension< ext > extensions
Updates an existing ticket.
void operator()(const graphene::chain::asset_update_operation &v) const
Accept a credit offer, thereby creating a credit deal.
void check_asset_publish_feed_extensions_hf_bsip77(const fc::time_point_sec &block_time, const asset_publish_feed_operation::ext &extensions)
void check_asset_options_hf_bsip_48_75(const fc::time_point_sec &block_time, const asset_options &options)
std::string to_string(log_level ll=log_level::info) const
Transfers an amount of one asset from one account to another.
Deposit to a liquidity pool.
void operator()(const graphene::chain::liquidity_pool_deposit_operation &) const
chain_parameters new_parameters
Update a custom authority.
std::string to_detail_string(log_level ll=log_level::all) const
Update options specific to BitAssets.
void operator()(const graphene::chain::asset_claim_fees_operation &v) const
const proposal_object * _proposal
void operator()(const graphene::chain::samet_fund_delete_operation &) const
account_id_type to
Account to transfer asset to.
Publish price feeds for market-issued assets.
flat_set< account_id_type > active_approvals_to_add
time_point_sec expiration_time
void operator()(const graphene::chain::ticket_update_operation &) const
#define GRAPHENE_COMMITTEE_ACCOUNT
void operator()(const graphene::chain::samet_fund_repay_operation &) const
object_id_type do_apply(const proposal_create_operation &o)
account_id_type from
Account to transfer asset from.
proposal_operation_hardfork_visitor(const database &_db, const fc::time_point_sec bt)
void operator()(const graphene::chain::custom_authority_delete_operation &) const
void check_asset_options_hf_1774(const fc::time_point_sec &block_time, const asset_options &options)
The proposal_delete_operation deletes an existing transaction proposal.
void operation_get_required_authorities(const operation &op, flat_set< account_id_type > &active, flat_set< account_id_type > &owner, vector< authority > &other, bool ignore_custom_operation_required_auths)
Used by committee_members to update the global parameters of the blockchain.
void operator()(const graphene::chain::credit_offer_create_operation &) const
asset_options new_options
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
void operator()(const graphene::chain::liquidity_pool_withdraw_operation &) const
void operator()(const graphene::chain::limit_order_update_operation &) const
bool using_owner_authority
void operator()(const graphene::chain::limit_order_create_operation &op) const
virtual void validate() const
std::shared_ptr< const fee_schedule > current_fees
current schedule of fees
void validate_flags(bool is_market_issued, bool allow_disable_collateral_bid=true) const
void_result do_evaluate(const proposal_delete_operation &o)
account_id_type fee_paying_account
asset_options common_options
void operator()(const graphene::chain::committee_member_update_global_parameters_operation &op) const
A credit deal expired without being fully repaid.
flat_set< account_id_type > owner_approvals_to_remove
uint64_t nested_update_count
void operator()(const graphene::chain::samet_fund_update_operation &) const
transaction _proposed_trx
flat_set< account_id_type > required_active_approvals
necessary to support nested operations inside the proposal_create_operation
flat_set< account_id_type > required_owner_approvals
flat_set< account_id_type > active_approvals_to_remove
instructs the blockchain to attempt to sell one asset for another
#define GRAPHENE_NULL_ACCOUNT
Represents the canonical account with NO authority (nobody can access funds in null account)
optional< uint32_t > review_period_seconds
visitor::result_type visit(visitor &v)
const global_property_object & get_global_properties() const
proposal_id_type proposal
flat_set< account_id_type > available_active_approvals
void operator()(const graphene::chain::credit_offer_delete_operation &) const
void operator()(const graphene::chain::liquidity_pool_update_operation &) const
void operator()(const graphene::chain::liquidity_pool_delete_operation &) const
void operator()(const graphene::chain::htlc_create_operation &op) const
vector< op_wrapper > proposed_ops
uint64_t max_update_instance
#define GRAPHENE_ASSERT(expr, exc_type, FORMAT,...)
void remove(const object &obj)
The proposal_create_operation creates a transaction proposal, for use in multi-sig scenarios.
void check_bitasset_options_hf_bsip74(const fc::time_point_sec &block_time, const bitasset_options &options)
tracks the approval of a partially approved transaction
extension< additional_options_type > extensions
optional< time_point_sec > review_period_time
void operator()(const graphene::chain::credit_deal_update_operation &) const
void operator()(const graphene::chain::custom_authority_create_operation &) const
void operator()(const graphene::chain::liquidity_pool_exchange_operation &) const
hardfork_visitor_1479 vtor_1479
void operator()(const T &v) const
void modify(const T &obj, const Lambda &m)
void check_bitasset_opts_hf_core2467(const fc::time_point_sec &next_maint_time, const bitasset_options &options)