10 #include <boost/preprocessor/cat.hpp>
89 #define DAYS_TO_SECONDS(X) (60u*60u*24u*X)
91 #define SCORUM_BLOCKCHAIN_VERSION ( version(0, 6, 0) )
93 #define SCORUM_BLOCKCHAIN_HARDFORK_VERSION ( hardfork_version( SCORUM_BLOCKCHAIN_VERSION ) )
95 #define SCORUM_ADDRESS_PREFIX "SCR"
97 #define SCORUM_CURRENCY_PRECISION 9
99 #define SCORUM_DEFAULT_BUDGETS_AUCTION_SET {100, 85, 75, 65}
102 #define SCORUM_SYMBOL (uint64_t(SCORUM_CURRENCY_PRECISION) | (uint64_t('S') << 8) | (uint64_t('C') << 16) | (uint64_t('R') << 24))
104 #define SP_SYMBOL (uint64_t(SCORUM_CURRENCY_PRECISION) | (uint64_t('S') << 8) | (uint64_t('P') << 16))
106 #define SCORUM_MAX_SHARE_SUPPLY share_value_type(100000000e+9)
108 #define SCORUM_VOTE_DUST_THRESHOLD share_type(50)
110 #define SCORUM_ATOMICSWAP_CONTRACT_METADATA_MAX_LENGTH 10*1024
111 #define SCORUM_ATOMICSWAP_SECRET_MAX_LENGTH 1024
114 #define SCORUM_MIN_ACCOUNT_CREATION_FEE asset(SCORUM_VOTE_DUST_THRESHOLD/2, SCORUM_SYMBOL)
116 #define SCORUM_MIN_COMMENT_PAYOUT_SHARE share_type(5)
118 #define SCORUM_MIN_PER_BLOCK_REWARD share_type(1)
120 #define SCORUM_CREATE_ACCOUNT_WITH_SCORUM_MODIFIER 30
122 #define SCORUM_MIN_DELEGATE_VESTING_SHARES_MODIFIER 10
124 #define SCORUM_START_WITHDRAW_COEFFICIENT 10
126 #define SCORUM_ACTIVE_SP_HOLDERS_REWARD_PERIOD (scorum::protocol::detail::get_config().active_sp_holders_reward_period)
128 #define SCORUM_MIN_BET_STAKE_FOR_MATCHING share_type(1)
132 #define SCORUM_BLOCKID_POOL_SIZE (scorum::protocol::detail::get_config().blockid_pool_size)
134 #define SCORUM_CASHOUT_WINDOW_SECONDS (scorum::protocol::detail::get_config().cashout_window_seconds)
136 #define SCORUM_UPVOTE_LOCKOUT (scorum::protocol::detail::get_config().upvote_lockout)
138 #define SCORUM_OWNER_AUTH_RECOVERY_PERIOD (scorum::protocol::detail::get_config().owner_auth_recovery_period)
139 #define SCORUM_ACCOUNT_RECOVERY_REQUEST_EXPIRATION_PERIOD (scorum::protocol::detail::get_config().account_recovery_request_expiration_period)
140 #define SCORUM_OWNER_UPDATE_LIMIT (scorum::protocol::detail::get_config().owner_update_limit)
142 #define SCORUM_REWARDS_INITIAL_SUPPLY_PERIOD_IN_DAYS (scorum::protocol::detail::get_config().rewards_initial_supply_period_in_days)
144 #define SCORUM_GUARANTED_REWARD_SUPPLY_PERIOD_IN_DAYS (scorum::protocol::detail::get_config().guaranted_reward_supply_period_in_days)
145 #define SCORUM_REWARD_INCREASE_THRESHOLD_IN_DAYS (scorum::protocol::detail::get_config().reward_increase_threshold_in_days)
147 #define SCORUM_BUDGETS_LIMIT_PER_OWNER (scorum::protocol::detail::get_config().budgets_limit_per_owner)
149 #define SCORUM_ATOMICSWAP_INITIATOR_REFUND_LOCK_SECS (scorum::protocol::detail::get_config().atomicswap_initiator_refund_lock_secs)
150 #define SCORUM_ATOMICSWAP_PARTICIPANT_REFUND_LOCK_SECS (scorum::protocol::detail::get_config().atomicswap_participant_refund_lock_secs)
152 #define SCORUM_ATOMICSWAP_LIMIT_REQUESTED_CONTRACTS_PER_OWNER (scorum::protocol::detail::get_config().atomicswap_limit_requested_contracts_per_owner)
153 #define SCORUM_ATOMICSWAP_LIMIT_REQUESTED_CONTRACTS_PER_RECIPIENT (scorum::protocol::detail::get_config().atomicswap_limit_requested_contracts_per_recipient)
155 #define SCORUM_VESTING_WITHDRAW_INTERVALS (scorum::protocol::detail::get_config().vesting_withdraw_intervals)
156 #define SCORUM_VESTING_WITHDRAW_INTERVAL_SECONDS (scorum::protocol::detail::get_config().vesting_withdraw_interval_seconds)
158 #define SCORUM_MIN_VOTE_INTERVAL_SEC (scorum::protocol::detail::get_config().min_vote_interval_sec)
160 #define SCORUM_DB_FREE_MEMORY_THRESHOLD_MB (scorum::protocol::detail::get_config().db_free_memory_threshold_mb)
164 #define SCORUM_REGISTRATION_BONUS_LIMIT_PER_MEMBER_PER_N_BLOCK 100
166 #define SCORUM_REGISTRATION_BONUS_LIMIT_PER_MEMBER_N_BLOCK 2
168 #define SCORUM_REGISTRATION_COMMITTEE_MAX_MEMBERS_LIMIT 30
169 #define SCORUM_DEVELOPMENT_COMMITTEE_MAX_MEMBERS_LIMIT 30
171 #define SCORUM_BLOCK_INTERVAL 3
172 #define SCORUM_BLOCKS_PER_YEAR (365*24*60*60/SCORUM_BLOCK_INTERVAL)
173 #define SCORUM_BLOCKS_PER_DAY (24*60*60/SCORUM_BLOCK_INTERVAL)
174 #define SCORUM_BLOCKS_PER_HOUR (60*60/SCORUM_BLOCK_INTERVAL)
175 #define SCORUM_START_MINER_VOTING_BLOCK (SCORUM_BLOCKS_PER_DAY * 30)
177 #define SCORUM_MAX_VOTED_WITNESSES (scorum::protocol::detail::get_config().scorum_max_voted_witnesses)
178 #define SCORUM_MAX_RUNNER_WITNESSES (scorum::protocol::detail::get_config().scorum_max_witnesses - scorum::protocol::detail::get_config().scorum_max_voted_witnesses)
179 #define SCORUM_MAX_WITNESSES (scorum::protocol::detail::get_config().scorum_max_witnesses)
180 #define SCORUM_MAX_WITNESSES_LIMIT 21
181 #define SCORUM_WITNESS_MISSED_BLOCKS_THRESHOLD SCORUM_BLOCKS_PER_DAY/2
182 #define SCORUM_HARDFORK_REQUIRED_WITNESSES (scorum::protocol::detail::get_config().scorum_hardfork_required_witnesses)
184 #define SCORUM_MAX_TIME_UNTIL_EXPIRATION (60*60)
185 #define SCORUM_MAX_MEMO_SIZE 2048
186 #define SCORUM_MAX_PROXY_RECURSION_DEPTH 4
188 #define SCORUM_MAX_WITHDRAW_ROUTES 10
189 #define SCORUM_SAVINGS_WITHDRAW_TIME (fc::days(3))
190 #define SCORUM_SAVINGS_WITHDRAW_REQUEST_LIMIT 100
191 #define SCORUM_VOTE_REGENERATION_SECONDS (scorum::protocol::detail::get_config().vote_regeneration_seconds)
192 #define SCORUM_MAX_VOTE_CHANGES 3
193 #define SCORUM_REVERSE_AUCTION_WINDOW_SECONDS (scorum::protocol::detail::get_config().reverse_auction_window_seconds)
195 #define SCORUM_MIN_ROOT_COMMENT_INTERVAL (fc::minutes(5))
196 #define SCORUM_MIN_REPLY_INTERVAL (fc::seconds(20))
198 #define SCORUM_MAX_ACCOUNT_WITNESS_VOTES 30
200 #define SCORUM_100_PERCENT 10000
201 #define SCORUM_1_PERCENT (SCORUM_100_PERCENT/100)
202 #define SCORUM_1_TENTH_PERCENT (SCORUM_100_PERCENT/1000)
203 #define SCORUM_PERCENT(X) (uint16_t)(X*SCORUM_1_PERCENT)
205 #define SCORUM_DEV_TEAM_PER_BLOCK_REWARD_PERCENT SCORUM_PERCENT(50)
206 #define SCORUM_WITNESS_PER_BLOCK_REWARD_PERCENT SCORUM_PERCENT(10)
207 #define SCORUM_ACTIVE_SP_HOLDERS_PER_BLOCK_REWARD_PERCENT SCORUM_PERCENT(10)
208 #define SCORUM_CURATION_REWARD_PERCENT SCORUM_PERCENT(25)
209 #define SCORUM_PARENT_COMMENT_REWARD_PERCENT SCORUM_PERCENT(50)
211 #define SCORUM_ADJUST_REWARD_PERCENT SCORUM_PERCENT(5)
213 #define SCORUM_BANDWIDTH_AVERAGE_WINDOW_SECONDS (DAYS_TO_SECONDS(7))
214 #define SCORUM_BANDWIDTH_PRECISION (uint64_t(1000000))
215 #define SCORUM_MAX_COMMENT_DEPTH (6)
216 #define SCORUM_SOFT_MAX_COMMENT_DEPTH (6)
218 #define SCORUM_MAX_RESERVE_RATIO (20000)
220 #define SCORUM_CREATE_ACCOUNT_DELEGATION_RATIO 5
221 #define SCORUM_CREATE_ACCOUNT_DELEGATION_TIME fc::days(30)
222 #define SCORUM_CREATE_ACCOUNT_REG_COMMITTEE_DELEGATION_MAX asset(10'000'000'000, SP_SYMBOL)
224 #define SCORUM_RECENT_RSHARES_DECAY_RATE (scorum::protocol::detail::get_config().recent_rshares_decay_rate)
227 #define SCORUM_MIN_ACCOUNT_NAME_LENGTH 3
228 #define SCORUM_MAX_ACCOUNT_NAME_LENGTH 16
230 #define SCORUM_MIN_PERMLINK_LENGTH 0
231 #define SCORUM_MAX_PERMLINK_LENGTH 256
232 #define SCORUM_MAX_WITNESS_URL_LENGTH 2048
234 #define SCORUM_MAX_SIG_CHECK_DEPTH 2
236 #define SCORUM_MAX_TRANSACTION_SIZE (1024*64)
237 #define SCORUM_MIN_BLOCK_SIZE_LIMIT (SCORUM_MAX_TRANSACTION_SIZE)
238 #define SCORUM_MAX_BLOCK_SIZE (SCORUM_MAX_TRANSACTION_SIZE*SCORUM_BLOCK_INTERVAL*2000)
240 #define SCORUM_MIN_UNDO_HISTORY 10
241 #define SCORUM_MAX_UNDO_HISTORY 10000
243 #define SCORUM_MIN_TRANSACTION_EXPIRATION_LIMIT (SCORUM_BLOCK_INTERVAL * 5)
245 #define SCORUM_IRREVERSIBLE_THRESHOLD (75 * SCORUM_1_PERCENT)
247 #define VIRTUAL_SCHEDULE_LAP_LENGTH ( fc::uint128::max_value() )
249 #define SCORUM_COMMITTEE_QUORUM_PERCENT (60u)
251 #define SCORUM_COMMITTEE_ADVERTISING_MODERATOR_QUORUM_PERCENT (50u)
252 #define SCORUM_COMMITTEE_BETTING_MODERATOR_QUORUM_PERCENT (50u)
253 #define SCORUM_COMMITTEE_BETTING_RESOLVE_DELAY_QUORUM_PERCENT (50u)
254 #define SCORUM_COMMITTEE_TRANSFER_QUORUM_PERCENT (50u)
255 #define SCORUM_COMMITTEE_ADD_EXCLUDE_QUORUM_PERCENT (60u)
257 #define SCORUM_VOTING_POWER_DECAY_PERCENT 5
259 #define SCORUM_MIN_QUORUM_VALUE_PERCENT (50u)
260 #define SCORUM_MAX_QUORUM_VALUE_PERCENT (100u)
262 #define SCORUM_PROPOSAL_LIFETIME_MIN_SECONDS (DAYS_TO_SECONDS(1u))
263 #define SCORUM_PROPOSAL_LIFETIME_MAX_SECONDS (DAYS_TO_SECONDS(10u))
265 #define SCORUM_BETTING_RESOLVE_DELAY_SEC (DAYS_TO_SECONDS(1u))
266 #define SCORUM_BETTING_START_TIME_DIFF_MAX (fc::hours(12))
268 #define SCORUM_BETTING_THRESHOLD_FACTOR 1000
274 #define SCORUM_PROXY_TO_SELF_ACCOUNT (scorum::protocol::account_name_type())
276 #define SCORUM_ROOT_POST_PARENT_ACCOUNT (scorum::protocol::account_name_type())
278 #define SCORUM_MISSING_MODERATOR_ACCOUNT (scorum::protocol::account_name_type())
280 #define SCORUM_BLOGGING_START_DATE (scorum::protocol::detail::get_config().blogging_start_date)
281 #define SCORUM_FIFA_WORLD_CUP_2018_BOUNTY_CASHOUT_DATE (scorum::protocol::detail::get_config().fifa_world_cup_2018_bounty_cashout_date)
282 #define SCORUM_EXPIRATON_FOR_REGISTRATION_BONUS (scorum::protocol::detail::get_config().expiraton_for_registration_bonus)
283 #define SCORUM_WITNESS_REWARD_MIGRATION_DATE (scorum::protocol::detail::get_config().witness_reward_migration_date)
285 #define SCORUM_ADVERTISING_CASHOUT_PERIOD_SEC (scorum::protocol::detail::get_config().advertising_cashout_period_sec)
287 #define SCORUM_MIN_ODDS (scorum::protocol::odds(1001, 1000))
288 #define SCORUM_MIN_STAKE_FOR_MATCHING (share_type(1))
289 #define SCORUM_MIN_BET_STAKE (scorum::protocol::asset(1'000'000, SCORUM_SYMBOL))
291 #define SCORUM_MAX_BET_STAKE (scorum::protocol::asset(9214157878975800, SCORUM_SYMBOL))
293 #define SCORUM_NFT_MODERATOR account_name_type("nft-moderator")
296 #define SCORUM_LOW_MEMORY_NODE (true)
298 #define SCORUM_LOW_MEMORY_NODE (false)
302 #define SCORUM_CLEAR_VOTES (true)
304 #define SCORUM_CLEAR_VOTES (false)
308 #define SCORUM_SKIP_BY_TX_ID (true)
310 #define SCORUM_SKIP_BY_TX_ID (false)
314 #define SCORUM_LIVE_TESTNET (true)
316 #define SCORUM_LIVE_TESTNET (false)
const config & get_config()
void override_config(std::unique_ptr< config > new_config)
const fc::time_point_sec witness_reward_migration_date
const uint8_t scorum_max_witnesses
const uint32_t vesting_withdraw_intervals
const uint32_t blockid_pool_size
const uint32_t budgets_limit_per_owner
const uint32_t guaranted_reward_supply_period_in_days
const fc::time_point_sec fifa_world_cup_2018_bounty_cashout_date
const fc::microseconds owner_auth_recovery_period
const uint32_t cashout_window_seconds
const uint8_t scorum_hardfork_required_witnesses
const fc::microseconds reverse_auction_window_seconds
const uint32_t advertising_cashout_period_sec
const uint32_t rewards_initial_supply_period_in_days
const fc::microseconds account_recovery_request_expiration_period
const uint32_t min_vote_interval_sec
const uint32_t vesting_withdraw_interval_seconds
const fc::time_point_sec blogging_start_date
const uint32_t db_free_memory_threshold_mb
static std::unique_ptr< config > instance
const fc::microseconds owner_update_limit
const fc::microseconds recent_rshares_decay_rate
const uint32_t atomicswap_initiator_refund_lock_secs
const fc::microseconds vote_regeneration_seconds
const fc::microseconds expiraton_for_registration_bonus
const uint8_t scorum_max_voted_witnesses
const fc::microseconds active_sp_holders_reward_period
config()
production config
const fc::time_point_sec initial_date
const fc::microseconds upvote_lockout
const uint32_t atomicswap_limit_requested_contracts_per_owner
const uint32_t atomicswap_participant_refund_lock_secs
const uint32_t reward_increase_threshold_in_days
const uint32_t atomicswap_limit_requested_contracts_per_recipient