Compare commits

..

51 commits

Author SHA1 Message Date
Vlad Dobromyslov
b6e4fc5c3c Merge branch 'bug/562-fix-libbitcoin-build' into 'develop'
#562 - Point to libbitcoin tag v3.8.0

See merge request PBSA/peerplays!248
2023-10-03 10:56:46 +00:00
Vlad Dobromyslov
f6c6ac2cc8 #562 - Point to libbitcoin tag v3.8.0 2023-10-03 11:57:09 +03:00
Vlad Dobromyslov
56e15b8e80 Merge branch 'beatrice' into develop
Conflicts are resolved:
  libraries/plugins/peerplays_sidechain/sidechain_net_handler.cpp
2023-08-23 15:29:30 +03:00
Vlad Dobromyslov
60207813b0 Merge branch 'bug/559-withdraw-native-asset' into 'develop'
#559 - Don't create withdraw operation if we use native asset

See merge request PBSA/peerplays!245
2023-08-22 11:08:47 +00:00
Vlad Dobromyslov
18589ab198 #559 - Don't create withdraw operation if we use native asset 2023-08-22 12:11:56 +03:00
Vlad Dobromyslov
c1aa13192d Merge branch 'bug/558-schedule_son_processing' into 'develop'
#558 - Fix schedule_son_processing before fully sync

See merge request PBSA/peerplays!244
2023-08-09 13:28:19 +00:00
Vlad Dobromyslov
1520585b17 #558 - Fix schedule_son_processing before fully sync 2023-08-09 14:21:39 +03:00
Vlad Dobromyslov
c055445e6a Merge branch 'bug/556-split-vote_ids' into 'develop'
#556 split vote ids fix

See merge request PBSA/peerplays!243
2023-08-01 12:12:01 +00:00
Vlad Dobromyslov
675eba96bb #556 split vote ids fix 2023-08-01 12:12:01 +00:00
Vlad Dobromyslov
270751cb86 Merge branch 'bug/555-e2e-tests' into 'develop'
#555 - set test-e2e as manual

See merge request PBSA/peerplays!241
2023-07-17 09:33:13 +00:00
Vlad Dobromyslov
8e2d3cf2f6 #555 - set test-e2e as manual 2023-07-17 10:06:14 +03:00
Vlad Dobromyslov
9d687b97d2 Merge branch 'feature/554-DB_VERSION' into 'develop'
#554 - new DB_VERSION

See merge request PBSA/peerplays!239
2023-07-13 11:47:04 +00:00
Vlad Dobromyslov
113790d956 #554 - new DB_VERSION 2023-07-13 09:39:57 +03:00
Vlad Dobromyslov
e24de4f199 Merge branch 'feature/552-son-eth-hf-time' into 'develop'
#552 - NEW HARDFORK TIME FOR SON ETH

See merge request PBSA/peerplays!237
2023-07-06 15:32:52 +00:00
Vlad Dobromyslov
15ebbfe6bb #552 - NEW HARDFORK TIME FOR SON ETH 2023-07-06 15:38:20 +03:00
Vlad Dobromyslov
917e09a80b Merge branch 'bug/551-son-account-operations-count' into 'develop'
#551 - fix is_son_dereg_valid funtion

See merge request PBSA/peerplays!236
2023-07-03 19:50:59 +00:00
Vlad Dobromyslov
646b421308 #551 - fix is_son_dereg_valid funtion 2023-07-03 18:37:54 +03:00
Vlad Dobromyslov
dd2a531364 Merge branch 'bug/548-balance-discrepancies-blind-transfer' into 'develop'
#548 - Fix blind_transfer before and after ETH HARDFORK

See merge request PBSA/peerplays!234
2023-07-01 11:51:01 +00:00
Vlad Dobromyslov
ae0a895daf #548 - Fix blind_transfer before and after ETH HARDFORK 2023-07-01 11:51:01 +00:00
Vlad Dobromyslov
8530228189 Merge branch 'feature/remove-image-e2e-tests' into 'develop'
Remove unneeded docker images at the end of the pipeline

See merge request PBSA/peerplays!233
2023-06-30 18:33:26 +00:00
Milo M
85fb3fee67 Remove unneeded docker images at the end of the pipeline 2023-06-30 18:33:26 +00:00
Vlad Dobromyslov
2c9fd332d4 Merge branch 'bug/548-balance-discrepancies' into 'develop'
Fix balance discrepancies

See merge request PBSA/peerplays!231
2023-06-19 09:58:13 +00:00
Vlad Dobromyslov
fb01043e55 Fix balance discrepancies 2023-06-19 09:58:12 +00:00
Vlad Dobromyslov
a1186372d2 Merge branch 'bug/550-son_schedule_object' into 'develop'
#550 - update schedule for sidechain type

See merge request PBSA/peerplays!229
2023-06-08 05:28:30 +00:00
Vlad Dobromyslov
3a51723e51 #550 - update schedule for sidechain type 2023-06-08 05:28:30 +00:00
Vlad Dobromyslov
f23244cde0 Merge branch 'bug/549-testnet-sync' into 'develop'
Fix #549 testnet sync

See merge request PBSA/peerplays!228
2023-06-05 09:24:05 +00:00
Vlad Dobromyslov
fee7bc99fa Fix #549 testnet sync 2023-06-05 09:24:04 +00:00
Vlad Dobromyslov
6cf31b1075 Add develop branch to build target 2023-06-05 12:22:54 +03:00
Vlad Dobromyslov
97eaf4575a Merge branch 'beatrice' into develop
Conflicts are resolved:
	.gitlab-ci.yml
2023-06-05 09:32:07 +03:00
Vlad Dobromyslov
d367c308b8 Merge branch 'feature/python-e2e-tests-jm' into 'develop'
Python e2e test

See merge request PBSA/peerplays!221
2023-05-15 10:53:07 +00:00
Milos Milosevic
838a9820f1 Right order of the steps 2023-04-26 13:22:19 +02:00
Vlad Dobromyslov
3e1f38d972 Merge branch 'bug/530-eth-deposit_address' into 'develop'
#530 - fix ETH deposit_address

See merge request PBSA/peerplays!222
2023-04-21 07:15:16 +00:00
Vlad Dobromyslov
dfd3dfae09 #530 - fix ETH deposit_address 2023-04-21 09:21:17 +03:00
Milos Milosevic
1f72b4fbd6 Remove symbolic-ref call 2023-04-21 00:35:02 +02:00
Milos Milosevic
3ee2439d5b Revert changes on Dockerfile 2023-04-20 14:15:30 +02:00
Milos Milosevic
cfecfb457b Pull propper image 2023-04-19 00:23:54 +02:00
Milos Milosevic
25bbacaa88 Add docker prune before run 2023-04-18 16:17:48 +02:00
Milos Milosevic
0175a7d0ec Try the full flow 2023-04-18 13:27:00 +02:00
Milos Milosevic
fd492ca196 Run tests in the end 2023-04-18 12:53:12 +02:00
Milos Milosevic
2a6c917e4c Try through python 2023-04-18 11:14:20 +02:00
Milos Milosevic
6fe15f27b0 Try with rename 2023-04-18 09:47:10 +02:00
Milos Milosevic
d2374aeed9 Try via command line again 2023-04-18 08:13:20 +02:00
Milos Milosevic
6f792db52d Passing locally 2023-04-18 00:22:26 +02:00
Milos Milosevic
1b61016693 docker login still needed 2023-04-17 22:45:05 +02:00
Milos Milosevic
0f375777c2 Quick exec 2023-04-17 22:37:26 +02:00
Milos Milosevic
a2ce65e1ef Add pull image 2023-04-17 08:52:41 +02:00
Milos Milosevic
432876a677 Try different approach 2023-04-16 23:49:51 +02:00
Vlad Dobromyslov
948e7dd5e4 Merge branch 'bug/524-eth-mainnet-tr' into 'develop'
Bug/524-eth-mainnet-tr

See merge request PBSA/peerplays!219
2023-03-29 09:38:55 +00:00
Vlad Dobromyslov
b21f9c4282 Bug/524-eth-mainnet-tr 2023-03-29 09:38:54 +00:00
Vlad Dobromyslov
1586531e13 Merge branch 'bug/develop-518-last_voting_time' into 'develop'
#518 - update update_vote_time when voting for SON

See merge request PBSA/peerplays!217
2023-03-17 09:31:24 +00:00
Vlad Dobromyslov
8e0e20eb6f #518 - update update_vote_time when voting for SON 2023-03-17 11:33:33 +03:00
18 changed files with 282 additions and 306 deletions

View file

@ -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, 2)); // Depth of committee_member_object is 1, add 1 to be safe
result.emplace_back(variant(*itr, 1));
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, 2)); // Depth of witness_object is 1, add 1 here to be safe
result.emplace_back(variant(*itr, 1));
else
result.emplace_back(variant());
break;
@ -2213,15 +2213,11 @@ 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, 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
result.emplace_back(variant(*itr, 1));
} else {
auto itr = against_worker_idx.find(id);
if (itr != against_worker_idx.end()) {
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
result.emplace_back(variant(*itr, 1));
} else {
result.emplace_back(variant());
}

View file

@ -386,14 +386,23 @@ 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 (head_block_time() < HARDFORK_SON_TIME)
if (now < HARDFORK_SON_TIME)
return false;
}
if (post_son_hf_symbols.find(symbol) != post_son_hf_symbols.end())
{
if (now >= HARDFORK_SON_TIME)
return false;
}
return true;
}
}
}
} }

View file

@ -170,7 +170,6 @@ struct worker_pay_visitor
worker.pay_worker(pay, db);
}
};
void database::update_worker_votes()
{
auto& idx = get_index_type<worker_index>();
@ -186,28 +185,6 @@ 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();
@ -2533,7 +2510,6 @@ 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();

View file

@ -1,7 +0,0 @@
#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

View file

@ -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-10-24T12:00:00"))
#define HARDFORK_SON_FOR_ETHEREUM_TIME (fc::time_point_sec::from_iso_string("2023-07-31T12:00:00"))
#endif
#endif

View file

@ -594,7 +594,6 @@ 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);

View file

@ -875,10 +875,13 @@ 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();
}