Compare commits
7 commits
1.5.25-bet
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3d967a2d7 | ||
|
|
178756bd34 | ||
|
|
1f70857d64 | ||
|
|
97e85a849d | ||
|
|
dc4cdd6e4b | ||
|
|
1472066af6 | ||
|
|
a641b8e93f |
21 changed files with 312 additions and 297 deletions
|
|
@ -134,11 +134,8 @@ RUN \
|
|||
libsodium-dev
|
||||
|
||||
RUN \
|
||||
git clone https://github.com/libbitcoin/libbitcoin-build.git && \
|
||||
cd libbitcoin-build && \
|
||||
git reset --hard 92c215fc1ffa272bab4d485d369d0306db52d69d && \
|
||||
./generate3.sh && \
|
||||
cd ../libbitcoin-explorer && \
|
||||
git clone --branch version3.8.0 --depth 1 https://gitlab.com/PBSA/peerplays-1.0/libbitcoin-explorer.git && \
|
||||
cd libbitcoin-explorer && \
|
||||
./install.sh && \
|
||||
ldconfig && \
|
||||
rm -rf /home/peerplays/src/*
|
||||
|
|
|
|||
|
|
@ -134,11 +134,8 @@ RUN \
|
|||
libsodium-dev
|
||||
|
||||
RUN \
|
||||
git clone https://github.com/libbitcoin/libbitcoin-build.git && \
|
||||
cd libbitcoin-build && \
|
||||
git reset --hard 92c215fc1ffa272bab4d485d369d0306db52d69d && \
|
||||
./generate3.sh && \
|
||||
cd ../libbitcoin-explorer && \
|
||||
git clone --branch version3.8.0 --depth 1 https://gitlab.com/PBSA/peerplays-1.0/libbitcoin-explorer.git && \
|
||||
cd libbitcoin-explorer && \
|
||||
./install.sh && \
|
||||
ldconfig && \
|
||||
rm -rf /home/peerplays/src/*
|
||||
|
|
|
|||
|
|
@ -77,11 +77,8 @@ sudo ldconfig
|
|||
|
||||
libbitcoin-explorer setup:
|
||||
```
|
||||
git clone https://github.com/libbitcoin/libbitcoin-build.git
|
||||
cd libbitcoin-build
|
||||
git reset --hard 92c215fc1ffa272bab4d485d369d0306db52d69d
|
||||
./generate3.sh
|
||||
cd ../libbitcoin-explorer
|
||||
git clone --branch version3.8.0 --depth 1 https://gitlab.com/PBSA/peerplays-1.0/libbitcoin-explorer.git
|
||||
cd libbitcoin-explorer
|
||||
sudo ./install.sh
|
||||
sudo ldconfig
|
||||
```
|
||||
|
|
|
|||
|
|
@ -2197,7 +2197,7 @@ vector<variant> database_api_impl::lookup_vote_ids(const vector<vote_id_type> &v
|
|||
case vote_id_type::committee: {
|
||||
auto itr = committee_idx.find(id);
|
||||
if (itr != committee_idx.end())
|
||||
result.emplace_back(variant(*itr, 1));
|
||||
result.emplace_back(variant(*itr, 2)); // Depth of committee_member_object is 1, add 1 to be safe
|
||||
else
|
||||
result.emplace_back(variant());
|
||||
break;
|
||||
|
|
@ -2205,7 +2205,7 @@ vector<variant> database_api_impl::lookup_vote_ids(const vector<vote_id_type> &v
|
|||
case vote_id_type::witness: {
|
||||
auto itr = witness_idx.find(id);
|
||||
if (itr != witness_idx.end())
|
||||
result.emplace_back(variant(*itr, 1));
|
||||
result.emplace_back(variant(*itr, 2)); // Depth of witness_object is 1, add 1 here to be safe
|
||||
else
|
||||
result.emplace_back(variant());
|
||||
break;
|
||||
|
|
@ -2213,11 +2213,15 @@ vector<variant> database_api_impl::lookup_vote_ids(const vector<vote_id_type> &v
|
|||
case vote_id_type::worker: {
|
||||
auto itr = for_worker_idx.find(id);
|
||||
if (itr != for_worker_idx.end()) {
|
||||
result.emplace_back(variant(*itr, 1));
|
||||
result.emplace_back(variant(*itr, 4)); // Depth of worker_object is 3, add 1 here to be safe.
|
||||
// If we want to extract the balance object inside,
|
||||
// need to increase this value
|
||||
} else {
|
||||
auto itr = against_worker_idx.find(id);
|
||||
if (itr != against_worker_idx.end()) {
|
||||
result.emplace_back(variant(*itr, 1));
|
||||
result.emplace_back(variant(*itr, 4)); // Depth of worker_object is 3, add 1 here to be safe.
|
||||
// If we want to extract the balance object inside,
|
||||
// need to increase this value
|
||||
} else {
|
||||
result.emplace_back(variant());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -386,23 +386,14 @@ vector<uint64_t> database::get_random_numbers(uint64_t minimum, uint64_t maximum
|
|||
|
||||
bool database::is_asset_creation_allowed(const string &symbol)
|
||||
{
|
||||
time_point_sec now = head_block_time();
|
||||
std::unordered_set<std::string> post_son_hf_symbols = {"ETH", "USDT", "BNB", "ADA", "DOGE", "XRP", "USDC", "DOT", "UNI", "BUSD", "BCH", "LTC", "SOL", "LINK", "MATIC", "THETA",
|
||||
"WBTC", "XLM", "ICP", "DAI", "VET", "ETC", "TRX", "FIL", "XMR", "EGR", "EOS", "SHIB", "AAVE", "CRO", "ALGO", "AMP", "BTCB",
|
||||
"BSV", "KLAY", "CAKE", "FTT", "LEO", "XTZ", "TFUEL", "MIOTA", "LUNA", "NEO", "ATOM", "MKR", "FEI", "WBNB", "UST", "AVAX",
|
||||
"STEEM", "HIVE", "HBD", "SBD", "BTS"};
|
||||
if (symbol == "BTC")
|
||||
{
|
||||
if (now < HARDFORK_SON_TIME)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (post_son_hf_symbols.find(symbol) != post_son_hf_symbols.end())
|
||||
{
|
||||
if (now >= HARDFORK_SON_TIME)
|
||||
if (head_block_time() < HARDFORK_SON_TIME)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ struct worker_pay_visitor
|
|||
worker.pay_worker(pay, db);
|
||||
}
|
||||
};
|
||||
|
||||
void database::update_worker_votes()
|
||||
{
|
||||
auto& idx = get_index_type<worker_index>();
|
||||
|
|
@ -185,6 +186,28 @@ void database::update_worker_votes()
|
|||
}
|
||||
}
|
||||
|
||||
void database::hotfix_2024()
|
||||
{
|
||||
if (head_block_time() >= HARDFORK_HOTFIX_2024_TIME)
|
||||
{
|
||||
if (get_chain_id().str() == "6b6b5f0ce7a36d323768e534f3edb41c6d6332a541a95725b98e28d140850134")
|
||||
{
|
||||
const auto& vb_idx = get_index_type<vesting_balance_index>().indices().get<by_id>();
|
||||
auto vbo = vb_idx.find(vesting_balance_id_type(388));
|
||||
if (vbo != vb_idx.end())
|
||||
{
|
||||
if (vbo->owner == account_id_type(14786))
|
||||
{
|
||||
modify(*vbo, [&]( vesting_balance_object& _vbo)
|
||||
{
|
||||
_vbo.owner = account_id_type(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void database::pay_sons_before_hf_ethereum()
|
||||
{
|
||||
const auto now = head_block_time();
|
||||
|
|
@ -2510,6 +2533,7 @@ void database::perform_chain_maintenance(const signed_block& next_block, const g
|
|||
update_active_committee_members();
|
||||
update_active_sons();
|
||||
update_worker_votes();
|
||||
hotfix_2024();
|
||||
|
||||
const dynamic_global_property_object& dgpo = get_dynamic_global_properties();
|
||||
|
||||
|
|
|
|||
7
libraries/chain/hardfork.d/HOTFIX_2024.hf
Normal file
7
libraries/chain/hardfork.d/HOTFIX_2024.hf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef HARDFORK_HOTFIX_2024_TIME
|
||||
#ifdef BUILD_PEERPLAYS_TESTNET
|
||||
#define HARDFORK_HOTFIX_2024_TIME (fc::time_point_sec::from_iso_string("2023-12-20T00:00:00"))
|
||||
#else
|
||||
#define HARDFORK_HOTFIX_2024_TIME (fc::time_point_sec::from_iso_string("2023-12-20T00:00:00"))
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -2,6 +2,6 @@
|
|||
#ifdef BUILD_PEERPLAYS_TESTNET
|
||||
#define HARDFORK_SON_FOR_ETHEREUM_TIME (fc::time_point_sec::from_iso_string("2023-07-17T12:00:00"))
|
||||
#else
|
||||
#define HARDFORK_SON_FOR_ETHEREUM_TIME (fc::time_point_sec::from_iso_string("2023-07-31T12:00:00"))
|
||||
#define HARDFORK_SON_FOR_ETHEREUM_TIME (fc::time_point_sec::from_iso_string("2023-10-24T12:00:00"))
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -594,6 +594,7 @@ namespace graphene { namespace chain {
|
|||
const flat_map<sidechain_type, vector<son_sidechain_info> >& new_active_sons );
|
||||
void update_son_wallet( const flat_map<sidechain_type, vector<son_sidechain_info> >& new_active_sons );
|
||||
void update_worker_votes();
|
||||
void hotfix_2024();
|
||||
|
||||
public:
|
||||
double calculate_vesting_factor(const account_object& stake_account);
|
||||
|
|
|
|||
|
|
@ -875,13 +875,10 @@ void peerplays_sidechain_plugin_impl::on_applied_block(const signed_block &b) {
|
|||
if (first_block_skipped) {
|
||||
if (son_processing_enabled) {
|
||||
schedule_son_processing();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
const fc::time_point now_fine = fc::time_point::now();
|
||||
const fc::time_point_sec now = now_fine + fc::microseconds(500000);
|
||||
if( plugin.database().get_slot_time(1) >= now )
|
||||
{
|
||||
if (plugin.database().get_slot_time(1) >= now) {
|
||||
son_processing_enabled = true;
|
||||
schedule_son_processing();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue