Skip to content

Commit

Permalink
SBD_SYMBOL removed completely :)
Browse files Browse the repository at this point in the history
  • Loading branch information
baabeetaa committed Aug 10, 2018
1 parent 13d88b2 commit da17321
Show file tree
Hide file tree
Showing 24 changed files with 8 additions and 116 deletions.
5 changes: 1 addition & 4 deletions contrib/config-for-ahnode.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bcd-trigger = [[0,10],[85,300]]
# Defines a range of accounts to track as a json pair ["from","to"] [from,to]
# track-account-range =

# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation interest_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation
# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation

# Ignore posting operations, only track transfers and account updates
# filter-posting-ops =
Expand Down Expand Up @@ -61,9 +61,6 @@ required-participation = false
# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB
# miner-maximum-block-size =

# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000)
# miner-sbd-interest-rate =

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error
Expand Down
3 changes: 0 additions & 3 deletions contrib/config-for-broadcaster.ini
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ required-participation = false
# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB
# miner-maximum-block-size =

# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000)
# miner-sbd-interest-rate =

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error
Expand Down
3 changes: 0 additions & 3 deletions contrib/config-for-docker.ini
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ required-participation = false
# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB
# miner-maximum-block-size =

# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000)
# miner-sbd-interest-rate =

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error
Expand Down
5 changes: 1 addition & 4 deletions contrib/fullnode.config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bcd-trigger = [[0,10],[85,300]]
# Defines a range of accounts to track as a json pair ["from","to"] [from,to]
# track-account-range =

# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation interest_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation
# history-whitelist-ops = transfer_operation transfer_to_vesting_operation withdraw_vesting_operation transfer_to_savings_operation transfer_from_savings_operation cancel_transfer_from_savings_operation escrow_transfer_operation escrow_approve_operation escrow_dispute_operation escrow_release_operation claim_reward_balance_operation author_reward_operation curation_reward_operation fill_vesting_withdraw_operation fill_transfer_from_savings_operation delegate_vesting_shares_operation return_vesting_delegation_operation comment_benefactor_reward_operation

# Ignore posting operations, only track transfers and account updates
# filter-posting-ops =
Expand Down Expand Up @@ -61,9 +61,6 @@ required-participation = false
# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB
# miner-maximum-block-size =

# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000)
# miner-sbd-interest-rate =

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error
Expand Down
3 changes: 0 additions & 3 deletions doc/example_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ track-account-range = ["exchange_account", "exchange_account"]
# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB
# miner-maximum-block-size =

# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000)
# miner-sbd-interest-rate =

# declare an appender named "stderr" that writes messages to the console
[log.console_appender.stderr]
stream=std_error
Expand Down
1 change: 0 additions & 1 deletion libraries/app/database_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,6 @@ state database_api::get_state( string path )const
switch( item.second.op.which() ) {
case operation::tag<transfer_to_vesting_operation>::value:
case operation::tag<withdraw_vesting_operation>::value:
case operation::tag<interest_operation>::value:
case operation::tag<transfer_operation>::value:
case operation::tag<author_reward_operation>::value:
case operation::tag<curation_reward_operation>::value:
Expand Down
5 changes: 0 additions & 5 deletions libraries/app/impacted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,6 @@ struct get_impacted_account_visitor
_impacted.insert( op.curator );
}

void operator()( const interest_operation& op )
{
_impacted.insert( op.owner );
}

void operator()( const fill_vesting_withdraw_operation& op )
{
_impacted.insert( op.from_account );
Expand Down
5 changes: 0 additions & 5 deletions libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2863,11 +2863,6 @@ void database::adjust_supply( const asset& delta, bool adjust_vesting )
assert( props.current_supply.amount.value >= 0 );
break;
}
// case SBD_SYMBOL:
// props.current_sbd_supply += delta;
// props.virtual_supply = props.current_sbd_supply * get_feed_history().current_median_history + props.current_supply;
// assert( props.current_sbd_supply.amount.value >= 0 );
// break;
default:
FC_ASSERT( false, "invalid symbol" );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ namespace steemit { namespace chain {
asset virtual_supply = asset( 0, STEEM_SYMBOL );
asset current_supply = asset( 0, STEEM_SYMBOL );
asset confidential_supply = asset( 0, STEEM_SYMBOL ); ///< total asset held in confidential balances
asset confidential_sbd_supply = asset( 0, SBD_SYMBOL ); ///< total asset held in confidential balances
asset total_vesting_fund_steem = asset( 0, STEEM_SYMBOL );
asset total_vesting_shares = asset( 0, VESTS_SYMBOL );
asset total_reward_fund_steem = asset( 0, STEEM_SYMBOL );
Expand All @@ -73,11 +72,6 @@ namespace steemit { namespace chain {
total_vesting_fund_steem + pending_rewarded_vesting_steem );
}

/**
* This property defines the interest rate that SBD deposits receive.
*/
uint16_t sbd_interest_rate = 0;

uint16_t sbd_print_rate = STEEMIT_100_PERCENT;

/**
Expand Down Expand Up @@ -134,14 +128,12 @@ FC_REFLECT( steemit::chain::dynamic_global_property_object,
(virtual_supply)
(current_supply)
(confidential_supply)
(confidential_sbd_supply)
(total_vesting_fund_steem)
(total_vesting_shares)
(total_reward_fund_steem)
(total_reward_shares2)
(pending_rewarded_vesting_shares)
(pending_rewarded_vesting_steem)
(sbd_interest_rate)
(sbd_print_rate)
(maximum_block_size)
(current_aslot)
Expand Down
8 changes: 0 additions & 8 deletions libraries/chain/witness_schedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,16 @@ void update_median_witness_props( database& db )
} );
uint32_t median_maximum_block_size = active[active.size()/2]->props.maximum_block_size;

/// sort them by sbd_interest_rate
std::sort( active.begin(), active.end(), [&]( const witness_object* a, const witness_object* b )
{
return a->props.sbd_interest_rate < b->props.sbd_interest_rate;
} );
uint16_t median_sbd_interest_rate = active[active.size()/2]->props.sbd_interest_rate;

db.modify( wso, [&]( witness_schedule_object& _wso )
{
_wso.median_props.account_creation_fee = median_account_creation_fee;
_wso.median_props.maximum_block_size = median_maximum_block_size;
_wso.median_props.sbd_interest_rate = median_sbd_interest_rate;
} );

db.modify( db.get_dynamic_global_properties(), [&]( dynamic_global_property_object& _dgpo )
{
_dgpo.maximum_block_size = median_maximum_block_size;
_dgpo.sbd_interest_rate = median_sbd_interest_rate;
} );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ struct account_stats_bucket_object : public object< account_stats_bucket_object_
uint32_t transfers_from = 0; ///< Account to account transfers from this account
share_type steem_sent = 0; ///< STEEM sent from this account
share_type steem_received = 0; ///< STEEM received by this account
share_type sbd_sent = 0; ///< SBD sent from this account
share_type sbd_received = 0; ///< SBD received by this account
uint32_t sbd_interest_payments = 0; ///< Number of times interest was paid to SBD
share_type sbd_paid_as_interest = 0; ///< Amount of SBD paid as interest
uint32_t transfers_to_vesting = 0; ///< Transfers to vesting by this account. Note: Transfer to vesting from A to B counts as a transfer from A to B followed by a vesting deposit by B.
share_type steem_vested = 0; ///< STEEM vested by the account
share_type new_vests = 0; ///< New VESTS by vesting transfers
Expand Down Expand Up @@ -178,10 +174,6 @@ FC_REFLECT( steemit::account_statistics::account_stats_bucket_object,
(transfers_from)
(steem_sent)
(steem_received)
(sbd_sent)
(sbd_received)
(sbd_interest_payments)
(sbd_paid_as_interest)
(transfers_to_vesting)
(steem_vested)
(new_vests)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ statistics& statistics::operator +=( const bucket_object& b )
this->transactions += b.transactions;
this->transfers += b.transfers;
this->steem_transferred += b.steem_transferred;
this->sbd_transferred += b.sbd_transferred;
this->sbd_paid_as_interest += b.sbd_paid_as_interest;
this->accounts_created += b.paid_accounts_created + b.mined_accounts_created;
this->paid_accounts_created += b.paid_accounts_created;
this->mined_accounts_created += b.mined_accounts_created;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ struct operation_process

if( op.amount.symbol == STEEM_SYMBOL )
b.steem_transferred += op.amount.amount;
else
b.sbd_transferred += op.amount.amount;
});
}

void operator()( const interest_operation& op )const
{
_db.modify( _bucket, [&]( bucket_object& b )
{
b.sbd_paid_as_interest += op.interest.amount;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ struct statistics
uint32_t transactions = 0; ///< Transactions processed
uint32_t transfers = 0; ///< Account to account transfers
share_type steem_transferred = 0; ///< STEEM transferred from account to account
share_type sbd_transferred = 0; ///< SBD transferred from account to account
share_type sbd_paid_as_interest = 0; ///< SBD paid as interest
uint32_t accounts_created = 0; ///< Total accounts created
uint32_t paid_accounts_created = 0; ///< Accounts created with fee
uint32_t mined_accounts_created = 0; ///< Accounts mined for free
Expand Down Expand Up @@ -104,8 +102,6 @@ FC_REFLECT( steemit::blockchain_statistics::statistics,
(transactions)
(transfers)
(steem_transferred)
(sbd_transferred)
(sbd_paid_as_interest)
(accounts_created)
(paid_accounts_created)
(mined_accounts_created)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ struct bucket_object : public object< bucket_object_type, bucket_object >
uint32_t transactions = 0; ///< Transactions processed
uint32_t transfers = 0; ///< Account to account transfers
share_type steem_transferred = 0; ///< STEEM transferred from account to account
share_type sbd_transferred = 0; ///< SBD transferred from account to account
share_type sbd_paid_as_interest = 0; ///< SBD paid as interest
uint32_t paid_accounts_created = 0; ///< Accounts created with fee
uint32_t mined_accounts_created = 0; ///< Accounts mined for free
uint32_t root_comments = 0; ///< Top level root comments
Expand Down Expand Up @@ -136,8 +134,6 @@ FC_REFLECT( steemit::blockchain_statistics::bucket_object,
(transactions)
(transfers)
(steem_transferred)
(sbd_transferred)
(sbd_paid_as_interest)
(paid_accounts_created)
(mined_accounts_created)
(root_comments)
Expand Down
4 changes: 2 additions & 2 deletions libraries/plugins/tags/include/steemit/tags/tags_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class tag_stats_object : public object< tag_stats_object_type, tag_stats_object
id_type id;

tag_name_type tag;
asset total_payout = asset( 0, SBD_SYMBOL );
asset total_payout = asset( 0, STEEM_SYMBOL );
int32_t net_votes = 0;
uint32_t top_posts = 0;
uint32_t comments = 0;
Expand Down Expand Up @@ -401,7 +401,7 @@ class author_tag_stats_object : public object< author_tag_stats_object_type, aut
id_type id;
account_id_type author;
tag_name_type tag;
asset total_rewards = asset( 0, SBD_SYMBOL );
asset total_rewards = asset( 0, STEEM_SYMBOL );
uint32_t total_posts = 0;
};
typedef oid< author_tag_stats_object > author_tag_stats_id_type;
Expand Down
2 changes: 0 additions & 2 deletions libraries/protocol/get_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ fc::variant_object get_config()
result[ "IS_TEST_NET" ] = false;
#endif

result["SBD_SYMBOL"] = SBD_SYMBOL;
result["STEEMIT_100_PERCENT"] = STEEMIT_100_PERCENT;
result["STEEMIT_1_PERCENT"] = STEEMIT_1_PERCENT;
result["STEEMIT_1_TENTH_PERCENT"] = STEEMIT_1_TENTH_PERCENT;
Expand All @@ -41,7 +40,6 @@ fc::variant_object get_config()
result["STEEMIT_CREATE_ACCOUNT_DELEGATION_RATIO"] = STEEMIT_CREATE_ACCOUNT_DELEGATION_RATIO;
result["STEEMIT_CREATE_ACCOUNT_DELEGATION_TIME"] = STEEMIT_CREATE_ACCOUNT_DELEGATION_TIME;
result["STEEMIT_CREATE_ACCOUNT_WITH_STEEM_MODIFIER"] = STEEMIT_CREATE_ACCOUNT_WITH_STEEM_MODIFIER;
result["STEEMIT_DEFAULT_SBD_INTEREST_RATE"] = STEEMIT_DEFAULT_SBD_INTEREST_RATE;
result["STEEMIT_FREE_TRANSACTIONS_WITH_NEW_ACCOUNT"] = STEEMIT_FREE_TRANSACTIONS_WITH_NEW_ACCOUNT;
result["STEEMIT_GENESIS_TIME"] = STEEMIT_GENESIS_TIME;
result["STEEMIT_HARDFORK_REQUIRED_WITNESSES"] = STEEMIT_HARDFORK_REQUIRED_WITNESSES;
Expand Down
3 changes: 0 additions & 3 deletions libraries/protocol/include/steemit/protocol/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#define VESTS_SYMBOL (uint64_t(6) | (uint64_t('V') << 8) | (uint64_t('E') << 16) | (uint64_t('S') << 24) | (uint64_t('T') << 32) | (uint64_t('S') << 40)) ///< VESTS with 6 digits of precision
#define STEEM_SYMBOL (uint64_t(3) | (uint64_t('T') << 8) | (uint64_t('E') << 16) | (uint64_t('S') << 24) | (uint64_t('T') << 32) | (uint64_t('S') << 40)) ///< TESTS with 3 digits of precision
#define SBD_SYMBOL (uint64_t(3) | (uint64_t('T') << 8) | (uint64_t('B') << 16) | (uint64_t('D') << 24) ) ///< Test Backed Dollars with 3 digits of precision
#define STMD_SYMBOL (uint64_t(3) | (uint64_t('T') << 8) | (uint64_t('S') << 16) | (uint64_t('T') << 24) | (uint64_t('D') << 32) ) ///< Test Dollars with 3 digits of precision

#define STEEMIT_SYMBOL "TEST"
Expand Down Expand Up @@ -49,7 +48,6 @@
#define STEEMIT_CHAIN_ID (fc::sha256::hash("vit"))
#define VESTS_SYMBOL (uint64_t(6) | (uint64_t('V') << 8) | (uint64_t('E') << 16) | (uint64_t('S') << 24) | (uint64_t('T') << 32) | (uint64_t('S') << 40)) ///< VESTS with 6 digits of precision
#define STEEM_SYMBOL (uint64_t(3) | (uint64_t('V') << 8) | (uint64_t('I') << 16) | (uint64_t('T') << 24) ) ///< VIT with 3 digits of precision
#define SBD_SYMBOL (uint64_t(3) | (uint64_t('V') << 8) | (uint64_t('B') << 16) | (uint64_t('D') << 24) ) ///< VIT Backed Dollars with 3 digits of precision
#define STMD_SYMBOL (uint64_t(3) | (uint64_t('V') << 8) | (uint64_t('I') << 16) | (uint64_t('T') << 24) | (uint64_t('D') << 32) ) ///< VIT Dollars with 3 digits of precision
#define STEEMIT_SYMBOL "VIT"
#define STEEMIT_ADDRESS_PREFIX "VIT"
Expand Down Expand Up @@ -123,7 +121,6 @@
#define STEEMIT_100_PERCENT 10000
#define STEEMIT_1_PERCENT (STEEMIT_100_PERCENT/100)
#define STEEMIT_1_TENTH_PERCENT (STEEMIT_100_PERCENT/1000)
#define STEEMIT_DEFAULT_SBD_INTEREST_RATE (0*STEEMIT_1_PERCENT) ///< 10% APR

#define STEEMIT_INFLATION_RATE_START_PERCENT (978)
#define STEEMIT_INFLATION_RATE_STOP_PERCENT (95) // 0.95%
Expand Down
1 change: 0 additions & 1 deletion libraries/protocol/include/steemit/protocol/operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ namespace steemit { namespace protocol {
author_reward_operation,
curation_reward_operation,
comment_reward_operation,
interest_operation,
fill_vesting_withdraw_operation,
shutdown_witness_operation,
fill_transfer_from_savings_operation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,11 @@ namespace steemit { namespace protocol {
* to tune rate limiting and capacity
*/
uint32_t maximum_block_size = STEEMIT_MIN_BLOCK_SIZE_LIMIT * 2;
uint16_t sbd_interest_rate = STEEMIT_DEFAULT_SBD_INTEREST_RATE;

void validate()const
{
FC_ASSERT( account_creation_fee.amount >= STEEMIT_MIN_ACCOUNT_CREATION_FEE);
FC_ASSERT( maximum_block_size >= STEEMIT_MIN_BLOCK_SIZE_LIMIT);
FC_ASSERT( sbd_interest_rate >= 0 );
FC_ASSERT( sbd_interest_rate <= STEEMIT_100_PERCENT );
}
};

Expand Down Expand Up @@ -747,7 +744,7 @@ FC_REFLECT( steemit::protocol::cancel_transfer_from_savings_operation, (from)(re
FC_REFLECT( steemit::protocol::report_over_production_operation, (reporter)(first_block)(second_block) )
FC_REFLECT( steemit::protocol::pow2, (input)(pow_summary) )
FC_REFLECT( steemit::protocol::pow2_input, (worker_account)(prev_block)(nonce) )
FC_REFLECT( steemit::protocol::chain_properties, (account_creation_fee)(maximum_block_size)(sbd_interest_rate) );
FC_REFLECT( steemit::protocol::chain_properties, (account_creation_fee)(maximum_block_size));
FC_REFLECT( steemit::protocol::account_create_operation,
(fee)
(creator)
Expand Down
Loading

0 comments on commit da17321

Please sign in to comment.