Compare commits

...

735 commits

Author SHA1 Message Date
Bobinson K B
d3d967a2d7 Merge branch 'hotfix/bookie2024' into 'master'
Bookie 2024

See merge request PBSA/peerplays!259
2023-12-18 06:17:23 +00:00
serkixenos
178756bd34 Bookie 2024 2023-12-18 06:17:22 +00:00
Bobinson K B
1f70857d64 Merge branch 'beatrice' into 'master'
Mainnet release

See merge request PBSA/peerplays!251
2023-10-06 10:50:31 +00:00
Vlad Dobromyslov
97e85a849d Merge branch 'develop' into 'beatrice'
Set HARDFORK_SON_FOR_ETHEREUM_TIME to 24 of October

See merge request PBSA/peerplays!250
2023-10-04 16:51:45 +00:00
Vlad Dobromyslov
dc4cdd6e4b Set HARDFORK_SON_FOR_ETHEREUM_TIME to 24 of October 2023-10-04 16:51:45 +00:00
Vlad Dobromyslov
1472066af6 Merge branch 'develop' into 'beatrice'
Fixes for 1.5.25-beta

See merge request PBSA/peerplays!249
2023-10-03 16:24:00 +00:00
Vlad Dobromyslov
a641b8e93f Fixes for 1.5.25-beta 2023-10-03 16:23:59 +00:00
Vlad Dobromyslov
aa099f960f Merge branch 'develop' into 'beatrice'
Fixes for 1.5.24-beta

See merge request PBSA/peerplays!246
2023-08-23 14:31:39 +00:00
Vlad Dobromyslov
f0654e5ffd Fixes for 1.5.24-beta 2023-08-23 14:31:38 +00:00
Vlad Dobromyslov
9fe351300b Merge branch 'develop' into 'beatrice'
Set test-e2e as manual

See merge request PBSA/peerplays!242
2023-07-17 12:49:53 +00:00
Vlad Dobromyslov
5fd79c3e78 Set test-e2e as manual 2023-07-17 12:49:53 +00:00
Vlad Dobromyslov
b56818b8ae Merge branch 'develop' into 'beatrice'
Change DB_VERSION to PPY2.5

See merge request PBSA/peerplays!240
2023-07-13 16:44:03 +00:00
Vlad Dobromyslov
bc0fbeb707 Change DB_VERSION to PPY2.5 2023-07-13 16:44:03 +00:00
Vlad Dobromyslov
accd334a86 Merge branch 'develop' into 'beatrice'
NEW HARDFORK TIME FOR SON ETH

See merge request PBSA/peerplays!238
2023-07-07 12:10:44 +00:00
Vlad Dobromyslov
84a66c6722 NEW HARDFORK TIME FOR SON ETH 2023-07-07 12:10:44 +00:00
Vlad Dobromyslov
abd446d80b Merge branch 'develop' into 'beatrice'
Fix balance discrepancies in 1.5.23-beta

See merge request PBSA/peerplays!235
2023-07-06 05:31:28 +00:00
Vlad Dobromyslov
93fb57c080 Fix balance discrepancies in 1.5.23-beta 2023-07-06 05:31:28 +00:00
Bobinson K B
a8845ffde9 Merge branch 'develop' into 'beatrice'
Fix issue with balance discrepancies in 1.5.23-beta

See merge request PBSA/peerplays!232
2023-06-20 07:37:24 +00:00
Vlad Dobromyslov
435c1f8e96 Fix issue with balance discrepancies in 1.5.23-beta 2023-06-20 07:37:24 +00:00
Bobinson K B
1123ff6f93 Merge branch 'develop' into 'beatrice'
Fixes for public testnet

See merge request PBSA/peerplays!230
2023-06-09 08:10:26 +00:00
Vlad Dobromyslov
c34415b403 Fixes for public testnet 2023-06-09 08:10:26 +00:00
Christopher Sanborn
daca2813ef Merge branch 'testnet-set-hf-dates' into 'beatrice'
Set Hard Fork dates for testnet and mainnet
2023-05-25 13:25:09 -04:00
Christopher Sanborn
0b37a48b02 Set Hard Fork dates for testnet and main net. 2023-05-25 13:23:05 -04:00
Bobinson K B
e3b10cf1ec Merge branch 'testnet-builds' into 'beatrice'
Updated build rules for mainnet and testnet

See merge request PBSA/peerplays!223
2023-05-17 16:25:03 +00:00
Rily Dunlap
f5c6a6310b Updated build rules for mainnet and testnet 2023-05-17 14:50:10 +00:00
Bobinson K B
75ee6fbed3 Merge branch 'develop' into 'beatrice'
New set of functionality

See merge request PBSA/peerplays!220
2023-05-16 11:46:25 +00:00
Vlad Dobromyslov
7516126d01 New set of functionality 2023-05-16 11:46:25 +00:00
Vlad Dobromyslov
f32a51d03b Merge branch 'develop' into 'beatrice'
Alpha release 06.03.2023

See merge request PBSA/peerplays!215
2023-03-06 16:57:45 +00:00
Vlad Dobromyslov
c421453621 Merge branch 'bug/513-num_son_merge' into 'develop'
num_son no overwriting

See merge request PBSA/peerplays!213
2023-03-06 15:50:17 +00:00
Milo M
54ff842db1 num_son no overwriting 2023-03-06 15:50:17 +00:00
Vlad Dobromyslov
16ba10ffab Merge branch 'feature/SON-connection-pool' into 'develop'
SON connection pool

See merge request PBSA/peerplays!181
2023-03-01 06:01:52 +00:00
timur
79974280c0 SON connection pool 2023-03-01 06:01:52 +00:00
Vlad Dobromyslov
5867a8ae27 Merge branch 'bug/501-connection-pool' into 'develop'
#501 - concurrent_unordered_set for connection

See merge request PBSA/peerplays!212
2023-02-27 13:34:41 +00:00
serkixenos
741534c47f Merge branch 'bug/509-hive-withdrawal' into 'develop'
#509 - fix hive withdrawal processing

See merge request PBSA/peerplays!211
2023-02-24 09:37:55 +00:00
serkixenos
f3227fb33d Merge branch 'bug/421-fix-double' into 'develop'
automated test for nft_lottery

See merge request PBSA/peerplays!208
2023-02-24 09:36:10 +00:00
Milo M
bfb961c7be automated test for nft_lottery 2023-02-24 09:36:10 +00:00
serkixenos
5e08b793c5 Merge branch 'bug/495-hive-wallet-update' into 'develop'
#495 hive wallet update

See merge request PBSA/peerplays!210
2023-02-24 09:31:51 +00:00
Vlad Dobromyslov
7af3d037b5 #495 hive wallet update 2023-02-24 09:31:51 +00:00
Vlad Dobromyslov
2788281062 #501 - concurrent_unordered_set for connection 2023-02-23 17:55:49 +02:00
serkixenos
4e2850f826 Fix libbitcoin build in docker and related README instructions 2023-02-17 05:45:33 +01:00
Vlad Dobromyslov
f477af6771 #509 - fix hive withdrawal processing 2023-02-16 12:45:03 +02:00
serkixenos
80d168e5b6 Merge branch 'bug/421-fix-double' into 'develop'
#421 fix double in consensus of nft_lottery_token_purchase

See merge request PBSA/peerplays!205
2023-02-10 14:50:23 +00:00
Milos Milosevic
e44ed0cfe5 #421 fix double in consensus of nft_lottery_token_purchase 2023-02-10 14:50:23 +00:00
serkixenos
142cf5b903 Merge branch 'develop' into 'beatrice'
Merge develop to beatrice 2023-02

See merge request PBSA/peerplays!206
2023-02-10 13:56:17 +00:00
serkixenos
ebc1529c48 Merge branch 'bug/492-eth-withdrawal' into 'develop'
#492 - fix withdrawal encoders for big numbers

See merge request PBSA/peerplays!207
2023-02-10 13:54:53 +00:00
Vlad Dobromyslov
19e0911d64 #492 - fix withdrawal encoders for big numbers 2023-02-10 13:34:53 +02:00
serkixenos
70cd09495e Merge branch 'feature/libbitcoin-son-final' into 'develop'
Bitcoin SON based on libbitcoin

See merge request PBSA/peerplays!164
2023-02-06 22:48:40 +00:00
Davor Hirunda
e9c7021e16 Bitcoin SON based on libbitcoin 2023-02-06 22:48:40 +00:00
serkixenos
9c9aaa03d3 Merge branch 'bug/506-zero-fees' into 'develop'
#506 - fix load fees from genesis file

See merge request PBSA/peerplays!203
2023-02-06 20:57:51 +00:00
serkixenos
038fa37cc6 Merge branch 'bug/507/bitcoin_regression_detected_on_develop_branch' into 'develop'
Fix the issue for wrong number of signers

See merge request PBSA/peerplays!204
2023-02-06 20:48:11 +00:00
hirunda
73b2ba635b Fix the issue for wrong number of signers 2023-02-06 21:09:28 +01:00
Vlad Dobromyslov
936f13d2a1 #506 - fix load fees from genesis file 2023-02-06 08:14:05 +02:00
Vlad Dobromyslov
fc1cdf2629 Fix build errors active_sidechain_types 2023-02-01 20:54:44 +02:00
serkixenos
71f0806b25 Merge branch 'invalid_son_number_reflection' into 'develop'
Fix replay blockchain

See merge request PBSA/peerplays!202
2023-02-01 17:13:03 +00:00
Vlad Dobromyslov
da3a858aa6 Fix replay blockchain 2023-02-01 17:13:02 +00:00
serkixenos
1883f97be2 Merge branch 'bug/500-primary-wallet-transaction' into 'develop'
#500 - fix son_wallet_update_operation

See merge request PBSA/peerplays!201
2023-02-01 12:35:58 +00:00
serkixenos
559769db2b Merge branch 'feature/473-erc20-support' into 'develop'
#473 erc20-support

See merge request PBSA/peerplays!198
2023-01-31 10:48:45 +00:00
Vlad Dobromyslov
0b64f0cfcc #473 erc20-support 2023-01-31 10:48:45 +00:00
serkixenos
96d737fbc2 Merge branch 'master' into beatrice 2023-01-31 11:45:36 +01:00
Vlad Dobromyslov
d89e5e1f23 #500 - fix son_wallet_update_operation 2023-01-30 19:27:27 +02:00
Bobinson K B
6f472d3d3b Merge branch 'develop' into 'beatrice'
Merge develop to beatrice 2022-12

See merge request PBSA/peerplays!193
2023-01-03 07:33:40 +00:00
serkixenos
cb60cbe5d1 Merge branch 'hotfix/extend_get_block_api' into 'develop'
Streamline get_block API from database and cli wallet

See merge request PBSA/peerplays!197
2022-12-28 07:45:45 +00:00
serkixenos
576c54a260 Merge branch 'bug/499-eth-son_wallet_deposit_process_operation' into 'develop'
#499 - son_wallet_deposit_process_operation approve fix

See merge request PBSA/peerplays!196
2022-12-28 07:45:18 +00:00
serkixenos
2f5e12b28e Merge branch 'bug/496-process_primary_wallet' into 'develop'
#496 process primary wallet

See merge request PBSA/peerplays!195
2022-12-28 07:44:29 +00:00
Vlad Dobromyslov
68fbd6f40b #496 process primary wallet 2022-12-28 07:44:29 +00:00
serkixenos
674b38910d Streamline get_block API from database and cli wallet 2022-12-28 08:23:29 +01:00
Vlad Dobromyslov
d264398a6f #499 - son_wallet_deposit_process_operation approve fix 2022-12-23 15:37:15 +02:00
serkixenos
c1d5691ce2 Merge branch 'feature/nft_get_metadata_by_owner' into 'develop'
Add or revive a few NFT-listing APIs

See merge request PBSA/peerplays!194
2022-12-21 17:45:42 +00:00
timur
ca69a692cc Add or revive a few NFT-listing APIs 2022-12-21 17:45:42 +00:00
serkixenos
bd041bc13f Merge branch 'bug/489-error-message-gas-prediction' into 'develop'
#489 - Fix error message

See merge request PBSA/peerplays!190
2022-12-21 17:24:55 +00:00
serkixenos
6037e89df0 Merge branch 'hive-fix-son-account-owner-authority' into 'develop'
Update Hive's son-account owner authority on primary wallet update

See merge request PBSA/peerplays!192
2022-12-16 04:32:04 +00:00
serkixenos
bb7c534b10 Update Hive's son-account owner authority on primary wallet update 2022-12-16 04:27:31 +01:00
serkixenos
1be6636bbf Merge branch 'bug/api-doc-generation-hotfix-2' into 'develop'
Fix Ubuntu 18 build

See merge request PBSA/peerplays!185
2022-12-16 00:34:34 +00:00
timur
578edc56d8 Fix Ubuntu 18 build 2022-12-16 00:34:33 +00:00
Vlad Dobromyslov
d387e324fe #489 - Fix error message 2022-12-14 15:52:28 +02:00
serkixenos
1bf5c82101 Merge branch 'bug/484-multiple-eth-withdrawals' into 'develop'
#484 multiple eth withdrawals

See merge request PBSA/peerplays!189
2022-12-08 14:03:14 +00:00
Vlad Dobromyslov
4883dfe38d #484 multiple eth withdrawals 2022-12-08 14:03:14 +00:00
serkixenos
249276b009 Merge branch 'feature/479-one-bunch-transaction' into 'develop'
#479 one bunch transaction

See merge request PBSA/peerplays!188
2022-12-08 14:02:53 +00:00
Vlad Dobromyslov
ab1e08a756 #479 one bunch transaction 2022-12-08 14:02:53 +00:00
serkixenos
440e4fbb43 Merge branch 'bug/482-burn-eth-from-son-account' into 'develop'
#482 burn eth from son account

See merge request PBSA/peerplays!186
2022-12-06 12:17:09 +00:00
Vlad Dobromyslov
42b3890a7c #482 burn eth from son account 2022-12-06 12:17:09 +00:00
serkixenos
5dff0830fb Merge branch 'feature/479-one-bunch-transaction' into 'develop'
#479 - Send one transaction for all owners

See merge request PBSA/peerplays!183
2022-12-01 01:53:39 +00:00
Vlad Dobromyslov
c3eab0a80b #479 - Send one transaction for all owners 2022-12-01 01:53:39 +00:00
serkixenos
12c0c66f4b Merge branch 'feature/478-estimate-transaction-fee' into 'develop'
#478 - fix information warning

See merge request PBSA/peerplays!184
2022-12-01 01:53:01 +00:00
Vlad Dobromyslov
b7113c4ff3 #478 - fix information warning 2022-11-28 09:35:00 +02:00
serkixenos
d76b752c8c Merge branch 'develop' into 'beatrice'
Merge develop to beatrice 2022-11

See merge request PBSA/peerplays!180
2022-11-24 17:48:46 +00:00
serkixenos
804376b149 Merge branch 'beatrice' into develop 2022-11-23 17:35:57 +01:00
serkixenos
1b340345f3 Merge branch 'feature/478-estimate-transaction-fee' into 'develop'
#478 estimate transaction fee

See merge request PBSA/peerplays!179
2022-11-22 20:44:07 +00:00
Vlad Dobromyslov
022fdeb40a #478 estimate transaction fee 2022-11-22 20:44:07 +00:00
serkixenos
f6d22466fd Merge branch 'bug/462/investigate_trx_which_caused_mainnet_halt' into 'develop'
Fix for undo crash

See merge request PBSA/peerplays!172
2022-11-15 22:34:05 +00:00
Davor Hirunda
811d68ef4d Fix for undo crash 2022-11-15 22:34:05 +00:00
serkixenos
a6da2a6413 Merge branch 'bug/433-choosing-active-sons' into 'develop'
#433 Down active sons are not substituted

See merge request PBSA/peerplays!177
2022-11-15 22:33:04 +00:00
Milos Milosevic
8853a76752 #433 Down active sons are not substituted 2022-11-15 22:33:04 +00:00
serkixenos
f209ab8ee6 Merge branch 'bug/481-ethereum-listener' into 'develop'
#481 ethereum listener

See merge request PBSA/peerplays!178
2022-11-14 13:42:24 +00:00
Vlad Dobromyslov
9620e3c211 #481 ethereum listener 2022-11-14 13:42:23 +00:00
serkixenos
3ebcd29e10 Merge branch 'bug/476-fix-v-signing-value' into 'develop'
#476 - fix calculating v value from chain id

See merge request PBSA/peerplays!174
2022-11-10 11:35:14 +00:00
serkixenos
d5b2b7aeda Merge branch 'bug/470-get-network_id' into 'develop'
#470 Don't use admin_nodeInfo when get network_id

See merge request PBSA/peerplays!173
2022-11-10 11:35:07 +00:00
Vlad Dobromyslov
759dac5d41 #476 - fix calculating v value from chain id 2022-11-07 12:16:59 +02:00
Bobinson K B
058937a3ee Merge branch 'hotfix/sidechain-address' into 'master'
Hotfix: Fix sidechain address editing

See merge request PBSA/peerplays!171
2022-11-04 11:38:30 +00:00
serkixenos
da73e31038 Hotfix: Fix sidechain address editing 2022-11-04 11:38:30 +00:00
Vlad Dobromyslov
a30325660d #470 Don't use admin_nodeInfo when get network_id 2022-11-04 07:51:22 +02:00
serkixenos
d5d6390030 Merge branch 'bug/461-system_error-exception' into 'develop'
#461 - handle exception when execute POST request

See merge request PBSA/peerplays!165
2022-10-30 02:30:59 +00:00
serkixenos
400c3cfb89 Merge branch 'bug/467-prev-set-active-sons' into 'develop'
#467 - fix create_primary_wallet_transaction signers

See merge request PBSA/peerplays!169
2022-10-30 02:30:22 +00:00
Vlad Dobromyslov
aa90f715fd #467 - fix create_primary_wallet_transaction signers 2022-10-30 02:30:21 +00:00
Davor Hirunda
c3b2a598b4 Fix for undo crash 2022-10-30 03:26:53 +01:00
serkixenos
06bc65cc79 #450 Add documentation for undocumented methods 2022-10-30 03:21:18 +01:00
serkixenos
8e8142235a Merge branch 'bug/issue-463' into 'develop'
#463 Fix unused variable son_count_histogram_buffer in Release mode

See merge request PBSA/peerplays!166
2022-10-19 17:37:23 +00:00
Milos Milosevic
194fa6abfa #463 Fix unused variable son_count_histogram_buffer in Release mode 2022-10-19 17:37:23 +00:00
Vlad Dobromyslov
283fbd28f7 #461 - handle exception when execute POST request 2022-10-18 10:19:03 +03:00
serkixenos
71c113c190 Merge branch 'issue-436-cli_tests' into 'develop'
Updated CLI Tests [Issue 436]

See merge request PBSA/peerplays!159
2022-10-11 00:13:04 +00:00
Meheboob Khan
846366139f Updated CLI Tests [Issue 436] 2022-10-11 00:13:04 +00:00
serkixenos
0856e898bb Merge branch 'update-cli-wallet-docs' into 'develop'
Update cli wallet docs

See merge request PBSA/peerplays!162
2022-10-03 17:34:01 +00:00
serkixenos
4db9f3a15b Update cli wallet docs 2022-10-03 17:34:01 +00:00
serkixenos
1b1df25023 Merge branch 'bug/fix-api-doc-generation-for-map' into 'develop'
Fix API docs generation for map<> and flat_map<>

See merge request PBSA/peerplays!161
2022-10-03 17:31:59 +00:00
serkixenos
f9314a4c0c Merge branch 'bug/457-multithread-son-processing' into 'develop'
bug/457-multithread-son-processing

See merge request PBSA/peerplays!160
2022-10-03 17:04:56 +00:00
Vlad Dobromyslov
d4c015d400 bug/457-multithread-son-processing 2022-10-03 17:04:56 +00:00
timur
e6474f5f2a Fix API docs generation for map<> and flat_map<> 2022-10-01 19:11:54 -03:00
serkixenos
f2f4b57ced Merge branch 'bug/455-sidechain-enabled' into 'develop'
bug/455-sidechain-enabled

See merge request PBSA/peerplays!157
2022-09-27 13:58:07 +00:00
Vlad Dobromyslov
2c95ac0b9d bug/455-sidechain-enabled 2022-09-27 13:58:07 +00:00
serkixenos
9831579bfe Merge branch 'feature/update-debug-node' into 'develop'
Update debug_witness plugin

See merge request PBSA/peerplays!153
2022-09-27 12:25:33 +00:00
timur
2d6dec5943 Update debug_witness plugin 2022-09-27 12:25:33 +00:00
serkixenos
46f4770071 Merge branch 'bug/451-update-son-list-on-maintenance' into 'develop'
bug/451-update-son-list-on-maintenance

See merge request PBSA/peerplays!154
2022-09-27 10:41:35 +00:00
Vlad Dobromyslov
2accee53e2 bug/451-update-son-list-on-maintenance 2022-09-27 10:41:35 +00:00
serkixenos
54a11e7662 Merge branch 'issue-389' into 'develop'
Added functionality to check if the device size is less than 50 MB [Issue 389]

See merge request PBSA/peerplays!151
2022-09-26 20:14:32 +00:00
Meheboob Khan
c1f93f58ee Added functionality to check if the device size is less than 50 MB [Issue 389] 2022-09-26 20:14:31 +00:00
serkixenos
2fd6f60112 Merge branch 'feature/son-for-ethereum' into 'develop'
SON for Ethereum

See merge request PBSA/peerplays!133
2022-09-19 19:23:39 +00:00
serkixenos
5f97eb7662 SON for Ethereum 2022-09-19 19:23:39 +00:00
serkixenos
b4e8b76a30 Merge branch 'bug/fix-wallet-api-doc-generation' into 'develop'
Bug/fix wallet api doc generation

See merge request PBSA/peerplays!152
2022-09-16 02:42:31 +00:00
timur
a9267544de Bug/fix wallet api doc generation 2022-09-16 02:42:31 +00:00
serkixenos
e287d8a845 Merge branch 'issue-430' into 'develop'
Improved get_active_sons and get_son_network_status API/CLI [issue 430]

See merge request PBSA/peerplays!150
2022-09-14 18:03:40 +00:00
Meheboob Khan
0f64947f4a Improved get_active_sons and get_son_network_status API/CLI [issue 430] 2022-09-14 18:03:40 +00:00
serkixenos
b895b52b7b Cherrypick important fixes/cosmetics from feature/son-for-ethereum 2022-09-08 17:13:18 +02:00
serkixenos
9c5aab826d Merge branch 'feature/update-delayed-node' into 'develop'
Update delayed node feature

See merge request PBSA/peerplays!145
2022-09-07 13:57:17 +00:00
serkixenos
6a38fb2382 Update delayed node feature 2022-09-07 13:57:17 +00:00
serkixenos
0a9a324277 Merge branch 'port_net_library' into 'develop'
Port net library

See merge request PBSA/peerplays!147
2022-09-07 13:57:00 +00:00
Meheboob Khan
5c416e3a5b Port net library 2022-09-07 13:57:00 +00:00
serkixenos
9268c31ac4 Code formatting 2022-08-25 17:41:44 +02:00
serkixenos
c4f6f522a4 Merge branch 'bug/fix-unit-tests-develop' into 'develop'
Fix unit test failing on develop branch, #418

See merge request PBSA/peerplays!143
2022-08-25 11:14:17 +00:00
serkixenos
f127495c0e Fix unit test failing on develop branch, #418 2022-08-25 12:21:22 +02:00
serkixenos
9b2c60f76c Merge branch 'feature/son-for-hive-voting' into 'develop'
SON for Hive voting

See merge request PBSA/peerplays!81
2022-07-26 23:17:42 +00:00
serkixenos
22fc780a91 SON for Hive voting 2022-07-26 23:17:42 +00:00
serkixenos
005478e3ef Merge branch 'feature/new-rpc-ws-clients' into 'develop'
Boost Beast based RPC client

See merge request PBSA/peerplays!139
2022-07-26 13:47:16 +00:00
serkixenos
5bfd685684 Boost Beast based RPC client 2022-07-26 13:47:16 +00:00
serkixenos
662139ca22 Fix invalid result of nft_get_total_supply (#399) 2022-07-21 20:51:53 +02:00
serkixenos
6844b74e29 Merge branch 'bug/400-verify_sig' into 'develop'
#400 - fix verify_sig function.

See merge request PBSA/peerplays!138
2022-07-15 17:59:25 +00:00
Vlad Dobromyslov
99ed37e834 #400 - fix verify_sig function. 2022-07-15 17:59:25 +00:00
serkixenos
629a6672fd Merge branch 'feature/357-secp256k1-lib' into 'develop'
#357 secp256k1 lib from libbitcoin

See merge request PBSA/peerplays!118
2022-07-07 00:53:24 +00:00
Vlad Dobromyslov
3b5e928094 #357 secp256k1 lib from libbitcoin 2022-07-07 00:53:23 +00:00
serkixenos
09579fbab1 Fix SON cli tests 2022-07-06 01:07:39 +02:00
serkixenos
ff462234af Merge branch 'bug/394/clean_exit__from_all_threads_on_ctrl_c' into 'develop'
Clean exit from CTRL + C

See merge request PBSA/peerplays!134
2022-07-05 11:48:01 +00:00
Davor Hirunda
873dfd788b Clean exit from CTRL + C 2022-07-05 11:48:01 +00:00
serkixenos
b186a2f0ed Merge branch 'bug/fix-son-count-voting' into 'develop'
#387 Allow changing number of SONs by voting, similar to witnesses

See merge request PBSA/peerplays!129
2022-06-27 12:39:35 +00:00
serkixenos
1a196bfcc2 #387 Allow changing number of SONs by voting, similar to witnesses 2022-06-27 12:39:34 +00:00
Bobinson K B
611a63076b Merge branch 'beatrice' into 'master'
Merge beatrice to master 2022-06

See merge request PBSA/peerplays!131
2022-06-27 07:36:08 +00:00
serkixenos
d234c3a8f8 Set HARDFORK_SON3_TIME to 2022-07-16T00:00:00 2022-06-24 14:39:51 +02:00
serkixenos
bc7b0e7788 Set HARDFORK_SON3_TIME to 2022-07-16T00:00:00 2022-06-24 14:38:38 +02:00
serkixenos
d650e197a9 Add port to sync node endpoints 2022-06-20 14:10:08 +02:00
serkixenos
a7f5e1f603 Add port to sync node endpoints 2022-06-20 14:07:17 +02:00
serkixenos
0a38927b0e Allow querying witness_node version by API 2022-06-17 19:08:59 +02:00
serkixenos
9012e86bd1 Add more mainnet seed nodes 2022-06-17 19:08:47 +02:00
serkixenos
eb2894c3d3 Allow querying witness_node version by API 2022-06-17 19:03:27 +02:00
serkixenos
11834c7f53 Add more mainnet seed nodes 2022-06-17 00:10:21 +02:00
serkixenos
1ae9470dab Code formatting 2022-06-16 04:10:29 +02:00
serkixenos
e575334e30 Merge branch 'bug/issue388' into 'develop'
bug fix 388: add ZMQ_RCVTIMEO, graceful thread shutdown

See merge request PBSA/peerplays!128
2022-06-16 01:16:36 +00:00
serkixenos
1788038224 Add hardcoded seed nodes to the config file 2022-06-16 02:06:11 +02:00
serkixenos
8ce0db6ec3 Add hardcoded seed nodes to the config file 2022-06-16 02:04:58 +02:00
serkixenos
02d898d4dc Silence SON logs when not needed 2022-06-15 06:35:13 +02:00
serkixenos
bcdb355f48 Fix P2P port/endpoint error message 2022-06-15 06:31:38 +02:00
serkixenos
d78e0d0e48 Silence SON logs when not needed 2022-06-15 06:30:33 +02:00
hirunda
4d112936d2 Replace fc::random with std random generator 2022-06-15 05:43:00 +02:00
Vlad Dobromyslov
c102bef768 #345 double-free-or-corruption 2022-06-15 05:41:24 +02:00
serkixenos
092a46ae61 Remove unscheduled hardfork CORE 210 2022-06-15 05:41:17 +02:00
serkixenos
f03cc7ee90 Sidechain API, SONs listener log 2022-06-15 05:28:17 +02:00
serkixenos
3294480e20 Update GitLab CI file, more manual build options 2022-06-15 05:13:10 +02:00
Vlad Dobromyslov
7fd12ccce8 #386 - check valid() for optional<operation_history_object> 2022-06-15 05:09:21 +02:00
Davor Hirunda
03e37896d5 Cancel the thread for sync blocks 2022-06-15 05:09:15 +02:00
Davor Hirunda
bc7d03cb22 Fix for scheduler wrong state 2022-06-15 05:09:06 +02:00
serkixenos
b3e426999d Remove unused libreadline-dev library 2022-06-15 05:08:02 +02:00
serkixenos
ab32415d0c Update GitLab CI file, more manual build options 2022-06-15 05:07:56 +02:00
serkixenos
3152d47eea Update GitLab CI file, more manual build options 2022-06-15 05:07:46 +02:00
serkixenos
8f32e4cdb5 Update README instructions for starting docker containers 2022-06-15 05:05:19 +02:00
serkixenos
b4501167ee Update README instructions for docker build 2022-06-15 05:04:59 +02:00
serkixenos
d13551a277 Remove fc based RNG 2022-06-15 05:04:37 +02:00
Pavel Baykov
9dd0747e5d bug fix 388: add ZMQ_RCVTIMEO, graceful thread shutdown 2022-06-13 17:03:20 -03:00
serkixenos
29189b3897 Merge branch 'bug/386-assert-operation_history_object' into 'develop'
#386 - check valid() for optional<operation_history_object>

See merge request PBSA/peerplays!126
2022-06-10 12:18:54 +00:00
Vlad Dobromyslov
2a373a70f7 #386 - check valid() for optional<operation_history_object> 2022-06-09 21:41:19 +03:00
serkixenos
b05c36b4fe Merge branch 'bug/384/ungraceful_shutdown_on_CTRL+C' into 'develop'
Cancel the thread for sync blocks

See merge request PBSA/peerplays!124
2022-06-08 22:02:40 +00:00
Davor Hirunda
e2d9741af8 Cancel the thread for sync blocks 2022-06-08 22:02:40 +00:00
serkixenos
1846b1709e Merge branch 'feature/enable_sync_with_main_net' into 'develop'
Fix for scheduler wrong state

See merge request PBSA/peerplays!122
2022-06-02 16:18:16 +00:00
Davor Hirunda
2c02591e24 Fix for scheduler wrong state 2022-06-02 16:18:15 +00:00
serkixenos
aa2dea6ddf Remove unused libreadline-dev library 2022-05-25 16:48:38 +02:00
serkixenos
9af213190a Merge branch 'feature/88/disconnect_witness_without_hardfork_info' into 'develop'
Disconnect witness which doesn't provide last hardfork time

See merge request PBSA/peerplays!119
2022-05-24 22:16:10 +00:00
hirunda
0b04faec83 Disconnect witness which doesn't provide last hardfork time 2022-05-24 23:29:57 +02:00
serkixenos
a7b4d1cef5 Merge branch 'feature/gitlabcicd_update' into 'develop'
Update GitLab CI file, more manual build options

See merge request PBSA/peerplays!117
2022-05-22 23:14:42 +00:00
serkixenos
0fd22a9945 Update GitLab CI file, more manual build options 2022-05-20 17:48:30 +02:00
serkixenos
3980512543 Merge branch 'develop' of https://gitlab.com/PBSA/peerplays into develop 2022-05-17 00:52:35 +02:00
serkixenos
fc324559eb Merge branch 'issue/367/disconnecting_non_compatible_witness_nodes_happens_too_late' into 'develop'
Resolving the bug with disconnecting non compatible witness

See merge request PBSA/peerplays!113
2022-05-16 22:49:03 +00:00
serkixenos
f16aa73b3e Fix function name typos, disconnet -> disconnect 2022-05-17 00:32:00 +02:00
serkixenos
ca5dc441a7 Update GitLab CI file, more manual build options 2022-05-16 23:04:30 +02:00
serkixenos
2e55b1818a Update README instructions for starting docker containers 2022-05-16 20:43:24 +02:00
serkixenos
a2702cd1f4 Update README instructions for docker build 2022-05-16 20:43:17 +02:00
serkixenos
564af2e19e Merge branch 'bug/349/error_in_fc_crypto_rand_test' into 'develop'
Replace fc::random with std random generator

See merge request PBSA/peerplays!110
2022-05-16 16:06:23 +00:00
serkixenos
5b4a4d18d8 Remove fc based RNG 2022-05-16 18:03:14 +02:00
serkixenos
23cdcec381 Update README instructions for starting docker containers 2022-05-13 03:26:30 +02:00
serkixenos
82a84a06da Update README instructions for docker build 2022-05-12 13:54:52 +02:00
hirunda
8562a4c655 Resolving the bug with disconnecting non compatible witness 2022-05-11 22:34:02 +02:00
serkixenos
852565dcb1 Merge branch 'beatrice' into develop 2022-05-11 22:27:00 +02:00
serkixenos
d461c718ef Set HARDFORK_SON3_TIME to 2022-05-31T00:00:00 2022-05-11 22:22:46 +02:00
serkixenos
2903fc6446 Fix README build instructions 2022-05-11 22:21:18 +02:00
Pavel Baykov
95c5280be2 fix asserts 2022-05-11 22:13:27 +02:00
serkixenos
ffbe0cd592 Merge branch 'bug/issue366' into 'develop'
fix asserts

See merge request PBSA/peerplays!112
2022-05-11 19:28:08 +00:00
Pavel Baykov
27c77ba74b fix asserts 2022-05-11 03:48:25 -03:00
serkixenos
cb3302160b Fix P2P port/endpoint error message 2022-05-09 16:07:07 +02:00
serkixenos
c79c8987dc Ubuntu 18.04 build support 2022-05-07 02:01:00 +02:00
serkixenos
e0d7a6314a Ubuntu 18.04 build support 2022-05-07 01:54:00 +02:00
hirunda
223d2a528d Replace fc::random with std random generator 2022-05-06 13:08:34 +02:00
serkixenos
62f8983c5e Merge branch 'bug/issue360' into 'develop'
fix bug 360, use zmq_setsockopt

See merge request PBSA/peerplays!109
2022-05-06 01:08:14 +00:00
Pavel Baykov
c973131ed2 fix bug 360, use zmq_setsockopt 2022-05-05 11:10:01 -03:00
serkixenos
0c01935ff4 Merge branch 'ubuntu18.04' into 'develop'
libzmq v4.3.4, cppzmq v4.8.1, cmake v3.23 for Docker Ubuntu 18.04

See merge request PBSA/peerplays!105
2022-05-04 16:46:49 +00:00
Pavel Baykov
520505b667 libzmq v4.3.4, cppzmq v4.8.1, cmake v3.23 for Docker Ubuntu 18.04 2022-05-04 16:46:48 +00:00
serkixenos
000aeaa721 Merge branch 'Manual-Build-In-Pipeline-Job-For-Testnet-CMAKE' into 'develop'
Manual build in pipeline job for testnet cmake

See merge request PBSA/peerplays!71
2022-04-26 19:12:52 +00:00
Rily Dunlap
c1048e1509 Manual build in pipeline job for testnet cmake 2022-04-26 19:12:52 +00:00
serkixenos
3664ee67ca Merge branch 'feature/88/enhance_witness_logging_and_rejecting_non_updated_witness' into 'develop'
Disconnect from non updated witness

See merge request PBSA/peerplays!96
2022-04-26 19:04:30 +00:00
Davor Hirunda
bd6f265409 Disconnect from non updated witness 2022-04-26 19:04:30 +00:00
serkixenos
0f0cf62b20 Merge branch 'bug/345-double-free-or-corruption' into 'develop'
#345 double-free-or-corruption

See merge request PBSA/peerplays!101
2022-04-26 13:09:43 +00:00
Vlad Dobromyslov
13c782ccd6 #345 double-free-or-corruption 2022-04-26 13:09:41 +00:00
serkixenos
659a3c9185 Merge branch '352-missing-after-cmake-in-dependencies-installation-qol' into 'develop'
Resolve "Missing \ after cmake in dependencies installation - QOL"

See merge request PBSA/peerplays!104
2022-04-25 11:29:22 +00:00
Rily Dunlap
b0c7a527fa Resolve "Missing \ after cmake in dependencies installation - QOL" 2022-04-25 11:29:22 +00:00
serkixenos
157e6c2fd8 Docker file for Ubuntu 18.04 2022-04-20 23:24:06 +02:00
Bobinson K B
6a59d9efba Merge branch 'beatrice' into 'master'
Merge beatrice to master 2022-04

See merge request PBSA/peerplays!84
2022-04-14 13:18:26 +00:00
Bobinson K B
93b60efba5 Merge branch 'develop' into 'beatrice'
Merge develop to beatrice 2022-04

See merge request PBSA/peerplays!80
2022-04-14 08:38:43 +00:00
serkixenos
6eccec2ba4 Set SON3 hardfork date to 2022-04-30T00:00:00 2022-04-13 10:42:59 -04:00
serkixenos
d7c654500e Merge branch 'bug/336-exception-parse-json' into 'develop'
#336 exception parse json

See merge request PBSA/peerplays!95
2022-04-06 23:23:48 +00:00
Vlad Dobromyslov
d49017ff21 #336 exception parse json 2022-04-06 23:23:47 +00:00
serkixenos
6ee37d0916 Set HARDFORK_SON3_TIME to 2022-04-24T00:00:00 2022-04-05 18:34:27 -04:00
serkixenos
44b2d21d78 Merge branch 'feature/sidechain-api' into 'develop'
Sidechain API, SONs listener log

See merge request PBSA/peerplays!94
2022-04-05 12:47:32 +00:00
serkixenos
03836d3770 Sidechain API, SONs listener log 2022-04-04 23:28:31 -04:00
serkixenos
4809619892 Merge branch 'feature/337-lock-importmulti-unlock' into 'develop'
#337 lock/unlock importmulti

See merge request PBSA/peerplays!93
2022-04-01 12:20:59 +00:00
Vlad Dobromyslov
ad0b5afb79 #337 lock/unlock importmulti 2022-04-01 12:20:59 +00:00
serkixenos
0e5d599fdd Improved error checks and messages for BTC transfer fees 2022-03-23 17:46:44 -04:00
serkixenos
d39f838eb8 Merge branch 'bug/324/refactor_Bitcoin_block_parsing_v0.21_v0.22' into 'develop'
Support parsing addresses for bitcoin v21 and v22

See merge request PBSA/peerplays!90
2022-03-23 17:37:32 +00:00
Davor Hirunda
d07c343be6 Support parsing addresses for bitcoin v21 and v22 2022-03-23 17:37:32 +00:00
serkixenos
c0bbcca0cf Update clang format config to clang-format 10 2022-03-23 13:32:03 -04:00
serkixenos
4ef0163bf2 Add missing cli wallet command parameter descriptions 2022-03-23 09:24:45 -04:00
serkixenos
65ba17adb0 HARDFORK_SON3_TIME to 2022-04-01T00:00:00, limit wallet rescan from 2022-01-01 2022-03-23 09:03:44 -04:00
serkixenos
ddd0d2fd16 Merge branch 'feature/314-sidechain_withdrawal_transaction' into 'develop'
issue 327 fixed, add block_num

See merge request PBSA/peerplays!89
2022-03-23 12:12:36 +00:00
Pavel Baykov
bfa7b13193 issue 327 fixed, add block_num 2022-03-21 13:32:26 -03:00
serkixenos
7f5a92fb1e Remove deposit/withdrawal cli tests 2022-03-21 11:19:05 -04:00
serkixenos
a408ed0dda Merge branch 'feature/325-import-btc-addresses' into 'develop'
#325 Refactor importing BTC addresses into son-wallet

See merge request PBSA/peerplays!88
2022-03-21 14:50:02 +00:00
Vlad Dobromyslov
ee018cf513 #325 Refactor importing BTC addresses into son-wallet 2022-03-21 14:50:02 +00:00
serkixenos
23e40e1004 Update wallet library Doxygen file, for cleaner build output 2022-03-18 19:29:56 -04:00
serkixenos
f4a0b3fb6d Merge branch 'bug/315/remove_hardcoded_chain_parameters' into 'develop'
Fix update son parameters on maintenance

See merge request PBSA/peerplays!85
2022-03-18 22:36:31 +00:00
Davor Hirunda
d1e425e3c9 Fix update son parameters on maintenance 2022-03-18 22:36:31 +00:00
serkixenos
237889f621 Merge branch 'feature/314-sidechain_withdrawal_transaction' into 'develop'
Feature/314 sidechain withdrawal transaction

See merge request PBSA/peerplays!83
2022-03-16 14:50:38 +00:00
Pavel Baykov
a5a8d6c617 sidechain_withdraw_transaction_test 2022-03-11 14:54:44 -04:00
Pavel Baykov
f3666d7468 sidechain_withdrawal_transaction 2022-03-10 10:28:23 -04:00
serkixenos
21e13ac4d4 Merge branch 'bug/149/prevent_misconfiguration_of_blockchain_parameters' into 'develop'
Add constraints in changing global parameters

See merge request PBSA/peerplays!79
2022-03-08 23:23:43 +00:00
Davor Hirunda
7729c09c2e Add constraints in changing global parameters 2022-03-08 23:23:42 +00:00
serkixenos
d347d3d01b Merge branch 'feature/313-son-deposit-manually' into 'develop'
#313 son deposit manually

See merge request PBSA/peerplays!78
2022-03-08 23:21:28 +00:00
Vlad Dobromyslov
f169e7a7ef #313 son deposit manually 2022-03-08 23:21:28 +00:00
serkixenos
0740bceb74 Update fc to last commit 2022-03-04 18:32:40 -04:00
serkixenos
2c411b63d3 Merge branch 'bug/279-randomly-test-fall' into 'develop'
#279 randomly test fall

See merge request PBSA/peerplays!77
2022-03-04 22:02:42 +00:00
Vlad Dobromyslov
ae5237a781 #279 randomly test fall 2022-03-04 22:02:41 +00:00
serkixenos
4efa7e4fb8 Merge branch 'feature/280-remove-fc-reflect-tamplate' into 'develop'
#280 Delete FC_REFLECT_TEMPLATE from votes

See merge request PBSA/peerplays!76
2022-02-28 23:08:12 +00:00
Vlad Dobromyslov
5e81fc0024 #280 Delete FC_REFLECT_TEMPLATE from votes 2022-02-28 23:08:12 +00:00
serkixenos
49c39afbe1 Merge branch 'bug/235-corrupt-chain-file' into 'develop'
#235 Delete small objects for game_object, tournament_object, match_object,...

See merge request PBSA/peerplays!75
2022-02-28 22:56:20 +00:00
serkixenos
8dc8ac0aec #235 Delete small objects for game_object, tournament_object, match_object,... 2022-02-28 22:56:20 +00:00
serkixenos
7d25589499 Merge branch 'bug/289/deprecation_messages_for_auto_unit_test.hpp' into 'develop'
Resolving boost deprecation include

See merge request PBSA/peerplays!74
2022-02-25 18:41:31 +00:00
hirunda
5602790db9 Resolving boost deprecation include 2022-02-24 22:16:10 +01:00
serkixenos
d46c7201bb Fix Boost component list for v1.71 2022-02-22 20:21:54 +00:00
serkixenos
5b8f14dd68 Update README.md 2022-02-21 20:52:32 +00:00
serkixenos
8b732acf17 Update Boost libraries 2022-02-21 15:29:38 -04:00
serkixenos
2981613a9e Merge branch 'bug/282-abort-when-no-argument' into 'develop'
#282 abort when no argument

See merge request PBSA/peerplays!72
2022-02-21 13:57:39 +00:00
Vlad Dobromyslov
93b57f294d #282 abort when no argument 2022-02-21 13:57:38 +00:00
serkixenos
5860002d0a Code formatting 2022-02-16 18:01:29 -04:00
serkixenos
6e2fb6fac5 Merge branch 'Updating-Gitlab-CI-and-ReadMe' into 'develop'
Updating gitlab ci and read me

See merge request PBSA/peerplays!70
2022-02-16 18:28:25 +00:00
Rily Dunlap
f7b3c8935d Updating gitlab ci and read me 2022-02-16 18:28:25 +00:00
serkixenos
65cc4a4df2 Merge branch 'bug/issue111' into 'develop'
zmq::recv_multipart

See merge request PBSA/peerplays!65
2022-02-16 18:25:25 +00:00
Pavel Baykov
6960ccbde9 zmq::recv_multipart 2022-02-16 18:25:25 +00:00
serkixenos
04eb8c33e0 Merge branch 'bug_54_handling_errors_in_cli_wallet' into 'develop'
Handling some of the errors on wrong user inputs

See merge request PBSA/peerplays!69
2022-02-16 18:22:17 +00:00
Davor Hirunda
6d8a158372 Handling some of the errors on wrong user inputs 2022-02-16 18:22:17 +00:00
serkixenos
639e242693 Unknown cli parameters handling in cli_wallet 2022-02-16 13:29:47 -04:00
serkixenos
8be4dd5e3c Code formatting 2022-02-15 10:48:52 -04:00
serkixenos
050c0b27e5 Add short version parameter to cli_wallet 2022-02-15 10:48:32 -04:00
serkixenos
fcd360c2fd Merge branch 'feature_enable_multiple_SON_support_by_default' into 'develop'
Enable multiple SON support by default

See merge request PBSA/peerplays!64
2022-02-11 17:36:26 +00:00
serkixenos
8486b7a736 Merge branch 'feature/270-funtions-unified-form' into 'develop'
#270 functions to unified form

See merge request PBSA/peerplays!61
2022-02-11 15:41:47 +00:00
Vlad Dobromyslov
339adbb054 #270 functions to unified form 2022-02-11 15:41:47 +00:00
serkixenos
8b611c3f95 Merge branch 'bug/266-fee-assets' into 'develop'
#266 Fix hard-coded fee for issuing assets in sidechain plugin

See merge request PBSA/peerplays!66
2022-02-10 23:01:59 +00:00
Vlad Dobromyslov
bd08c4c6b0 #266 Fix hard-coded fee for issuing assets in sidechain plugin 2022-02-10 23:01:59 +00:00
serkixenos
a284f42ac9 Merge branch 'feature/260-voting-info' into 'develop'
#260 Added functions get_votes() and get_voters()

See merge request PBSA/peerplays!59
2022-02-10 21:11:09 +00:00
Vlad Dobromyslov
d7e24bfb07 #260 Added functions get_votes() and get_voters() 2022-02-10 21:11:08 +00:00
serkixenos
99119dbd7d Update git submodules docs and fc 2022-02-10 16:40:03 -04:00
hirunda
18bf848119 Enable multiple SON support by default 2022-02-09 18:36:03 +01:00
serkixenos
494482eba5 Update README.md 2022-02-03 21:18:41 +00:00
serkixenos
18775061ad Merge branch 'feature/switch-to-ubuntu-20-04' into 'develop'
Update README for Ubuntu 20.04

See merge request PBSA/peerplays!58
2022-02-02 13:34:44 +00:00
serkixenos
3c19ea74dd Merge branch 'bug/replace-vulnerable-xml' into 'develop'
Replace vulnerable XML library

See merge request PBSA/peerplays!57
2022-02-02 13:34:26 +00:00
serkixenos
eb77c9dfb3 Update README for Ubuntu 20.04 2022-02-01 13:20:17 -04:00
serkixenos
7a9c90a218 Replace vulnerable XML library 2022-02-01 12:21:32 -04:00
serkixenos
66699f1e15 Merge branch 'bug/245-exception-in-witness' into 'develop'
bug #245 exception seen in witness logs

See merge request PBSA/peerplays!56
2022-01-31 14:14:25 +00:00
Vlad Dobromyslov
78fbf7c3cd bug #245 exception seen in witness logs 2022-01-31 14:14:24 +00:00
serkixenos
5247f76fc2 Merge branch '237-es7-fix' into 'develop'
Resolve "port ES changes from Bitshares"

See merge request PBSA/peerplays!53
2022-01-31 05:25:56 +00:00
Vlad Dobromyslov
39fcacd397 Resolve "port ES changes from Bitshares" 2022-01-31 05:25:56 +00:00
serkixenos
10799a2148 Merge branch 'bug/267-fix-chain_test' into 'develop'
bug #267 Fix error in chain_test in gitlab autobuild

See merge request PBSA/peerplays!55
2022-01-28 15:05:49 +00:00
Vlad Dobromyslov
8c3a424bb6 bug #267 Fix error in chain_test in gitlab autobuild 2022-01-28 15:05:49 +00:00
serkixenos
6f6811eec4 Merge branch 'bug/fix-list-active-sons' into 'develop'
Fix list_active_sons output

See merge request PBSA/peerplays!54
2022-01-26 18:30:21 +00:00
serkixenos
0bcb0487a7 Fix list_active_son command output on deregistered SONs 2022-01-21 12:17:13 -04:00
serkixenos
b5a9a0101a Merge branch 'bug/cli-wallet-memo-display' into 'develop'
Fix cli wallet memo displaying

See merge request PBSA/peerplays!52
2022-01-17 18:25:33 +00:00
serkixenos
5e85079281 Fix cli wallet memo displaying 2021-12-27 00:28:29 -04:00
Bobinson K B
9fd18b32c4 Merge branch 'beatrice' into 'master'
Hotfix: Revert change to a son_update_operation

See merge request PBSA/peerplays!50
2021-12-17 13:33:23 +00:00
serkixenos
632eb4a231 Hotfix: Revert change to a son_update_operation 2021-12-17 13:33:23 +00:00
serkixenos
bfc778068c Merge branch 'beatrice' into develop 2021-12-16 23:15:21 -04:00
serkixenos
f9a40c647e Increase replay's writing to database threshold 2021-12-16 22:27:34 -04:00
serkixenos
e828e7813c Merge branch 'master' into beatrice 2021-12-16 22:08:46 -04:00
serkixenos
0dca13ea7e Revert change to a son_update_operation 2021-12-16 21:59:05 -04:00
serkixenos
b619815077 Revert change to a son_update_operation 2021-12-16 21:34:57 -04:00
Bobinson K B
78730a4564 Merge branch 'beatrice' into 'master'
Merge beatrice to master 2021-12

See merge request PBSA/peerplays!46
2021-12-15 16:36:40 +00:00
serkixenos
c888274846 Merge beatrice to master 2021-12 2021-12-15 16:36:40 +00:00
serkixenos
de2a89ebce Set SON for Hive Mainnet hardfork date to 2021-12-21T00:00:00 2021-12-15 09:27:30 -04:00
serkixenos
f69fb7adae Merge branch '230-docker-image-from-ci-should-be-pushed-to-gitlab-registry' into 'develop'
Update .gitlab-ci.yml to push images to the gitlab registry instead of docker.io

See merge request PBSA/peerplays!48
2021-12-15 03:51:51 +00:00
Sivakumar Yavvari
666dc76ee4 Update .gitlab-ci.yml to push images to the gitlab registry instead of docker.io 2021-12-14 18:22:12 +00:00
serkixenos
f81b6460d1 Merge branch 'bug/94-docker-build' into 'develop'
Fix Docker build

See merge request PBSA/peerplays!44
2021-12-14 06:56:30 +00:00
serkixenos
861e9389ac Fix Docker build 2021-12-14 06:56:30 +00:00
serkixenos
2ba8a7f3a5 Merge branch 'master' into beatrice 2021-12-13 09:49:07 -04:00
Bobinson K B
d8cecab20f Merge branch 'revert-b875f0b8' into 'master'
Revert "Merge branch 'merge-beatrice-to-master-2021-11' into 'master'"

See merge request PBSA/peerplays!38
2021-12-10 06:18:51 +00:00
Bobinson K B
dc04759686 Revert "Merge branch 'merge-beatrice-to-master-2021-11' into 'master'" 2021-12-10 06:18:51 +00:00
serkixenos
696f99e6c9 Merge branch 'bug_fix_warnings' into 'develop'
Remove build warnings

See merge request PBSA/peerplays!43
2021-12-08 17:07:42 +00:00
serkixenos
4067291094 Remove build warnings 2021-12-08 17:07:41 +00:00
serkixenos
9ebc1ee462 Merge branch 'develop' of https://gitlab.com/PBSA/peerplays into develop 2021-12-07 13:42:46 -04:00
serkixenos
6de45cebb8 Add more mainnet seed nodes 2021-12-07 13:42:24 -04:00
serkixenos
a9bb6cb1dc Merge branch 'bug/empty-json-parsing-failure' into 'develop'
Merging fix of bug/empty-json-parsing-failure

See merge request PBSA/peerplays!42
2021-12-07 17:40:29 +00:00
yevhen
932b696556 Merging fix of bug/empty-json-parsing-failure 2021-12-07 17:40:29 +00:00
serkixenos
732cae963d Use add_definitions instead of add_compile_definitions, to support older cmake < 3.12 2021-12-02 12:20:03 -04:00
moss9001
77791b2d20 Update rpc_client.cpp 2021-12-02 15:32:15 +02:00
serkixenos
ec0398c83f Merge branch 'feature/all-in-one-build' into 'develop'
Add cmake flag to determine testnet vs mainnet build

See merge request PBSA/peerplays!40
2021-12-02 02:06:38 +00:00
serkixenos
727d54feb0 Add cmake flag to determine testnet vs mainnet build 2021-12-02 02:06:38 +00:00
serkixenos
c72c2bb70b Merge branch 'feature/cli-activate-deregistered-son' into 'develop'
cli wallet command to reactivate deregistered SON

See merge request PBSA/peerplays!37
2021-12-02 02:04:50 +00:00
serkixenos
7354de75ef cli wallet command to reactivate deregistered SON 2021-12-02 02:04:50 +00:00
serkixenos
92e017e3b0 Merge branch 'bug/35-blockchain_replay' into 'develop'
35 bug fix: when blockchain replay is attempted blocks file increases in size

See merge request PBSA/peerplays!34
2021-12-01 21:57:46 +00:00
Pavel Baykov
3612e1ec23 35 bug fix: when blockchain replay is attempted blocks file increases in size 2021-12-01 21:57:46 +00:00
serkixenos
d5e02551e2 Merge branch 'hotfix/fix-sidechain-address-generation' into 'develop'
Fix sidechain address generation

See merge request PBSA/peerplays!39
2021-12-01 15:09:57 +00:00
serkixenos
7bc7f17b3e Fix sidechain address generation 2021-12-01 15:09:57 +00:00
Bobinson K B
b875f0b841 Merge branch 'merge-beatrice-to-master-2021-11' into 'master'
Merge Beatrice to Master 2021-11

See merge request PBSA/peerplays!33
2021-12-01 07:54:19 +00:00
serkixenos
9955b390ee Merge Beatrice to Master 2021-11 2021-12-01 07:54:19 +00:00
serkixenos
536e07d726 Merge branch 'hotfix/fix-memo-field-encryption' into 'develop'
Fix memo field encryption

See merge request PBSA/peerplays!36
2021-11-30 22:44:56 +00:00
serkixenos
433c75769f Fix memo field encryption 2021-11-30 22:44:55 +00:00
serkixenos
7b2161e87a Merge branch 'issue/son-for-hive-rpc-connection' into 'develop'
Fix RPC client issues with talking to different nodes

See merge request PBSA/peerplays!31
2021-11-30 19:14:37 +00:00
serkixenos
7f67397137 Fix RPC client issues with talking to different nodes 2021-11-30 19:14:37 +00:00
serkixenos
8fbe85babb Merge branch 'hotfix/fix-plugin-cli-option' into 'develop'
Fix plugins cli parameter ambiguity

See merge request PBSA/peerplays!35
2021-11-29 19:09:00 +00:00
serkixenos
f0bacb3cc1 Fix plugins cli parameter ambiguity 2021-11-29 19:08:59 +00:00
serkixenos
685e9d500c Merge branch 'develop' into beatrice 2021-11-25 20:09:15 -04:00
serkixenos
f279065c79 Handle HARDFORK_SON_FOR_HIVE_TIME properly 2021-11-25 20:08:45 -04:00
serkixenos
873310e16d Merge branch 'develop' into 'beatrice'
Merge Develop to Beatrice 2021-11

See merge request PBSA/peerplays!32
2021-11-22 19:36:16 +00:00
serkixenos
bf0cdbdc6e Merge branch 'feature/son-for-hive' into 'develop'
SON for Hive

See merge request PBSA/peerplays!13
2021-11-18 17:32:30 +00:00
serkixenos
ceffe4cf3c SON for Hive 2021-11-18 17:32:30 +00:00
serkixenos
43c29ce1bf Merge branch 'beatrice' into develop 2021-11-17 23:15:29 -04:00
serkixenos
4eaef1c171 Merge branch 'master' into beatrice 2021-11-17 19:27:51 -04:00
ss
8e5dfb0e72 Merge branch 'beatrice' into develop 2021-09-11 01:50:55 +02:00
ss
01f860e15b Merge branch 'master' into beatrice 2021-09-11 01:49:05 +02:00
Bobinson K B
2778a99842 Merge branch 'hotfix/son-cli-test-fix' into 'master'
Fix failing son cli test

See merge request PBSA/peerplays!26
2021-07-27 12:47:05 +00:00
sierra19XX
d75177b7a1 fix cli test 2021-07-27 09:38:51 +00:00
Bobinson K B
6035d29428 Merge branch 'feature/rel-mainnet-jul21' into 'master'
Merge Beatrice changes to Main net

See merge request PBSA/peerplays!25
2021-07-26 20:16:25 +00:00
sierra19XX
ba69da5d5c Merge Beatrice changes to Main net 2021-07-26 20:16:24 +00:00
Bobinson K B
183906370b Merge branch 'feature/reserve-tokens' into 'develop'
Reserve popular tokens

See merge request PBSA/peerplays!24
2021-06-29 11:24:08 +00:00
sierra19XX
8b84459e8c Reserve popular tokens 2021-06-29 11:24:07 +00:00
Bobinson K B
5dc753054b Merge branch 'feature/beatrice-changes-to-develop' into 'develop'
merge beatrice release delta changes into develop

See merge request PBSA/peerplays!23
2021-06-18 09:09:02 +00:00
sierra19XX
e6b57a2285 merge beatrice release delta changes into develop 2021-06-15 11:51:57 +00:00
Bobinson K B
5ae230e533 Merge branch 'feature/testnet-release-jun2021' into 'beatrice'
Testnet Beatrice release June 2021

See merge request PBSA/peerplays!22
2021-06-05 22:22:45 +00:00
sierra19XX
0a5e3d7080 Testnet Beatrice release June 2021 2021-06-05 22:22:45 +00:00
Bobinson K B
20c9e0f9a3 Merge branch 'feature/son-wrong-weights' into 'develop'
fix wrong son weights from voting

See merge request PBSA/peerplays!20
2021-05-26 16:08:43 +00:00
Bobinson K B
6c8aed3c18 Merge branch 'feature/add-cliwallet-version' into 'develop'
add cli wallet version

See merge request PBSA/peerplays!21
2021-05-25 12:26:13 +00:00
sierra19XX
557270db39 add cli wallet version 2021-05-21 14:27:03 +00:00
sierra19XX
93c980ab2c fix wrong son weights from voting 2021-05-18 12:05:44 +00:00
Bobinson K B
7eba0eb2a8 Merge branch 'support/sonarcloud' into 'develop'
Update .sonarcloud.properties

See merge request PBSA/peerplays!19
2021-05-15 03:46:35 +00:00
Roshan Syed
d8246bc404 chore: update .sonarcloud.properties 2021-05-14 19:59:42 +00:00
Bobinson K B
ec464694a4 Merge branch 'feature/add-get-blocks' into 'develop'
Feature/add get blocks

See merge request PBSA/peerplays!18
2021-05-14 07:54:43 +00:00
sierra19XX
997941611c add ddos mitigation 2021-05-12 13:28:10 +00:00
sierra19XX
b22086ff7e add get_blocks 2021-05-12 11:44:27 +00:00
Bobinson K B
8b3952d26b Merge branch 'feature/sidechain-throttling' into 'develop'
Rate limiting for son deposit, withdrawal, pw change, tx settle operations

See merge request PBSA/peerplays!17
2021-05-03 11:15:43 +00:00
sierra19XX
668f677867 rate limiting for son deposit, withdrawal, pw change, tx settle operations 2021-05-03 09:26:43 +00:00
Bobinson K B
cd0bcf3087 Delete codeql-analysis.yml 2021-03-31 17:29:14 +00:00
Bobinson K B
010b873c8e
Create codeql-analysis.yml 2021-03-31 22:05:16 +05:30
Roshan Syed
2c396f6b19
ci: added automated docker image building and upload (#413) 2021-03-31 17:59:27 +05:30
Bobinson K B
0b0718f739 Merge branch 'issue/dex-crash' into 'develop'
dex crash fix - replace assert with FC_ASSERT

See merge request PBSA/peerplays!15
2021-03-30 11:58:48 +00:00
sierra19XX
974c8f987e dex crash fix - replace assert with FC_ASSERT 2021-03-29 22:52:48 +00:00
Bobinson K B
652d37e206 Merge branch 'feature/hf-btc-flags-change' into 'develop'
Feature/hf btc flags change

See merge request PBSA/peerplays!14
2021-03-22 12:13:09 +00:00
sierra19XX
30e4b50891 only modify flag if it is not already 2021-03-19 12:00:01 +00:00
sierra19XX
ad5f89ba99 change the asset flags to allow transfers/dex trades of pBTC 2021-03-17 12:48:24 +00:00
serkixenos
ae712122d4 Merge branch 'hotfix/build-warnings-210210' into 'develop'
Remove build warnings & update Doxygen file

See merge request PBSA/peerplays!12
2021-02-22 13:29:03 +00:00
serkixenos
2a977793de Remove build warnings & update Doxygen file 2021-02-10 12:53:51 +01:00
serkixenos
d3a3722c1e Merge branch 'master' into beatrice 2021-02-09 13:13:21 +01:00
Bobinson K B
bb4fc3c9c1 Merge branch 'hotfix/master-son-vb-checks' into 'master'
Check vesting balance properties before creating/updating SON

See merge request PBSA/peerplays!11
2021-02-09 03:43:42 +00:00
serkixenos
b362ca23a6 Check vesting balance properties before creating/updating SON 2021-02-09 03:43:42 +00:00
serkixenos
4b0d7d4700 Merge branch 'develop' into 'beatrice'
Merge develop to beatrice

See merge request PBSA/peerplays!10
2021-01-28 20:19:02 +00:00
sierra19XX
b99a19bd72
NFT Lottery (#384) 2021-01-28 20:27:54 +01:00
serkixenos
5a5154b260 Update FC to latest version 2021-01-27 13:39:29 +01:00
serkixenos
92d9373c2f Merge branch 'beatrice' into develop 2021-01-26 22:28:21 +01:00
serkixenos
965eb575bf Merge branch 'feature/cli-change-account-keys' into 'develop'
CLI wallet commands to add/remove account's active key

See merge request PBSA/peerplays!9
2021-01-26 21:14:50 +00:00
serkixenos
ee553f3968
Flush chain database during replay (#412) 2021-01-26 21:41:58 +01:00
serkixenos
dbc6990e08 Merge branch 'master' into beatrice 2021-01-26 21:32:14 +01:00
Bobinson K B
748f2b117b Merge branch 'hotfix/master-hotfixes' into 'master'
Fix get_full_accounts and SON object serialization

See merge request PBSA/peerplays!8
2021-01-26 16:01:26 +00:00
serkixenos
057db52d1e Fix get_full_accounts and SON object serialization 2021-01-26 16:01:26 +00:00
serkixenos
3f4fc67e40 CLI wallet commands to add/remove account's active key 2021-01-19 11:31:35 +01:00
serkixenos
fdcf090730
User vesting performance decay tests added (#411) 2020-12-27 16:42:53 +05:30
serkixenos
5b51953572
Fix betting market macros, avoid invalidated object references (#410) 2020-12-23 20:59:09 +05:30
serkixenos
cb786554fc
Remove as much warnings from build log as possible (#400)
* Remove as much warnings from build log as possible
2020-12-18 14:23:37 +01:00
serkixenos
74764b946d
Elasticsearch plugin improvements (#404)
* Elasticsearch and es_objects plugins updated
* Expand es_objects plugin to store more objects
* es_objects configuration options
* Store transaction objects
2020-12-18 14:21:24 +01:00
serkixenos
d81fb834b9
Remove std::to_string(double), due to fixed conversion precision (#405)
- std::to_string(double) converts double to precision 6, eg 1 to "1.000000"
- stringstream conversion from double to string will keep minimal
  number of decimals (eg, it will trim zeros), eg 1 to "1", 1.2 to "1.2"
2020-12-18 14:20:46 +01:00
serkixenos
10cb737b10
Merge pull request #409 from peerplays-network/merge_beatrice_to_develop_202012
Merge beatrice to develop 202012
2020-12-17 17:56:41 +01:00
serkixenos
76d14a5d11 Merge branch 'beatrice' into develop 2020-12-16 11:57:51 +01:00
serkixenos
796586846e Merge branch 'master' into beatrice 2020-12-15 20:26:44 +01:00
serkixenos
3dd0eac49f Hotfix: Fix failing GPOS tests 2020-12-15 20:25:53 +01:00
serkixenos
5df01a5abd Hotfix: Betting tests 2020-12-15 20:25:53 +01:00
serkixenos
77022b7936 Hotfix: Fix failing GPOS tests 2020-12-15 20:23:29 +01:00
serkixenos
c06fb4a04e Hotfix: Betting tests 2020-12-15 18:54:48 +01:00
serkixenos
6e1b8ba9ae Merge branch 'master' into beatrice 2020-12-15 17:14:44 +01:00
serkixenos
317093930f
Merge Beatrice to Master (#408)
* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* changes to withdraw_vesting feature(for both cdd and GPOS)

* Comments update

* update to GPOS hardfork ref

* Remove leftover comment from merge

* fix for get_vesting_balance API call

* braces update

* Allow sufficient space for new undo_session

* Throw for deep nesting

* node.cpp: Check the attacker/buggy client before updating items ids

The peer is an attacker or buggy, which means the item_hashes_received is
not correct.

Move the check before updating items ids to save some time in this case.

* Create .gitlab-ci.yml

* Added cli_test to CI

* fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile

* use random port numbers in app_test (#154)

* Changes to compiple with GCC 7(Ubuntu 18.04)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* changes to have separate methods and single withdrawl fee for multiple vest objects

* 163-fix, Return only non-zero vesting balances

* Support/gitlab develop (#168)

* Added code_quality to CI

* Update .gitlab-ci.yml

* Point to PBSA/peerplays-fc commit f13d063 (#167)

* [GRPH-3] Additional cli tests (#155)

* Additional cli tests

* Compatible with latest fc changes

* Fixed Spacing issues

* [GRPH-106] Added voting tests (#136)

* Added more voting tests

* Added additional option

* Adjust p2p log level (#180)

* Added submodule sync to peerplays compile process

* merge gpos to develop (#186)

* issue - 154: Don't allow to vote when vesting balance is 0

* changes to withdraw_vesting feature(for both cdd and GPOS)

* Comments update

* update to GPOS hardfork ref

* fix for get_vesting_balance API call

* braces update

* Create .gitlab-ci.yml

* fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile

* Changes to compiple with GCC 7(Ubuntu 18.04)

* changes to have separate methods and single withdrawl fee for multiple vest objects

* 163-fix, Return only non-zero vesting balances

* Revert "Revert "GPOS protocol""

This reverts commit 67616417b7.

* add new line needed to gpos hardfork file

* comment temporally cli_vote_for_2_witnesses until refactor or delete

* fix gpos tests

* fix gitlab-ci conflict

* Fixed few error messages

* error message corrections at other places

* Updated FC repository to peerplays-network/peerplays-fc (#189)

Point to fc commit hash 6096e94 [latest-fc branch]

* Project name update in Doxyfile (#146)

* changes to allow user to vote in each sub-period

* Fixed GPOS vesting factor issue when proxy is set

* Added unit test for proxy voting

* Review changes

* changes to update last voting time

* resolve merge conflict

* unit test changes and also separated GPOS test suite

* delete unused variables

* removed witness check

* eliminate time gap between two consecutive vesting periods

* deleted GPOS specific test suite and updated gpos tests

* updated GPOS hf

* Fixed dividend distribution issue and added test case

* fix flag

* clean newlines gpos_tests

* adapt gpos_tests to changed flag

* Fix to roll in GPOS rules, carry votes from 6th sub-period

* check was already modified

* comments updated

* updated comments to the benefit of reviewer

* Added token symbol name in error messages

* Added token symbol name in error messages (#204)

* case 1: Fixed last voting time issue

* get_account bug fixed

* Fixed flag issue

* Fixed spelling issue

* remove non needed gcc5 changes to dockerfile

* GRPH134- High CPU Issue, websocket changes (#213)

* update submodule branch to refer to the latest commit on latest-fc branch (#214)

* Improve account maintenance performance (#130)

* Improve account maintenance performance

* merge fixes

* Fixed merge issue

* Fixed indentations and extra ';'

* Update CI for syncing gitmodules (#216)

* Added logging for the old update_expired_feeds bug

The old bug is https://github.com/cryptonomex/graphene/issues/615 .

Due to the bug, `update_median_feeds()` and `check_call_orders()`
will be called when a feed is not actually expired, normally this
should not affect consensus since calling them should not change
any data in the state.

However, the logging indicates that `check_call_orders()` did
change some data under certain circumstances, specifically, when
multiple limit order matching issue (#453) occurred at same block.
* https://github.com/bitshares/bitshares-core/issues/453

* Minor performance improvement for price::is_null()

* Use static refs in db_getter for immutable objects

* Minor performance improvement for db_maint

* Minor code updates for asset_evaluator.cpp

* changed an `assert()` to `FC_ASSERT()`
* replaced one `db.get(asset_id_type())` with `db.get_core_asset()`
* capture only required variables for lambda

* Improve update_expired_feeds performance #1093

* Change static refs to member pointers of db class

* Added getter for witness schedule object

* Added getter for core dynamic data object

* Use getters

* Removed unused variable

* Add comments for update_expired_feeds in db_block

* Minor refactory asset_create_evaluator::do_apply()

* Added FC_ASSERT for dynamic data id of core asset

* Added header inclusions in db_management.cpp

* fix global objects usage during replay

* Logging config parsing issue

* added new files

* compilation fix

* Simplified code in database::pay_workers()

* issue with withdrawl

* Added unit test for empty account history

* set extensions default values

* Update GPOS hardfork date and don't allow GPOS features before hardfork time

* refer to latest commit of latest-fc branch (#224)

* account name or id support in all database api

* asset id or name support in all asset APIs

* Fixed compilation issues

* Fixed alignment issues

* check witness signature before adding block to fork db

* Externalized some API templates

* Externalize serialization of blocks, tx, ops

* Externalized db objects

* Externalized genesis serialization

* Externalized serialization in protocol library

* Undo superfluous change

* remove default value for extension parameter

* Replace verify_no_send_in_progress with no_parallel_execution_guard

* fix compilation issues

* fixed cli_wallet log issue

* Port plugin sanitization code

* GRPH-46-Quit_command_cliwallet

* removed multiple function definition

* Fixed chainparameter update proposal issue

* Move GPOS withdraw logic to have single transaction(also single fee) and update API

* Added log for authorization failure of proposal operations

* Votes consideration on GPOS activation

* bump fc version

* fix gpos tests

* Bump fc version

* Updated gpos/voting_tests

* avoid directly overwriting wallet file

* Fixed withdraw vesting bug

* Added unit test

* Update hardfork date for TESTNET, sync fc module and update logs

* avoid wlog as it filling up space

* Beatrice hot fix(sync issue fix)

* gpos tests fix

* Set hardfork date to Jan5th on TESTNET

* Implemented "plugins" config variable

* allow plugin to have descriptions

* Merge pull request #444 from oxarbitrage/elasticsearch

Elasticsearch plugin

* Merge pull request #500 from oxarbitrage/elasticsearch-extras

es_objects plugin

* Merge pull request #873 from pmconrad/585_fix_history_ids

Fix history ids

* Merge pull request #1201 from oxarbitrage/elasticsearch_tests2

Elasticsearch refactor

* Merge pull request #1271 from oxarbitrage/es_objects

refine es_objects plugin

* Merge pull request #1429 from oxarbitrage/es_objects_templates

Add an adaptor to es_objects and template function to reduce code

* Merge pull request #1458 from oxarbitrage/issue1455

add option elasticsearch-start-es-after-block to es plugin

* Merge pull request #1541 from oxarbitrage/es_objects_start_after_block

add es-objects-start-es-after-block option

* explicitly cleanup external library facilities

* Merge pull request #1717 from oxarbitrage/issue1652

add genesis data to es_objects

* Merge pull request #1073 from xiangxn/merge-impacted

merge impacted into db_notify

* Merge pull request #1725 from oxarbitrage/issue1682

elasticsearch history api #1682

* change ES index prefixes to Peerplays-specific

* sync develop with beatrice

* fix the data writing to ES during sync issues

* fix CLI tests

* brought updates from mainnet branch (#285)

* Fix unit test failures (#289)

* fixed unit test failures from the recent merges

* fixed unit test failures from the recent merges

* enable snapshot plugin (#288)

* sync fc branch(build optimization changes)

* update to es plugin

* fix verify witness signature method (#295)

* enable mandatory plugins to have smooth transition for next release

* updated tests to keep in-line with plugin changes

* Merge Elasticplugin, snapshot plugin and graphene updates to beatrice (#304)

* check witness signature before adding block to fork db

* Replace verify_no_send_in_progress with no_parallel_execution_guard

* fixed cli_wallet log issue

* Port plugin sanitization code

* avoid directly overwriting wallet file

* Implemented "plugins" config variable

* allow plugin to have descriptions

* Merge pull request #444 from oxarbitrage/elasticsearch

Elasticsearch plugin

* Merge pull request #500 from oxarbitrage/elasticsearch-extras

es_objects plugin

* Merge pull request #873 from pmconrad/585_fix_history_ids

Fix history ids

* Merge pull request #1201 from oxarbitrage/elasticsearch_tests2

Elasticsearch refactor

* Merge pull request #1271 from oxarbitrage/es_objects

refine es_objects plugin

* Merge pull request #1429 from oxarbitrage/es_objects_templates

Add an adaptor to es_objects and template function to reduce code

* Merge pull request #1458 from oxarbitrage/issue1455

add option elasticsearch-start-es-after-block to es plugin

* Merge pull request #1541 from oxarbitrage/es_objects_start_after_block

add es-objects-start-es-after-block option

* explicitly cleanup external library facilities

* Merge pull request #1717 from oxarbitrage/issue1652

add genesis data to es_objects

* Merge pull request #1073 from xiangxn/merge-impacted

merge impacted into db_notify

* Merge pull request #1725 from oxarbitrage/issue1682

elasticsearch history api #1682

* change ES index prefixes to Peerplays-specific

* sync develop with beatrice

* fix the data writing to ES during sync issues

* fix CLI tests

* brought updates from mainnet branch (#285)

* Fix unit test failures (#289)

* fixed unit test failures from the recent merges

* fixed unit test failures from the recent merges

* enable snapshot plugin (#288)

* sync fc branch(build optimization changes)

* update to es plugin

* fix verify witness signature method (#295)

* enable mandatory plugins to have smooth transition for next release

* updated tests to keep in-line with plugin changes

Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Peter Conrad <conrad@quisquis.de>
Co-authored-by: Alfredo <oxarbitrage@gmail.com>
Co-authored-by: Abit <abitmore@users.noreply.github.com>
Co-authored-by: crypto-ape <43807588+crypto-ape@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>

* sync latest fc commit on beatrice

* nh5050:winner ticket id changes

* update HF check

* update HF-check

* code improvement with edge case handling

* update HF check

* changes to fetch operations based on lottery asset

* update HF date 16th April 2020

* update variable type to uint64

* update HF to 15th April

* ci: update .gitlab-ci.yml

* NFT Marketplace HRP Beatrice Merge (#371)

* private-key option update

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* ci: update .gitlab-ci.yml

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>

* Beatrice NFT HF

Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>

* ci: added additional security scanning for gitlab

* Merge develop into beatrice (#386)

* Fix building on Ubuntu 18.04 with GCC 7

* Peerplays SON plugin skeleton (#122)

* Peerplays SON plugin skeleton
* SON tests skeleton

* Part two of SON-83 - plugins option in command line and config file (#126)

- Empty SON plugin is INACTIVE by default
- To enable it, add peerplays_sidechain to plugins section in
  config file, or use --plugins command line option
- Plugin can work with or without witness

* SON11 - Add chain extension parameter to set SON count

* [SON-107] Merge develop branch to SONs-base (#166)

* fix rng and get_winner_numbers implemented

* coipied code for bitshares fixing 429 and 433 isuues

* ticket_purchase_operation implemented. added lottery_options to asset

* lottery end implemented

* minor logic changes. added db_api and cli_wallet methods

* fix reindex on peerplays network

* fix some tests. add gitlab-ci.yml

* add pull to gitlab-ci

* fix

* fix and comment some tests

* added owner to lottery_asset_options. commented async call in on_applied_block callback

* added get_account_lotteries method to db_api and cli, lottery end_date and ticket_price verification

* merge get_account_lotteries branch. fix create_witness test

* fix test genesis and end_date verification

* fixed indices sorting and lottery end checking by date

* update db_version for replay and removed duplicate include files

* Added ntp and upgraded boost version

* Revert "GPOS protocol"

* need to remove backup files

* virtual-op-fix for deterministic virtual_op number

* Merged beatrice into 5050

* Updated gitmodules, changes to allow voting on lottery fee

* Removed submodule libraries/fc

* Added libraries/fc

* added missing , in types.hpp

* Added sweeps parameters to parameter_extension

* added missing comma in operations.hpp, small changes to config.hpp

* fixed returntype in chain_parameters.hpp

* removed sweeps_parameter_extensions

* Changed fc library

* fixed asset_object

* Changed peerplays-fc submodule

* Changed fc submodule to ubuntu 18.04 upgrade

* Removed submodule libraries/fc

* Added fc library back

* fix casting in overloaded function

* Removed blind_sign and unblind_signature functions

* Added new lottery_asset_create_operation

* Changed sweeps hardfork time

* Removed redundant if from asset_evaluator and fixed db_notify

* fixed duplicate code in fee_tests

* removed redundant tgenesis file

* Enable building on Ubuntu 18.04 using GCC 7 compiler

* fix: is_benefactor_reward had the default value of true when not set

* Docker file for Ubuntu 18.04

Base image updated to Unbuntu 18.04
Prerequisite list updated
Basic configuration updated

* Quick fix: Added missing package pkg-config

* Docker file updates

* 5050 fee update and compilation error fix

* Dockerfile, set system locale

Prevents locale::facet::_S_create_c_locale name error

* Update README.md

Fix typo

* Update README.md

* Changed hardfork time for SWEEPS and Core-429

* revert master changes that were brought in previous commit

* Fixed error when account_history_object with id 0 doesnt exist

* Fixed error while loading object database

* test for zero id object in account history

* Reorder operations in Dockerfile, to make image creation faster

- Reorder prevents unnecessary building of Boost libraries

* Fix for irrelevant signature included issue

* fix copyrigth messages order

* remove double empty lines

* Backport fix for `get_account_history` from https://github.com/bitshares/bitshares-core/pull/628 and add additional account history test case

* NTP client back

* GRPH-53-Log_format_error

* Merge pull request #1036 from jmjatlanta/issue_730

Add fail_reason to proposal_object

* Unit test case fixes and prepared SONs base

* Use offsetof instead of custom macro

* Hide some compiler warnings

* Make all the tests compile

* Add nullptr check in api.cpp for easier testing

* Add test case for broadcast_trx_with_callback API

* Unit test case fixes and prepared SONs base

* Merge pull request #714 from pmconrad/json_fix

JSON fix

* Increase max depth for trx confirmation callback

* Adapt to variant API with `max_depth` argument

* Update fc submodule

* Created unit test for #325

* remove needless find()

* GRPH-4-CliWallet_crash_ctrlD

* fix copyright message

* Make all the tests compile

* increase delay for node connection

* Increase block creation timeout to 2500ms

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Improved resilience of block database against corruption

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed duplicate ops returned from get_account_history

* minor performance improvement

* Added comment

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Fixed test failures and compilation issue

* Fixed account_history_pagination test

* Fix compilation in debug mode

* Removed unrelated comment

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* Allow sufficient space for new undo_session

* Throw for deep nesting

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* Added cli_test to CI

* use random port numbers in app_test (#154)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* fix for lottery end

* fix declarations

* fix declarations

* fix boost integer

* fix compilation

* fix chain tests

* fix app_test

* try to fix cli test

* fix incorrect max_depth param

* working cli test

* correct fc version

* Revert "[SON-107] Merge develop branch to SONs-base (#166)"

This reverts commit 499e318199.

* Fix build error, add missing GRAPHENE_MAX_NESTED_OBJECTS parameter

* Plugin description added, SON plugin params example

* fix for cli test

* SON object, operations, cli_wallet commands and RPC (#160)

- create_son, update_son, delete_son, list_sons
- get_sons, get_son_by_account, lookup_son_accounts, get_son_count
- vote_for_son, update_son_votes
- claim_registered_son
- get_son in cli_wallet
- Updating global_property_object
- Decrease SON hardfork time for test purposes
- CLI Wallet tests imported from develop branch

* fix affiliate tests

* SON-108 - Add cli wallet tests for create_son (#174)

* SON-108 - Add cli wallet tests for create_son

* Add info message at the beginning and end of the SON CLI tests

* Minor output message change

* Enable Boost test messages in unit tests

* [SON-110] get_son cli test (#173)

* get_son cli test

* update_son cli test

* Add cli wallet tests for vote_for_son (#175)

* fix insert object processing in indexes, son_delete is working

* Fix segfault when using delete_son from cli_wallet (#177)

* Fix segfault when using list_sons from cli_wallet (#178)

* Add son_delete cli tests (#182)

* Add son_delete cli tests

* add son vesting config options

* add vesting balance type support

* add dormant vesting policy for son

* add precision to son vesting amount

* SON118-Add Budget for SON (#165)

* SON118-Add Budget for SON

* SON118 - Compilation errors fix

* SON118 - Proper commenting around pay_sons function

* SON118 - Comment correction, SON statistics object implementation type correction

* SON118 - Add missing index init and reflect enums

* SON118 - Correcting the indentation

* SON118 SON144 - Add unit test, code fixes and resolve failures for existing tests

* SON118 SON144 - Removing extra spaces added

* abstraction of dormant vesting policy

* force son create vesting balance to have dormant policy

* remove not needed code from wallet son commands, add delete son test to cli (#181)

* Active SONs, list up to 15, order by votes, add test (#185)

* Add test for selecting 15 SONs with highest votes
* Display up to 15 active SONs, SON ordering by total_votes

* fix build error (#191)

* fix build error

* adapt son_pay_test to dormant vesting policy

* [SON-113] Unit test for cli `update_son_votes` (#179)

* refactor cli tests

* update_son_votes tests

* list_sons test

* test changes in get_global_properties() result

* fix generate_block failure

* fix update_son_votes test

* improve update_son cli test

* fix linking errors

* refactor select_top_fifteen_sons test

* refactor other son cli tests to use son_test_helper

* create_vesting call in wallet_api

* test fix

* fix create_son in wallet_api and cli tests

* SON126 - Witness Proposals to deregister SONs (#192)

* SON126 - Witness Proposals to deregister SONs

* SON126 - Approval by witness, removal of son_proposal_object, commenting

* SON126 - Witness proposal tests and related fixes

* SON126 - Proper commenting

* fix son_delete_operation reflection

* [SON-160] Fix create_vesting wallet_api call (#206)

* Fix create_vesting wallet_api call

* change type for vesting_type in create_vesting_balance

* [SON-113] Fix several issues in update_son_votes call in wallet_api  (#208)

* do not allow update votes with both empty lists

* fix error messages

* check number of sons against votes number in account_object

* Update error message

* list_active_sons api call implementation

* unit test for list_active_sons

* fix code style

* use assert instead of checking condition with low possibility

* Fixed betting tests (#217)

* Fixed betting tests

* Removed comments

* removed unrelated parameter description from delete_son

* Add Bitcoin network listener to a SON plugin (#196)

* Add Bitcoin network listener to a SON plugin
* Add default parameters for Peerplays Bitcoin test node
* Add Bitcoin block processing
* Update source code to last designs
* Set default parameters for peerplays_sidechain plugin to Bitcoin test server
* WIP: Some Bitcoin transaction processing

* [SON-199] Fix unit tests (#233)

* fix app_test

* fix son_delete_test

* Add peerplays account for a SON in a config/command line options (#231)

* SON193-SON200- SON Heartbeats and maintenance mode changes (#241)

* SON193-SON200- SON Heartbeats and maintenance mode changes

* SON193-SON200- SON Heartbeats and maintenance tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

* SON194-SON195 - Report SON Down, addition of SON Account for sidechain consensus (#244)

* SON194-SON195 - Addition of SON BTC Account and report son down changes

* SON194-SON195 - SON BTC Account errors rectification

* SON194-SON195 - Adding Tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

Co-authored-by: obucinac <obucinac@users.noreply.github.com>

* SON206 - Plugin SON Heartbeat changes (#250)

* SON206 - Plugin SON Heartbeat changes

* SON206 - Plugin SON Heartbeat changes, comment removal

* SON206 - Plugin SON Heartbeat changes, stub testing and changes

* SON206 - Plugin SON Heartbeat changes, removing debugs prints

* Wallet recreation on new set of SONs voted in (#256)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* Fix build errors

* SON212-SON213 - Add Sidechain Plugin Code to report and approve SON Down proposal (#260)

* SON212 - Add Sidechain Plugin Code to report SON Down

* SON212-SON213 - Add Sidechain Plugin Code to report SON Down, Approve proposal from sidechain plugin

* SON212-SON213 - Fix Build Error (#262)

* SON212-SON213 - Fix Build Error

* SON212-SON213 - Fix Build Error Add smart_ref definition for linking

* Updated gitlab CI to sync submodules (#265)

* SON217 - SON Maintenance,Heartbeat state transition changes (#264)

* SON217 - SON Maintenance,Heartbeat state transition changes

* SON217 - SON Maintenance,Heartbeat state transition changes

* [SON-202] Implement cli_wallet commands for maintenance mode (#261)

* Add stop_son_maintenance CLI call

* fix bug with SON activation

* son_maintenance_operation

* son_maintenance_operation tests

* cli test for son maintenance state

* start_son_maintenance CLI call

* keep maintenance state during active SON set changes

* Quick fix for list_active_sons

* SON199 - Fix Unit Test Failure (#268)

* Quickfix for update_sidechain_address and delete_sidechain_address cli commands

* SON206_Plugin_CrashFix_Reorg - Plugin Changes (#272)

* SON206_Plugin_CrashFix_Reorg - Plugin Changes

* SON206_Plugin_CrashFix_Reorg - add owner auths to consensus account

* SON165 - Keys mapping missing from wallet data (#274)

* SON232 - Avoid duplicate proposals from sidechain plugin (#275)

* SON233 - Provide correct downtime metrics to user (#278)

* son_wallet_object operations and multisig wallet recreation by RPC (#263)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object
* son_wallet_object operations
* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
* son_wallet_object API and cli wallet commands
* Send RPC command to bitcoin node to recreate multisig wallet
* Updating wallet info through operation instead through database.modify() for persistance
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
* Refactor primary wallet recreation
* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
* Quickfix for checking payer in evaluator
* Fix failing son_wallet_tests
- Check for son_btc_account is temporarely disabled
* Remove redundant file
Co-authored-by: gladcow <jahr@yandex.ru>

* SON214 - Request maintenance wallet commands (#280)

* SON wallet transfer object and operations (#279)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add is_active_son guards for sidechain events processing

Co-authored-by: gladcow <jahr@yandex.ru>

* Support multiple SON nodes per software instance (#282)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Temoprary disable account history tests for tracking accounts

Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-209] Create P2SH address with custom redeemScript (#271)

* Create redeem script for SONs primary wallet

* Add importaddress call

Allows to watch for related transactions without private keys import

* Get UTXO set for watched addresses

* createrawtransaction call

* signing PW spending transaction

* unit test for btc tx serialization

* sending PW transfer in test

* BIP143 tx signing

* use bech32 address format

* use single sha256 for lock script

* Digest fix

* working signing

* separate signing

* test partially signed PW transfer

* add ability to gather signatures before signing (#290)

* [SON-242] fix list_active_sons call after deleting an active son (#292)

* test to reproduce error in list_active_sons after delete_son

* prevent exception in list_active_list

* [SON-260] Sidechain Token withdrawal (#286)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* Withdrawal refactoring

* Withdrawal refactoring

Co-authored-by: gladcow <jahr@yandex.ru>

* SON261 - Bitcoin deposit, withdrawal, PW transfer (#287)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* SON261 - Deposit transfer ( user address -> PW ) and Withdrawal transfer ( PW -> user address ) for m-of-n multisig

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* SON261 - Withdrawal transfer ( PW -> user address ), addition of bitcoin public private key to config.ini for multiple sons mode

* Withdrawal refactoring

* Withdrawal refactoring

* SON261 - Fix prepare_tx

* SON261 - Add PW->PW Transfer and Code reorg

* Fix file permissions

Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-264] Integrating deposit/withdrawals with bitcoin transactions (feature/SON-260 + SON261 branches) (#291)

* Partial integration done, some Bitcoin RPC refactoring
* CLang Format config file
* CLang Format config file v2.0
* Fix repeating tasks that should be executed by scheduled SON only
* Fix withdrawal
* Integrate PW wallet fund moving
* Resolve conflicts

Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>

* SON200 - SON Down proposal broken after latest merges (#294)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness (#298)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness

* Various SON improvements (#297)

* Refactor SON processing
* Better exposure of sidechain private keys in sidechain handlers
* Support non default Bitcoin wallets
* Fix crash on config file recreation
* clang-format formatting
* New Bitcoin wallet related RPC calls
* Add missing create_son_deregister_proposals calls
* Add missing create_son_deregister_proposals calls
* Add loading/unlocking/locking of non-default bitcoin wallet
* Bitcon RFC logs improved, proposal aprovement improved
* Move signal connection after handlers are created

* Merge develop into SONS

* SON118 - Add tx sign metrics for SON rewards (#302)

* resolved compilation issues and other conflicts

* SON202 - Maintenance improvements (#303)

* Quickfix, remove dead code, return result from wallet withdraw do_evaluate

* SON275 - ZMQ Crash on application exit (#306)

* SON275 - ZMQ Crash on application exit

* SON275 - Fix Indentation

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* need to assign both name and id to stats id

* fix unit test case failures(add gpos vesting before voting)

* SON276 - Fix SON proposal exceptions - I (#307)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Add SON statistic for tracking reported sidechain transactions (#308)

- Deposit and Withdrawal object extended to contain expected
  and received transaction reports from SON network
- SON statistic object extended to contain total number of
  sidechain transactions reported by SON network when SON was
  active and number of transactions reported by single SON when
  he was active
- Code formatting

* Allow voting for son, only if GPOS vesting balance available

* notifications of SONS should get restrict to sons functionality

* update GPOS hardfork date to sons branch

* SON127 - Add son parameter extensions to genesis, push proposal fix (#310)

* SON276 - Fix SON proposal exceptions - I

* SON127 - Add son parameter extensions to genesis, push proposal fix

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* update GPOS HF to fall in before SONS HF, remove check

* updated unit test cases to reflect GPOS vesting and update account id's according to sons-account

* [SON-24] - SON Rewards missing serialisations and end to end testing (#313)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Revert "Merge develop branch changes(GPOS+graphene updates) into SONs branch"

* [SON-122] - SON Statistics improvements and consensus account creation (#318)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Replace raw with psbt transactions to support parital tx signing (#311)

* RPC calls for PSBT, raw transactions replaced with PSBT
* Fix estimatesmartfeerate, extensive RPC calls logging for debugging purposes
* Remove dead code
* Partial signing functional for deposit and withdrawal
* Fix sidechain_type declarations
* Depositing Peerplays asset refactored
* Partial signing functional for primary wallet funds moving
* Prettier logs
* Refactor multiple SON support processing
* Serialize field complete from sidechain_transaction_sign_operation
* Refactor transaction signing in particular order, BTC only (maybe) need it
* Add number of required signatures parameter for addmultisigaddress
* Change default bitcoin node parameters
* Transaction signing only by scheduled son
* Removed scheduling log
* Prevent PW funds moving to the same address
* Refactor sidechain_transaction_object processing, code cleanup
* Remove obsolete tests
* Decrease logging
* Code readability
* When updated, import son wallet bitcoin address to bitcoin wallet
* When updated, recreate son wallet bitcoin address on each node
* Refactor on_changed_objects, move it into task
* Add check to prevent deposit/withdrawal double processing
* Improved check for sidechain transaction object creation
* Single sidechain transaction signature per block allowed only
* Unlock wallet on addmultisigaddress
* Import both address and redeem script on primary wallet change, fix some compiler warnings
* Fix invalid list of signers for PW funds transfer

* [SON-312] Refactor create_son to assign owner account public key as a signing_key

remove key derivation from create son (#323)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* [SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322)

* Parallelizing sidechain transaction signing (#319)

* [SON-321, SON-323] Deposit/Withdraw object creation refactoring (#320)

* Remove proposals for creating deposit and withdrawal objects, strenghten evaluator checks
* Only active SON can create the object
* Only expected SON can confirm the transaction
* Transaction must be initiated (paid) by SON account owner (SON account given in operation)
* Transaction confirmation must contain exactly the same data as existing object
* Mirror SON owner account weights from son-account.active.account_auths to active SONs
* Fix duplicated typedef, peerplays_sidechain::sidechain_type to chain::sidechain_type
* Add missing serialized field

* [SON-318_SON-319] - Add approval checks for son down, deregister proposals (#321)

* [SON-318_SON-319] - Add approval checks for son down and deregister proposals

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-311] Add try_create_son call without explicit deposit params (#324)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Fix build error

* Quickfix - change GPOS and SON hardfork times

* [SON-332] Check gitlab building process for dirty build (#327)

* Fix failing son test, fix data types and check condition
* Very clean build on Gitlab

* update son-account parameters (#328)

* [SON-329] Hotfix - Enable test test_update_dividend_interval

* [SON-313] - Limit SON functionality when min no. of sons are not present (#329)

* [SON-313] - Limit SON functionality when min no. of sons are not present

* Revert SON HF related checks and tests

* Remove the capability to process proposals in plugin

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-307] Create PBTC asset  (#326)

* SON-297_SON-336 - SON vesting functionality broken after graphene merge (#331)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - add initialization values to extension params, remove trailing spaces

* [SON-305, SON-308, SON-310] Use BTC asset in bitcoin deposits and withdraws (#332)

* [SON-339] - SON Schedule crash (#334)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues (#335)

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-322, SON-324] Approval checks for processing deposit/withdrawal (#330)

* Refactor proposal processing
* Added check for approving son_wallet_deposit_process_operation
* Added check for approving son_wallet_withdraw_process_operation
* Calculating exchange rates fixed
* Fix depositing Peerplays assets

* [SON-320] Added check for approving son_wallet_update_operation (#336)

* [SON-325] Added check for approving sidechain_transaction_create_operation (#337)

* [SON-341, SON-342] Fix issue with deposits number (#339)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* [SON-344] BTC asset is created with wrong quote asset id, Fixed (#341)

* [SON-344] BTC asset is created with wrong quote asset id, Fixed
* Respond to code review

* [SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342)

* [SON-348] Transaction hash not saved in object after Bitcoin transaction is sent (#343)

- Fixed
- Unused parameters removed

* [SON-337] - Prevent update_son_votes without GPOS vesting (#344)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-353] Refactor PW processing, PW transfer fixed (#347)

* Add proposal checks for deposit and withdrawal
* Refactor proposal approvement
* Fix transaction verification
* Remove logs

* [SON-354] Fix son_info compare function (#350)

* check object's id (#351)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* SON Weighted Multi Signature Signing (#349)

* Bring in the bitcoin utils code into plugin
* Add tx creation, signing and tests
* tx deserialization fix
* add 10-of-14 multisig address test
* Add signing and verification tests and sign_transaction_standalone
* Add send_transaction_standalone function
* Debug logs and additional tests
* Fix for son deletion in the middle
* Extend script_builder
* Witness script for weighted wallet
* btc_weighted_multisig_address implementation
* Fix for bad-txns-nonstandard-inputs
* Weighted multisignature address test
* Create test tx with weighted multisig wallet
* Fix the issues with tx signing
* End to End test weighted multi sig
* 1 or m-of-n deposit address support
* Move network_type enum to the base class
* btc_one_or_weighted_multisig_address implementation
* Simplify redeem script
* Fix error in redeem_script
* btc_one_or_weighted_multisig_address tests
* Refactor sidechain address mapping
* CLANG code format
* CLANG code format sidechain tests
* Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring
* Move util functions to Utils file
* Add proper checks for withdraw fee
* Deposit address creation, import deposit/withdraw addresses, some code cleanup

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-349] Delay BTC asset issue/reserve until tx confirmed on sidchain (#348)

* Separate transaction settling from deposit/withdrawal processing
* Handle peerplays deposits with transaction settling
* Remove logs
* All dev features enabled/disabled with single flag
* Deposit/withdraw process and sidechain transaction creation in single proposal

* Hotfix - remove importing sidechain addresses

* Hotfix - remove redundant deposit sidechain address recreation

* private-key option update

* Use decoderawtraction json for proposal approvals (#352)

* Use decoderawtraction json for proposal approvals
* Use default null string to get first vout

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Prevent incorrect signatures to be added to transaction (#354)

* Prevent incorrect signatures to be added to transaction
* Check signers list before signing

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - use getrawtransaction for approvals and settling (#355)

* Revert "Use decoderawtraction json for proposal approvals (#352)"
This reverts commit d3385b28cb.
* User getrawtransaction for proposal approvals and settling
* Code cleanup

* [SON-135] Add timelock to user deposit address (#356)

* timelocks
* timelocked deposit address
* test for deposit timelock

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - fix threshold_weight calculation in redeem scripts

* fix broken peerplays_sidechain tests (#357)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Save deposit address redeem and witness script into sidechain address object

* [SON-359] - Fix Errors processing to-be-refunded deposits (#358)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-363] - Remove son deletion (#359)

* [SON-363] - Remove son deletion

* Fix the tests

* [SON-314] - Weighted Rewards and equal weighted son-account (#360)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Bitcoin network type deduction (#361)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* chore: changed building to debug mode

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* chore: updated Dockerfile with dnsutils

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Son deposit address enhancements (#362)

* Deposit address enhancements

* fix tests

Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>

* Ws updates

* Fix for custom operation authority checking (BTS Issue #210) (#382)

* Resolve #210: [HF] Check authorities on custom_operation

The required_auths field on custom_operation was being ignored during authority checking. This commit causes it to be checked correctly, and adds a unit test verifying as much.

* Ref #381: Fixes

Build and logic fixes for Pull Request #381

* Ref #381: Fix bad merge

During merge conflict resolution, I accidentally broke custom
authorities. This fixes it.

* compilation fix

Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* Cleanup changes for pretier diff

* Cleanup changes for prettier diff

* NFT Permissions (#380)

* Account Roles Permission 1 - Working code with tests

* Account Roles Permission 2 - Add marketplace offer/bid tests

* Account Roles Permission 3 - Add Op check

* Account Roles Permission 4 - Add chain params and limits

* Cleanup changes for prettier diff

* Fix failing saving_keys_wallet_test

* Fix failing saving_keys_wallet_test

* Align submodule versions

* Add missing break

* Increase tests log_level, some cleanup

* Decrease log level for tests

* Fix block_tests/maintenance_interval test

* Fix son_operation_tests/son_pay_test test

* Remove base_uri length checks

* Fix HF info

Co-authored-by: S <obucinac@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* SON hardfork time to Saturday, October 17, 2020 00:00:00 UTC

* hotfix - chain params variable overflow, rbac hf check (#387)

* hotfix - son max count fix

* init variables

* Update SON HF time to October 20th 2020, 00:00:00

* Update SON HF time to October 20th 2020, 00:00:00

* Release build fix, missing includes (#391)

fixes https://github.com/peerplays-network/peerplays/issues/390

* Fix release build on 18.04, fc::smart_ref_* removed (#394)

* Fix building on Ubuntu 18.04 with GCC 7

* Peerplays SON plugin skeleton (#122)

* Peerplays SON plugin skeleton
* SON tests skeleton

* Part two of SON-83 - plugins option in command line and config file (#126)

- Empty SON plugin is INACTIVE by default
- To enable it, add peerplays_sidechain to plugins section in
  config file, or use --plugins command line option
- Plugin can work with or without witness

* SON11 - Add chain extension parameter to set SON count

* [SON-107] Merge develop branch to SONs-base (#166)

* fix rng and get_winner_numbers implemented

* coipied code for bitshares fixing 429 and 433 isuues

* ticket_purchase_operation implemented. added lottery_options to asset

* lottery end implemented

* minor logic changes. added db_api and cli_wallet methods

* fix reindex on peerplays network

* fix some tests. add gitlab-ci.yml

* add pull to gitlab-ci

* fix

* fix and comment some tests

* added owner to lottery_asset_options. commented async call in on_applied_block callback

* added get_account_lotteries method to db_api and cli, lottery end_date and ticket_price verification

* merge get_account_lotteries branch. fix create_witness test

* fix test genesis and end_date verification

* fixed indices sorting and lottery end checking by date

* update db_version for replay and removed duplicate include files

* Added ntp and upgraded boost version

* Revert "GPOS protocol"

* need to remove backup files

* virtual-op-fix for deterministic virtual_op number

* Merged beatrice into 5050

* Updated gitmodules, changes to allow voting on lottery fee

* Removed submodule libraries/fc

* Added libraries/fc

* added missing , in types.hpp

* Added sweeps parameters to parameter_extension

* added missing comma in operations.hpp, small changes to config.hpp

* fixed returntype in chain_parameters.hpp

* removed sweeps_parameter_extensions

* Changed fc library

* fixed asset_object

* Changed peerplays-fc submodule

* Changed fc submodule to ubuntu 18.04 upgrade

* Removed submodule libraries/fc

* Added fc library back

* fix casting in overloaded function

* Removed blind_sign and unblind_signature functions

* Added new lottery_asset_create_operation

* Changed sweeps hardfork time

* Removed redundant if from asset_evaluator and fixed db_notify

* fixed duplicate code in fee_tests

* removed redundant tgenesis file

* Enable building on Ubuntu 18.04 using GCC 7 compiler

* fix: is_benefactor_reward had the default value of true when not set

* Docker file for Ubuntu 18.04

Base image updated to Unbuntu 18.04
Prerequisite list updated
Basic configuration updated

* Quick fix: Added missing package pkg-config

* Docker file updates

* 5050 fee update and compilation error fix

* Dockerfile, set system locale

Prevents locale::facet::_S_create_c_locale name error

* Update README.md

Fix typo

* Update README.md

* Changed hardfork time for SWEEPS and Core-429

* revert master changes that were brought in previous commit

* Fixed error when account_history_object with id 0 doesnt exist

* Fixed error while loading object database

* test for zero id object in account history

* Reorder operations in Dockerfile, to make image creation faster

- Reorder prevents unnecessary building of Boost libraries

* Fix for irrelevant signature included issue

* fix copyrigth messages order

* remove double empty lines

* Backport fix for `get_account_history` from https://github.com/bitshares/bitshares-core/pull/628 and add additional account history test case

* NTP client back

* GRPH-53-Log_format_error

* Merge pull request #1036 from jmjatlanta/issue_730

Add fail_reason to proposal_object

* Unit test case fixes and prepared SONs base

* Use offsetof instead of custom macro

* Hide some compiler warnings

* Make all the tests compile

* Add nullptr check in api.cpp for easier testing

* Add test case for broadcast_trx_with_callback API

* Unit test case fixes and prepared SONs base

* Merge pull request #714 from pmconrad/json_fix

JSON fix

* Increase max depth for trx confirmation callback

* Adapt to variant API with `max_depth` argument

* Update fc submodule

* Created unit test for #325

* remove needless find()

* GRPH-4-CliWallet_crash_ctrlD

* fix copyright message

* Make all the tests compile

* increase delay for node connection

* Increase block creation timeout to 2500ms

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Improved resilience of block database against corruption

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed duplicate ops returned from get_account_history

* minor performance improvement

* Added comment

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Fixed test failures and compilation issue

* Fixed account_history_pagination test

* Fix compilation in debug mode

* Removed unrelated comment

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* Allow sufficient space for new undo_session

* Throw for deep nesting

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* Added cli_test to CI

* use random port numbers in app_test (#154)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* fix for lottery end

* fix declarations

* fix declarations

* fix boost integer

* fix compilation

* fix chain tests

* fix app_test

* try to fix cli test

* fix incorrect max_depth param

* working cli test

* correct fc version

* Revert "[SON-107] Merge develop branch to SONs-base (#166)"

This reverts commit 499e318199.

* Fix build error, add missing GRAPHENE_MAX_NESTED_OBJECTS parameter

* Plugin description added, SON plugin params example

* fix for cli test

* SON object, operations, cli_wallet commands and RPC (#160)

- create_son, update_son, delete_son, list_sons
- get_sons, get_son_by_account, lookup_son_accounts, get_son_count
- vote_for_son, update_son_votes
- claim_registered_son
- get_son in cli_wallet
- Updating global_property_object
- Decrease SON hardfork time for test purposes
- CLI Wallet tests imported from develop branch

* fix affiliate tests

* SON-108 - Add cli wallet tests for create_son (#174)

* SON-108 - Add cli wallet tests for create_son

* Add info message at the beginning and end of the SON CLI tests

* Minor output message change

* Enable Boost test messages in unit tests

* [SON-110] get_son cli test (#173)

* get_son cli test

* update_son cli test

* Add cli wallet tests for vote_for_son (#175)

* fix insert object processing in indexes, son_delete is working

* Fix segfault when using delete_son from cli_wallet (#177)

* Fix segfault when using list_sons from cli_wallet (#178)

* Add son_delete cli tests (#182)

* Add son_delete cli tests

* add son vesting config options

* add vesting balance type support

* add dormant vesting policy for son

* add precision to son vesting amount

* SON118-Add Budget for SON (#165)

* SON118-Add Budget for SON

* SON118 - Compilation errors fix

* SON118 - Proper commenting around pay_sons function

* SON118 - Comment correction, SON statistics object implementation type correction

* SON118 - Add missing index init and reflect enums

* SON118 - Correcting the indentation

* SON118 SON144 - Add unit test, code fixes and resolve failures for existing tests

* SON118 SON144 - Removing extra spaces added

* abstraction of dormant vesting policy

* force son create vesting balance to have dormant policy

* remove not needed code from wallet son commands, add delete son test to cli (#181)

* Active SONs, list up to 15, order by votes, add test (#185)

* Add test for selecting 15 SONs with highest votes
* Display up to 15 active SONs, SON ordering by total_votes

* fix build error (#191)

* fix build error

* adapt son_pay_test to dormant vesting policy

* [SON-113] Unit test for cli `update_son_votes` (#179)

* refactor cli tests

* update_son_votes tests

* list_sons test

* test changes in get_global_properties() result

* fix generate_block failure

* fix update_son_votes test

* improve update_son cli test

* fix linking errors

* refactor select_top_fifteen_sons test

* refactor other son cli tests to use son_test_helper

* create_vesting call in wallet_api

* test fix

* fix create_son in wallet_api and cli tests

* SON126 - Witness Proposals to deregister SONs (#192)

* SON126 - Witness Proposals to deregister SONs

* SON126 - Approval by witness, removal of son_proposal_object, commenting

* SON126 - Witness proposal tests and related fixes

* SON126 - Proper commenting

* fix son_delete_operation reflection

* [SON-160] Fix create_vesting wallet_api call (#206)

* Fix create_vesting wallet_api call

* change type for vesting_type in create_vesting_balance

* [SON-113] Fix several issues in update_son_votes call in wallet_api  (#208)

* do not allow update votes with both empty lists

* fix error messages

* check number of sons against votes number in account_object

* Update error message

* list_active_sons api call implementation

* unit test for list_active_sons

* fix code style

* use assert instead of checking condition with low possibility

* Fixed betting tests (#217)

* Fixed betting tests

* Removed comments

* removed unrelated parameter description from delete_son

* Add Bitcoin network listener to a SON plugin (#196)

* Add Bitcoin network listener to a SON plugin
* Add default parameters for Peerplays Bitcoin test node
* Add Bitcoin block processing
* Update source code to last designs
* Set default parameters for peerplays_sidechain plugin to Bitcoin test server
* WIP: Some Bitcoin transaction processing

* [SON-199] Fix unit tests (#233)

* fix app_test

* fix son_delete_test

* Add peerplays account for a SON in a config/command line options (#231)

* SON193-SON200- SON Heartbeats and maintenance mode changes (#241)

* SON193-SON200- SON Heartbeats and maintenance mode changes

* SON193-SON200- SON Heartbeats and maintenance tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

* SON194-SON195 - Report SON Down, addition of SON Account for sidechain consensus (#244)

* SON194-SON195 - Addition of SON BTC Account and report son down changes

* SON194-SON195 - SON BTC Account errors rectification

* SON194-SON195 - Adding Tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

Co-authored-by: obucinac <obucinac@users.noreply.github.com>

* SON206 - Plugin SON Heartbeat changes (#250)

* SON206 - Plugin SON Heartbeat changes

* SON206 - Plugin SON Heartbeat changes, comment removal

* SON206 - Plugin SON Heartbeat changes, stub testing and changes

* SON206 - Plugin SON Heartbeat changes, removing debugs prints

* Wallet recreation on new set of SONs voted in (#256)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* Fix build errors

* SON212-SON213 - Add Sidechain Plugin Code to report and approve SON Down proposal (#260)

* SON212 - Add Sidechain Plugin Code to report SON Down

* SON212-SON213 - Add Sidechain Plugin Code to report SON Down, Approve proposal from sidechain plugin

* SON212-SON213 - Fix Build Error (#262)

* SON212-SON213 - Fix Build Error

* SON212-SON213 - Fix Build Error Add smart_ref definition for linking

* Updated gitlab CI to sync submodules (#265)

* SON217 - SON Maintenance,Heartbeat state transition changes (#264)

* SON217 - SON Maintenance,Heartbeat state transition changes

* SON217 - SON Maintenance,Heartbeat state transition changes

* [SON-202] Implement cli_wallet commands for maintenance mode (#261)

* Add stop_son_maintenance CLI call

* fix bug with SON activation

* son_maintenance_operation

* son_maintenance_operation tests

* cli test for son maintenance state

* start_son_maintenance CLI call

* keep maintenance state during active SON set changes

* Quick fix for list_active_sons

* SON199 - Fix Unit Test Failure (#268)

* Quickfix for update_sidechain_address and delete_sidechain_address cli commands

* SON206_Plugin_CrashFix_Reorg - Plugin Changes (#272)

* SON206_Plugin_CrashFix_Reorg - Plugin Changes

* SON206_Plugin_CrashFix_Reorg - add owner auths to consensus account

* SON165 - Keys mapping missing from wallet data (#274)

* SON232 - Avoid duplicate proposals from sidechain plugin (#275)

* SON233 - Provide correct downtime metrics to user (#278)

* son_wallet_object operations and multisig wallet recreation by RPC (#263)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object
* son_wallet_object operations
* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
* son_wallet_object API and cli wallet commands
* Send RPC command to bitcoin node to recreate multisig wallet
* Updating wallet info through operation instead through database.modify() for persistance
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
* Refactor primary wallet recreation
* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
* Quickfix for checking payer in evaluator
* Fix failing son_wallet_tests
- Check for son_btc_account is temporarely disabled
* Remove redundant file
Co-authored-by: gladcow <jahr@yandex.ru>

* SON214 - Request maintenance wallet commands (#280)

* SON wallet transfer object and operations (#279)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add is_active_son guards for sidechain events processing

Co-authored-by: gladcow <jahr@yandex.ru>

* Support multiple SON nodes per software instance (#282)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Temoprary disable account history tests for tracking accounts

Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-209] Create P2SH address with custom redeemScript (#271)

* Create redeem script for SONs primary wallet

* Add importaddress call

Allows to watch for related transactions without private keys import

* Get UTXO set for watched addresses

* createrawtransaction call

* signing PW spending transaction

* unit test for btc tx serialization

* sending PW transfer in test

* BIP143 tx signing

* use bech32 address format

* use single sha256 for lock script

* Digest fix

* working signing

* separate signing

* test partially signed PW transfer

* add ability to gather signatures before signing (#290)

* [SON-242] fix list_active_sons call after deleting an active son (#292)

* test to reproduce error in list_active_sons after delete_son

* prevent exception in list_active_list

* [SON-260] Sidechain Token withdrawal (#286)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* Withdrawal refactoring

* Withdrawal refactoring

Co-authored-by: gladcow <jahr@yandex.ru>

* SON261 - Bitcoin deposit, withdrawal, PW transfer (#287)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* SON261 - Deposit transfer ( user address -> PW ) and Withdrawal transfer ( PW -> user address ) for m-of-n multisig

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* SON261 - Withdrawal transfer ( PW -> user address ), addition of bitcoin public private key to config.ini for multiple sons mode

* Withdrawal refactoring

* Withdrawal refactoring

* SON261 - Fix prepare_tx

* SON261 - Add PW->PW Transfer and Code reorg

* Fix file permissions

Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-264] Integrating deposit/withdrawals with bitcoin transactions (feature/SON-260 + SON261 branches) (#291)

* Partial integration done, some Bitcoin RPC refactoring
* CLang Format config file
* CLang Format config file v2.0
* Fix repeating tasks that should be executed by scheduled SON only
* Fix withdrawal
* Integrate PW wallet fund moving
* Resolve conflicts

Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>

* SON200 - SON Down proposal broken after latest merges (#294)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness (#298)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness

* Various SON improvements (#297)

* Refactor SON processing
* Better exposure of sidechain private keys in sidechain handlers
* Support non default Bitcoin wallets
* Fix crash on config file recreation
* clang-format formatting
* New Bitcoin wallet related RPC calls
* Add missing create_son_deregister_proposals calls
* Add missing create_son_deregister_proposals calls
* Add loading/unlocking/locking of non-default bitcoin wallet
* Bitcon RFC logs improved, proposal aprovement improved
* Move signal connection after handlers are created

* Merge develop into SONS

* SON118 - Add tx sign metrics for SON rewards (#302)

* resolved compilation issues and other conflicts

* SON202 - Maintenance improvements (#303)

* Quickfix, remove dead code, return result from wallet withdraw do_evaluate

* SON275 - ZMQ Crash on application exit (#306)

* SON275 - ZMQ Crash on application exit

* SON275 - Fix Indentation

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* need to assign both name and id to stats id

* fix unit test case failures(add gpos vesting before voting)

* SON276 - Fix SON proposal exceptions - I (#307)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Add SON statistic for tracking reported sidechain transactions (#308)

- Deposit and Withdrawal object extended to contain expected
  and received transaction reports from SON network
- SON statistic object extended to contain total number of
  sidechain transactions reported by SON network when SON was
  active and number of transactions reported by single SON when
  he was active
- Code formatting

* Allow voting for son, only if GPOS vesting balance available

* notifications of SONS should get restrict to sons functionality

* update GPOS hardfork date to sons branch

* SON127 - Add son parameter extensions to genesis, push proposal fix (#310)

* SON276 - Fix SON proposal exceptions - I

* SON127 - Add son parameter extensions to genesis, push proposal fix

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* update GPOS HF to fall in before SONS HF, remove check

* updated unit test cases to reflect GPOS vesting and update account id's according to sons-account

* [SON-24] - SON Rewards missing serialisations and end to end testing (#313)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Revert "Merge develop branch changes(GPOS+graphene updates) into SONs branch"

* [SON-122] - SON Statistics improvements and consensus account creation (#318)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Replace raw with psbt transactions to support parital tx signing (#311)

* RPC calls for PSBT, raw transactions replaced with PSBT
* Fix estimatesmartfeerate, extensive RPC calls logging for debugging purposes
* Remove dead code
* Partial signing functional for deposit and withdrawal
* Fix sidechain_type declarations
* Depositing Peerplays asset refactored
* Partial signing functional for primary wallet funds moving
* Prettier logs
* Refactor multiple SON support processing
* Serialize field complete from sidechain_transaction_sign_operation
* Refactor transaction signing in particular order, BTC only (maybe) need it
* Add number of required signatures parameter for addmultisigaddress
* Change default bitcoin node parameters
* Transaction signing only by scheduled son
* Removed scheduling log
* Prevent PW funds moving to the same address
* Refactor sidechain_transaction_object processing, code cleanup
* Remove obsolete tests
* Decrease logging
* Code readability
* When updated, import son wallet bitcoin address to bitcoin wallet
* When updated, recreate son wallet bitcoin address on each node
* Refactor on_changed_objects, move it into task
* Add check to prevent deposit/withdrawal double processing
* Improved check for sidechain transaction object creation
* Single sidechain transaction signature per block allowed only
* Unlock wallet on addmultisigaddress
* Import both address and redeem script on primary wallet change, fix some compiler warnings
* Fix invalid list of signers for PW funds transfer

* [SON-312] Refactor create_son to assign owner account public key as a signing_key

remove key derivation from create son (#323)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* [SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322)

* Parallelizing sidechain transaction signing (#319)

* [SON-321, SON-323] Deposit/Withdraw object creation refactoring (#320)

* Remove proposals for creating deposit and withdrawal objects, strenghten evaluator checks
* Only active SON can create the object
* Only expected SON can confirm the transaction
* Transaction must be initiated (paid) by SON account owner (SON account given in operation)
* Transaction confirmation must contain exactly the same data as existing object
* Mirror SON owner account weights from son-account.active.account_auths to active SONs
* Fix duplicated typedef, peerplays_sidechain::sidechain_type to chain::sidechain_type
* Add missing serialized field

* [SON-318_SON-319] - Add approval checks for son down, deregister proposals (#321)

* [SON-318_SON-319] - Add approval checks for son down and deregister proposals

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-311] Add try_create_son call without explicit deposit params (#324)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Fix build error

* Quickfix - change GPOS and SON hardfork times

* [SON-332] Check gitlab building process for dirty build (#327)

* Fix failing son test, fix data types and check condition
* Very clean build on Gitlab

* update son-account parameters (#328)

* [SON-329] Hotfix - Enable test test_update_dividend_interval

* [SON-313] - Limit SON functionality when min no. of sons are not present (#329)

* [SON-313] - Limit SON functionality when min no. of sons are not present

* Revert SON HF related checks and tests

* Remove the capability to process proposals in plugin

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-307] Create PBTC asset  (#326)

* SON-297_SON-336 - SON vesting functionality broken after graphene merge (#331)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - add initialization values to extension params, remove trailing spaces

* [SON-305, SON-308, SON-310] Use BTC asset in bitcoin deposits and withdraws (#332)

* [SON-339] - SON Schedule crash (#334)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues (#335)

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-322, SON-324] Approval checks for processing deposit/withdrawal (#330)

* Refactor proposal processing
* Added check for approving son_wallet_deposit_process_operation
* Added check for approving son_wallet_withdraw_process_operation
* Calculating exchange rates fixed
* Fix depositing Peerplays assets

* [SON-320] Added check for approving son_wallet_update_operation (#336)

* [SON-325] Added check for approving sidechain_transaction_create_operation (#337)

* [SON-341, SON-342] Fix issue with deposits number (#339)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* [SON-344] BTC asset is created with wrong quote asset id, Fixed (#341)

* [SON-344] BTC asset is created with wrong quote asset id, Fixed
* Respond to code review

* [SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342)

* [SON-348] Transaction hash not saved in object after Bitcoin transaction is sent (#343)

- Fixed
- Unused parameters removed

* [SON-337] - Prevent update_son_votes without GPOS vesting (#344)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-353] Refactor PW processing, PW transfer fixed (#347)

* Add proposal checks for deposit and withdrawal
* Refactor proposal approvement
* Fix transaction verification
* Remove logs

* [SON-354] Fix son_info compare function (#350)

* check object's id (#351)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* SON Weighted Multi Signature Signing (#349)

* Bring in the bitcoin utils code into plugin
* Add tx creation, signing and tests
* tx deserialization fix
* add 10-of-14 multisig address test
* Add signing and verification tests and sign_transaction_standalone
* Add send_transaction_standalone function
* Debug logs and additional tests
* Fix for son deletion in the middle
* Extend script_builder
* Witness script for weighted wallet
* btc_weighted_multisig_address implementation
* Fix for bad-txns-nonstandard-inputs
* Weighted multisignature address test
* Create test tx with weighted multisig wallet
* Fix the issues with tx signing
* End to End test weighted multi sig
* 1 or m-of-n deposit address support
* Move network_type enum to the base class
* btc_one_or_weighted_multisig_address implementation
* Simplify redeem script
* Fix error in redeem_script
* btc_one_or_weighted_multisig_address tests
* Refactor sidechain address mapping
* CLANG code format
* CLANG code format sidechain tests
* Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring
* Move util functions to Utils file
* Add proper checks for withdraw fee
* Deposit address creation, import deposit/withdraw addresses, some code cleanup

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-349] Delay BTC asset issue/reserve until tx confirmed on sidchain (#348)

* Separate transaction settling from deposit/withdrawal processing
* Handle peerplays deposits with transaction settling
* Remove logs
* All dev features enabled/disabled with single flag
* Deposit/withdraw process and sidechain transaction creation in single proposal

* Hotfix - remove importing sidechain addresses

* Hotfix - remove redundant deposit sidechain address recreation

* private-key option update

* Use decoderawtraction json for proposal approvals (#352)

* Use decoderawtraction json for proposal approvals
* Use default null string to get first vout

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Prevent incorrect signatures to be added to transaction (#354)

* Prevent incorrect signatures to be added to transaction
* Check signers list before signing

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - use getrawtransaction for approvals and settling (#355)

* Revert "Use decoderawtraction json for proposal approvals (#352)"
This reverts commit d3385b28cb.
* User getrawtransaction for proposal approvals and settling
* Code cleanup

* [SON-135] Add timelock to user deposit address (#356)

* timelocks
* timelocked deposit address
* test for deposit timelock

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - fix threshold_weight calculation in redeem scripts

* fix broken peerplays_sidechain tests (#357)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Save deposit address redeem and witness script into sidechain address object

* [SON-359] - Fix Errors processing to-be-refunded deposits (#358)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-363] - Remove son deletion (#359)

* [SON-363] - Remove son deletion

* Fix the tests

* [SON-314] - Weighted Rewards and equal weighted son-account (#360)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Bitcoin network type deduction (#361)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* chore: changed building to debug mode

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* chore: updated Dockerfile with dnsutils

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Son deposit address enhancements (#362)

* Deposit address enhancements

* fix tests

Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>

* Ws updates

* Fix for custom operation authority checking (BTS Issue #210) (#382)

* Resolve #210: [HF] Check authorities on custom_operation

The required_auths field on custom_operation was being ignored during authority checking. This commit causes it to be checked correctly, and adds a unit test verifying as much.

* Ref #381: Fixes

Build and logic fixes for Pull Request #381

* Ref #381: Fix bad merge

During merge conflict resolution, I accidentally broke custom
authorities. This fixes it.

* compilation fix

Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* Cleanup changes for pretier diff

* Cleanup changes for prettier diff

* NFT Permissions (#380)

* Account Roles Permission 1 - Working code with tests

* Account Roles Permission 2 - Add marketplace offer/bid tests

* Account Roles Permission 3 - Add Op check

* Account Roles Permission 4 - Add chain params and limits

* Cleanup changes for prettier diff

* Fix failing saving_keys_wallet_test

* Fix failing saving_keys_wallet_test

* Align submodule versions

* Add missing break

* Increase tests log_level, some cleanup

* Decrease log level for tests

* Fix block_tests/maintenance_interval test

* Fix son_operation_tests/son_pay_test test

* Remove base_uri length checks

* Fix HF info

* hotfix - chain params variable overflow, rbac hf check (#387)

* hotfix - son max count fix (#389)

* hotfix - son max count fix

* init variables

* Release build fix, missing includes

* Fix release build on 18.04, fc::smart_ref_* removed

* Gitlab will build Debug and Release versions

* Revert "Gitlab will build Debug and Release versions"

This reverts commit 7a721f8094.

* Gitlab will build Release version only

* Hotfix/remove smart ref (#396)

* Merge develop into beatrice (#386)

* Fix building on Ubuntu 18.04 with GCC 7

* Peerplays SON plugin skeleton (#122)

* Peerplays SON plugin skeleton
* SON tests skeleton

* Part two of SON-83 - plugins option in command line and config file (#126)

- Empty SON plugin is INACTIVE by default
- To enable it, add peerplays_sidechain to plugins section in
  config file, or use --plugins command line option
- Plugin can work with or without witness

* SON11 - Add chain extension parameter to set SON count

* [SON-107] Merge develop branch to SONs-base (#166)

* fix rng and get_winner_numbers implemented

* coipied code for bitshares fixing 429 and 433 isuues

* ticket_purchase_operation implemented. added lottery_options to asset

* lottery end implemented

* minor logic changes. added db_api and cli_wallet methods

* fix reindex on peerplays network

* fix some tests. add gitlab-ci.yml

* add pull to gitlab-ci

* fix

* fix and comment some tests

* added owner to lottery_asset_options. commented async call in on_applied_block callback

* added get_account_lotteries method to db_api and cli, lottery end_date and ticket_price verification

* merge get_account_lotteries branch. fix create_witness test

* fix test genesis and end_date verification

* fixed indices sorting and lottery end checking by date

* update db_version for replay and removed duplicate include files

* Added ntp and upgraded boost version

* Revert "GPOS protocol"

* need to remove backup files

* virtual-op-fix for deterministic virtual_op number

* Merged beatrice into 5050

* Updated gitmodules, changes to allow voting on lottery fee

* Removed submodule libraries/fc

* Added libraries/fc

* added missing , in types.hpp

* Added sweeps parameters to parameter_extension

* added missing comma in operations.hpp, small changes to config.hpp

* fixed returntype in chain_parameters.hpp

* removed sweeps_parameter_extensions

* Changed fc library

* fixed asset_object

* Changed peerplays-fc submodule

* Changed fc submodule to ubuntu 18.04 upgrade

* Removed submodule libraries/fc

* Added fc library back

* fix casting in overloaded function

* Removed blind_sign and unblind_signature functions

* Added new lottery_asset_create_operation

* Changed sweeps hardfork time

* Removed redundant if from asset_evaluator and fixed db_notify

* fixed duplicate code in fee_tests

* removed redundant tgenesis file

* Enable building on Ubuntu 18.04 using GCC 7 compiler

* fix: is_benefactor_reward had the default value of true when not set

* Docker file for Ubuntu 18.04

Base image updated to Unbuntu 18.04
Prerequisite list updated
Basic configuration updated

* Quick fix: Added missing package pkg-config

* Docker file updates

* 5050 fee update and compilation error fix

* Dockerfile, set system locale

Prevents locale::facet::_S_create_c_locale name error

* Update README.md

Fix typo

* Update README.md

* Changed hardfork time for SWEEPS and Core-429

* revert master changes that were brought in previous commit

* Fixed error when account_history_object with id 0 doesnt exist

* Fixed error while loading object database

* test for zero id object in account history

* Reorder operations in Dockerfile, to make image creation faster

- Reorder prevents unnecessary building of Boost libraries

* Fix for irrelevant signature included issue

* fix copyrigth messages order

* remove double empty lines

* Backport fix for `get_account_history` from https://github.com/bitshares/bitshares-core/pull/628 and add additional account history test case

* NTP client back

* GRPH-53-Log_format_error

* Merge pull request #1036 from jmjatlanta/issue_730

Add fail_reason to proposal_object

* Unit test case fixes and prepared SONs base

* Use offsetof instead of custom macro

* Hide some compiler warnings

* Make all the tests compile

* Add nullptr check in api.cpp for easier testing

* Add test case for broadcast_trx_with_callback API

* Unit test case fixes and prepared SONs base

* Merge pull request #714 from pmconrad/json_fix

JSON fix

* Increase max depth for trx confirmation callback

* Adapt to variant API with `max_depth` argument

* Update fc submodule

* Created unit test for #325

* remove needless find()

* GRPH-4-CliWallet_crash_ctrlD

* fix copyright message

* Make all the tests compile

* increase delay for node connection

* Increase block creation timeout to 2500ms

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Improved resilience of block database against corruption

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed duplicate ops returned from get_account_history

* minor performance improvement

* Added comment

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Fixed test failures and compilation issue

* Fixed account_history_pagination test

* Fix compilation in debug mode

* Removed unrelated comment

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* Allow sufficient space for new undo_session

* Throw for deep nesting

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* Added cli_test to CI

* use random port numbers in app_test (#154)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* fix for lottery end

* fix declarations

* fix declarations

* fix boost integer

* fix compilation

* fix chain tests

* fix app_test

* try to fix cli test

* fix incorrect max_depth param

* working cli test

* correct fc version

* Revert "[SON-107] Merge develop branch to SONs-base (#166)"

This reverts commit 499e318199.

* Fix build error, add missing GRAPHENE_MAX_NESTED_OBJECTS parameter

* Plugin description added, SON plugin params example

* fix for cli test

* SON object, operations, cli_wallet commands and RPC (#160)

- create_son, update_son, delete_son, list_sons
- get_sons, get_son_by_account, lookup_son_accounts, get_son_count
- vote_for_son, update_son_votes
- claim_registered_son
- get_son in cli_wallet
- Updating global_property_object
- Decrease SON hardfork time for test purposes
- CLI Wallet tests imported from develop branch

* fix affiliate tests

* SON-108 - Add cli wallet tests for create_son (#174)

* SON-108 - Add cli wallet tests for create_son

* Add info message at the beginning and end of the SON CLI tests

* Minor output message change

* Enable Boost test messages in unit tests

* [SON-110] get_son cli test (#173)

* get_son cli test

* update_son cli test

* Add cli wallet tests for vote_for_son (#175)

* fix insert object processing in indexes, son_delete is working

* Fix segfault when using delete_son from cli_wallet (#177)

* Fix segfault when using list_sons from cli_wallet (#178)

* Add son_delete cli tests (#182)

* Add son_delete cli tests

* add son vesting config options

* add vesting balance type support

* add dormant vesting policy for son

* add precision to son vesting amount

* SON118-Add Budget for SON (#165)

* SON118-Add Budget for SON

* SON118 - Compilation errors fix

* SON118 - Proper commenting around pay_sons function

* SON118 - Comment correction, SON statistics object implementation type correction

* SON118 - Add missing index init and reflect enums

* SON118 - Correcting the indentation

* SON118 SON144 - Add unit test, code fixes and resolve failures for existing tests

* SON118 SON144 - Removing extra spaces added

* abstraction of dormant vesting policy

* force son create vesting balance to have dormant policy

* remove not needed code from wallet son commands, add delete son test to cli (#181)

* Active SONs, list up to 15, order by votes, add test (#185)

* Add test for selecting 15 SONs with highest votes
* Display up to 15 active SONs, SON ordering by total_votes

* fix build error (#191)

* fix build error

* adapt son_pay_test to dormant vesting policy

* [SON-113] Unit test for cli `update_son_votes` (#179)

* refactor cli tests

* update_son_votes tests

* list_sons test

* test changes in get_global_properties() result

* fix generate_block failure

* fix update_son_votes test

* improve update_son cli test

* fix linking errors

* refactor select_top_fifteen_sons test

* refactor other son cli tests to use son_test_helper

* create_vesting call in wallet_api

* test fix

* fix create_son in wallet_api and cli tests

* SON126 - Witness Proposals to deregister SONs (#192)

* SON126 - Witness Proposals to deregister SONs

* SON126 - Approval by witness, removal of son_pro…

* Set SON HF time to October 28, 2020 0:00:00

* Merge Master to Beatrice (#407)

* Fix failing gpos tests

* Fix failing son test

* Fix failing betting test

* Set SON and NFT hardfork date to 2020-12-19 00:00:00 GMT

* Fix failing son_cli tests

* Set SON and NFT hardfork date to 2020-12-21 00:00:00 GMT

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: abitmore <abitmore@users.noreply.github.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: Miha Čančula <miha@noughmad.eu>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Peter Conrad <conrad@quisquis.de>
Co-authored-by: Wei Yang <richard.weiyang@gmail.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: crypto-ape <43807588+crypto-ape@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>
2020-12-14 19:40:27 +05:30
serkixenos
fe4882b402 Merge branch 'merge/master-to-beatrice-20201203' into beatrice 2020-12-05 03:57:27 +01:00
serkixenos
6a72fcf873
Merge Master to Beatrice (#407) 2020-12-05 03:50:31 +01:00
serkixenos
c34c00441b Merge branch 'master' into merge/master-to-beatrice-20201203 2020-12-05 03:45:06 +01:00
serkixenos
f532386567
Build optimizations (#403)
* Build optimizations, simplify dependancy tree

* Build optimizations, simplify dependancy tree
2020-11-12 19:38:25 +05:30
serkixenos
99c8c2dd51
Merge beatrice to develop to align SON hardfork date (#399) 2020-11-03 14:45:05 +01:00
serkixenos
fc705e947f
Merge pull request #401 from peerplays-network/hotfix/build-executables
Hotfix: Build executables by default
2020-11-02 14:47:07 +01:00
serkixenos
a73eb4caf8
Hotfix: Build executables by default
Building executables by default was disabled by recent changes to main CMakeLists.txt
2020-10-31 00:23:55 +01:00
Bobinson K B
009658efe5 Merge branch 'feature/sync-fc-OCT' into 'develop'
Point develop branch to latest fc commits

See merge request PBSA/peerplays!6
2020-10-27 21:45:15 +00:00
pravin-battu
9df439d78d point develop branch to latest fc commits 2020-10-27 17:46:04 -03:00
Bobinson K B
dd460e7ac8 Merge branch 'feature/rl-editline' into 'develop'
editline implementation

See merge request PBSA/peerplays!4
2020-10-27 17:34:05 +00:00
Bobinson K B
67bc7878dc Merge branch 'feature/api_limit_error_msg' into 'develop'
Feature/api limit error msg

See merge request PBSA/peerplays!5
2020-10-27 17:32:02 +00:00
blockc p
59eacef161 Feature/api limit error msg 2020-10-27 17:32:00 +00:00
serkixenos
454f567cfc
Set SON HF time to October 28, 2020 0:00:00 2020-10-23 15:57:23 +02:00
serkixenos
39263ba774
Fix release build on 18.04, fc::smart_ref_* removed (#394)
* Fix building on Ubuntu 18.04 with GCC 7

* Peerplays SON plugin skeleton (#122)

* Peerplays SON plugin skeleton
* SON tests skeleton

* Part two of SON-83 - plugins option in command line and config file (#126)

- Empty SON plugin is INACTIVE by default
- To enable it, add peerplays_sidechain to plugins section in
  config file, or use --plugins command line option
- Plugin can work with or without witness

* SON11 - Add chain extension parameter to set SON count

* [SON-107] Merge develop branch to SONs-base (#166)

* fix rng and get_winner_numbers implemented

* coipied code for bitshares fixing 429 and 433 isuues

* ticket_purchase_operation implemented. added lottery_options to asset

* lottery end implemented

* minor logic changes. added db_api and cli_wallet methods

* fix reindex on peerplays network

* fix some tests. add gitlab-ci.yml

* add pull to gitlab-ci

* fix

* fix and comment some tests

* added owner to lottery_asset_options. commented async call in on_applied_block callback

* added get_account_lotteries method to db_api and cli, lottery end_date and ticket_price verification

* merge get_account_lotteries branch. fix create_witness test

* fix test genesis and end_date verification

* fixed indices sorting and lottery end checking by date

* update db_version for replay and removed duplicate include files

* Added ntp and upgraded boost version

* Revert "GPOS protocol"

* need to remove backup files

* virtual-op-fix for deterministic virtual_op number

* Merged beatrice into 5050

* Updated gitmodules, changes to allow voting on lottery fee

* Removed submodule libraries/fc

* Added libraries/fc

* added missing , in types.hpp

* Added sweeps parameters to parameter_extension

* added missing comma in operations.hpp, small changes to config.hpp

* fixed returntype in chain_parameters.hpp

* removed sweeps_parameter_extensions

* Changed fc library

* fixed asset_object

* Changed peerplays-fc submodule

* Changed fc submodule to ubuntu 18.04 upgrade

* Removed submodule libraries/fc

* Added fc library back

* fix casting in overloaded function

* Removed blind_sign and unblind_signature functions

* Added new lottery_asset_create_operation

* Changed sweeps hardfork time

* Removed redundant if from asset_evaluator and fixed db_notify

* fixed duplicate code in fee_tests

* removed redundant tgenesis file

* Enable building on Ubuntu 18.04 using GCC 7 compiler

* fix: is_benefactor_reward had the default value of true when not set

* Docker file for Ubuntu 18.04

Base image updated to Unbuntu 18.04
Prerequisite list updated
Basic configuration updated

* Quick fix: Added missing package pkg-config

* Docker file updates

* 5050 fee update and compilation error fix

* Dockerfile, set system locale

Prevents locale::facet::_S_create_c_locale name error

* Update README.md

Fix typo

* Update README.md

* Changed hardfork time for SWEEPS and Core-429

* revert master changes that were brought in previous commit

* Fixed error when account_history_object with id 0 doesnt exist

* Fixed error while loading object database

* test for zero id object in account history

* Reorder operations in Dockerfile, to make image creation faster

- Reorder prevents unnecessary building of Boost libraries

* Fix for irrelevant signature included issue

* fix copyrigth messages order

* remove double empty lines

* Backport fix for `get_account_history` from https://github.com/bitshares/bitshares-core/pull/628 and add additional account history test case

* NTP client back

* GRPH-53-Log_format_error

* Merge pull request #1036 from jmjatlanta/issue_730

Add fail_reason to proposal_object

* Unit test case fixes and prepared SONs base

* Use offsetof instead of custom macro

* Hide some compiler warnings

* Make all the tests compile

* Add nullptr check in api.cpp for easier testing

* Add test case for broadcast_trx_with_callback API

* Unit test case fixes and prepared SONs base

* Merge pull request #714 from pmconrad/json_fix

JSON fix

* Increase max depth for trx confirmation callback

* Adapt to variant API with `max_depth` argument

* Update fc submodule

* Created unit test for #325

* remove needless find()

* GRPH-4-CliWallet_crash_ctrlD

* fix copyright message

* Make all the tests compile

* increase delay for node connection

* Increase block creation timeout to 2500ms

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Improved resilience of block database against corruption

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed duplicate ops returned from get_account_history

* minor performance improvement

* Added comment

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Fixed test failures and compilation issue

* Fixed account_history_pagination test

* Fix compilation in debug mode

* Removed unrelated comment

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* Allow sufficient space for new undo_session

* Throw for deep nesting

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* Added cli_test to CI

* use random port numbers in app_test (#154)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* fix for lottery end

* fix declarations

* fix declarations

* fix boost integer

* fix compilation

* fix chain tests

* fix app_test

* try to fix cli test

* fix incorrect max_depth param

* working cli test

* correct fc version

* Revert "[SON-107] Merge develop branch to SONs-base (#166)"

This reverts commit 499e318199.

* Fix build error, add missing GRAPHENE_MAX_NESTED_OBJECTS parameter

* Plugin description added, SON plugin params example

* fix for cli test

* SON object, operations, cli_wallet commands and RPC (#160)

- create_son, update_son, delete_son, list_sons
- get_sons, get_son_by_account, lookup_son_accounts, get_son_count
- vote_for_son, update_son_votes
- claim_registered_son
- get_son in cli_wallet
- Updating global_property_object
- Decrease SON hardfork time for test purposes
- CLI Wallet tests imported from develop branch

* fix affiliate tests

* SON-108 - Add cli wallet tests for create_son (#174)

* SON-108 - Add cli wallet tests for create_son

* Add info message at the beginning and end of the SON CLI tests

* Minor output message change

* Enable Boost test messages in unit tests

* [SON-110] get_son cli test (#173)

* get_son cli test

* update_son cli test

* Add cli wallet tests for vote_for_son (#175)

* fix insert object processing in indexes, son_delete is working

* Fix segfault when using delete_son from cli_wallet (#177)

* Fix segfault when using list_sons from cli_wallet (#178)

* Add son_delete cli tests (#182)

* Add son_delete cli tests

* add son vesting config options

* add vesting balance type support

* add dormant vesting policy for son

* add precision to son vesting amount

* SON118-Add Budget for SON (#165)

* SON118-Add Budget for SON

* SON118 - Compilation errors fix

* SON118 - Proper commenting around pay_sons function

* SON118 - Comment correction, SON statistics object implementation type correction

* SON118 - Add missing index init and reflect enums

* SON118 - Correcting the indentation

* SON118 SON144 - Add unit test, code fixes and resolve failures for existing tests

* SON118 SON144 - Removing extra spaces added

* abstraction of dormant vesting policy

* force son create vesting balance to have dormant policy

* remove not needed code from wallet son commands, add delete son test to cli (#181)

* Active SONs, list up to 15, order by votes, add test (#185)

* Add test for selecting 15 SONs with highest votes
* Display up to 15 active SONs, SON ordering by total_votes

* fix build error (#191)

* fix build error

* adapt son_pay_test to dormant vesting policy

* [SON-113] Unit test for cli `update_son_votes` (#179)

* refactor cli tests

* update_son_votes tests

* list_sons test

* test changes in get_global_properties() result

* fix generate_block failure

* fix update_son_votes test

* improve update_son cli test

* fix linking errors

* refactor select_top_fifteen_sons test

* refactor other son cli tests to use son_test_helper

* create_vesting call in wallet_api

* test fix

* fix create_son in wallet_api and cli tests

* SON126 - Witness Proposals to deregister SONs (#192)

* SON126 - Witness Proposals to deregister SONs

* SON126 - Approval by witness, removal of son_proposal_object, commenting

* SON126 - Witness proposal tests and related fixes

* SON126 - Proper commenting

* fix son_delete_operation reflection

* [SON-160] Fix create_vesting wallet_api call (#206)

* Fix create_vesting wallet_api call

* change type for vesting_type in create_vesting_balance

* [SON-113] Fix several issues in update_son_votes call in wallet_api  (#208)

* do not allow update votes with both empty lists

* fix error messages

* check number of sons against votes number in account_object

* Update error message

* list_active_sons api call implementation

* unit test for list_active_sons

* fix code style

* use assert instead of checking condition with low possibility

* Fixed betting tests (#217)

* Fixed betting tests

* Removed comments

* removed unrelated parameter description from delete_son

* Add Bitcoin network listener to a SON plugin (#196)

* Add Bitcoin network listener to a SON plugin
* Add default parameters for Peerplays Bitcoin test node
* Add Bitcoin block processing
* Update source code to last designs
* Set default parameters for peerplays_sidechain plugin to Bitcoin test server
* WIP: Some Bitcoin transaction processing

* [SON-199] Fix unit tests (#233)

* fix app_test

* fix son_delete_test

* Add peerplays account for a SON in a config/command line options (#231)

* SON193-SON200- SON Heartbeats and maintenance mode changes (#241)

* SON193-SON200- SON Heartbeats and maintenance mode changes

* SON193-SON200- SON Heartbeats and maintenance tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

* SON194-SON195 - Report SON Down, addition of SON Account for sidechain consensus (#244)

* SON194-SON195 - Addition of SON BTC Account and report son down changes

* SON194-SON195 - SON BTC Account errors rectification

* SON194-SON195 - Adding Tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

Co-authored-by: obucinac <obucinac@users.noreply.github.com>

* SON206 - Plugin SON Heartbeat changes (#250)

* SON206 - Plugin SON Heartbeat changes

* SON206 - Plugin SON Heartbeat changes, comment removal

* SON206 - Plugin SON Heartbeat changes, stub testing and changes

* SON206 - Plugin SON Heartbeat changes, removing debugs prints

* Wallet recreation on new set of SONs voted in (#256)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* Fix build errors

* SON212-SON213 - Add Sidechain Plugin Code to report and approve SON Down proposal (#260)

* SON212 - Add Sidechain Plugin Code to report SON Down

* SON212-SON213 - Add Sidechain Plugin Code to report SON Down, Approve proposal from sidechain plugin

* SON212-SON213 - Fix Build Error (#262)

* SON212-SON213 - Fix Build Error

* SON212-SON213 - Fix Build Error Add smart_ref definition for linking

* Updated gitlab CI to sync submodules (#265)

* SON217 - SON Maintenance,Heartbeat state transition changes (#264)

* SON217 - SON Maintenance,Heartbeat state transition changes

* SON217 - SON Maintenance,Heartbeat state transition changes

* [SON-202] Implement cli_wallet commands for maintenance mode (#261)

* Add stop_son_maintenance CLI call

* fix bug with SON activation

* son_maintenance_operation

* son_maintenance_operation tests

* cli test for son maintenance state

* start_son_maintenance CLI call

* keep maintenance state during active SON set changes

* Quick fix for list_active_sons

* SON199 - Fix Unit Test Failure (#268)

* Quickfix for update_sidechain_address and delete_sidechain_address cli commands

* SON206_Plugin_CrashFix_Reorg - Plugin Changes (#272)

* SON206_Plugin_CrashFix_Reorg - Plugin Changes

* SON206_Plugin_CrashFix_Reorg - add owner auths to consensus account

* SON165 - Keys mapping missing from wallet data (#274)

* SON232 - Avoid duplicate proposals from sidechain plugin (#275)

* SON233 - Provide correct downtime metrics to user (#278)

* son_wallet_object operations and multisig wallet recreation by RPC (#263)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object
* son_wallet_object operations
* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
* son_wallet_object API and cli wallet commands
* Send RPC command to bitcoin node to recreate multisig wallet
* Updating wallet info through operation instead through database.modify() for persistance
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
* Refactor primary wallet recreation
* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
* Quickfix for checking payer in evaluator
* Fix failing son_wallet_tests
- Check for son_btc_account is temporarely disabled
* Remove redundant file
Co-authored-by: gladcow <jahr@yandex.ru>

* SON214 - Request maintenance wallet commands (#280)

* SON wallet transfer object and operations (#279)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add is_active_son guards for sidechain events processing

Co-authored-by: gladcow <jahr@yandex.ru>

* Support multiple SON nodes per software instance (#282)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Temoprary disable account history tests for tracking accounts

Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-209] Create P2SH address with custom redeemScript (#271)

* Create redeem script for SONs primary wallet

* Add importaddress call

Allows to watch for related transactions without private keys import

* Get UTXO set for watched addresses

* createrawtransaction call

* signing PW spending transaction

* unit test for btc tx serialization

* sending PW transfer in test

* BIP143 tx signing

* use bech32 address format

* use single sha256 for lock script

* Digest fix

* working signing

* separate signing

* test partially signed PW transfer

* add ability to gather signatures before signing (#290)

* [SON-242] fix list_active_sons call after deleting an active son (#292)

* test to reproduce error in list_active_sons after delete_son

* prevent exception in list_active_list

* [SON-260] Sidechain Token withdrawal (#286)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* Withdrawal refactoring

* Withdrawal refactoring

Co-authored-by: gladcow <jahr@yandex.ru>

* SON261 - Bitcoin deposit, withdrawal, PW transfer (#287)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* SON261 - Deposit transfer ( user address -> PW ) and Withdrawal transfer ( PW -> user address ) for m-of-n multisig

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* SON261 - Withdrawal transfer ( PW -> user address ), addition of bitcoin public private key to config.ini for multiple sons mode

* Withdrawal refactoring

* Withdrawal refactoring

* SON261 - Fix prepare_tx

* SON261 - Add PW->PW Transfer and Code reorg

* Fix file permissions

Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-264] Integrating deposit/withdrawals with bitcoin transactions (feature/SON-260 + SON261 branches) (#291)

* Partial integration done, some Bitcoin RPC refactoring
* CLang Format config file
* CLang Format config file v2.0
* Fix repeating tasks that should be executed by scheduled SON only
* Fix withdrawal
* Integrate PW wallet fund moving
* Resolve conflicts

Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>

* SON200 - SON Down proposal broken after latest merges (#294)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness (#298)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness

* Various SON improvements (#297)

* Refactor SON processing
* Better exposure of sidechain private keys in sidechain handlers
* Support non default Bitcoin wallets
* Fix crash on config file recreation
* clang-format formatting
* New Bitcoin wallet related RPC calls
* Add missing create_son_deregister_proposals calls
* Add missing create_son_deregister_proposals calls
* Add loading/unlocking/locking of non-default bitcoin wallet
* Bitcon RFC logs improved, proposal aprovement improved
* Move signal connection after handlers are created

* Merge develop into SONS

* SON118 - Add tx sign metrics for SON rewards (#302)

* resolved compilation issues and other conflicts

* SON202 - Maintenance improvements (#303)

* Quickfix, remove dead code, return result from wallet withdraw do_evaluate

* SON275 - ZMQ Crash on application exit (#306)

* SON275 - ZMQ Crash on application exit

* SON275 - Fix Indentation

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* need to assign both name and id to stats id

* fix unit test case failures(add gpos vesting before voting)

* SON276 - Fix SON proposal exceptions - I (#307)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Add SON statistic for tracking reported sidechain transactions (#308)

- Deposit and Withdrawal object extended to contain expected
  and received transaction reports from SON network
- SON statistic object extended to contain total number of
  sidechain transactions reported by SON network when SON was
  active and number of transactions reported by single SON when
  he was active
- Code formatting

* Allow voting for son, only if GPOS vesting balance available

* notifications of SONS should get restrict to sons functionality

* update GPOS hardfork date to sons branch

* SON127 - Add son parameter extensions to genesis, push proposal fix (#310)

* SON276 - Fix SON proposal exceptions - I

* SON127 - Add son parameter extensions to genesis, push proposal fix

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* update GPOS HF to fall in before SONS HF, remove check

* updated unit test cases to reflect GPOS vesting and update account id's according to sons-account

* [SON-24] - SON Rewards missing serialisations and end to end testing (#313)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Revert "Merge develop branch changes(GPOS+graphene updates) into SONs branch"

* [SON-122] - SON Statistics improvements and consensus account creation (#318)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Replace raw with psbt transactions to support parital tx signing (#311)

* RPC calls for PSBT, raw transactions replaced with PSBT
* Fix estimatesmartfeerate, extensive RPC calls logging for debugging purposes
* Remove dead code
* Partial signing functional for deposit and withdrawal
* Fix sidechain_type declarations
* Depositing Peerplays asset refactored
* Partial signing functional for primary wallet funds moving
* Prettier logs
* Refactor multiple SON support processing
* Serialize field complete from sidechain_transaction_sign_operation
* Refactor transaction signing in particular order, BTC only (maybe) need it
* Add number of required signatures parameter for addmultisigaddress
* Change default bitcoin node parameters
* Transaction signing only by scheduled son
* Removed scheduling log
* Prevent PW funds moving to the same address
* Refactor sidechain_transaction_object processing, code cleanup
* Remove obsolete tests
* Decrease logging
* Code readability
* When updated, import son wallet bitcoin address to bitcoin wallet
* When updated, recreate son wallet bitcoin address on each node
* Refactor on_changed_objects, move it into task
* Add check to prevent deposit/withdrawal double processing
* Improved check for sidechain transaction object creation
* Single sidechain transaction signature per block allowed only
* Unlock wallet on addmultisigaddress
* Import both address and redeem script on primary wallet change, fix some compiler warnings
* Fix invalid list of signers for PW funds transfer

* [SON-312] Refactor create_son to assign owner account public key as a signing_key

remove key derivation from create son (#323)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* [SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322)

* Parallelizing sidechain transaction signing (#319)

* [SON-321, SON-323] Deposit/Withdraw object creation refactoring (#320)

* Remove proposals for creating deposit and withdrawal objects, strenghten evaluator checks
* Only active SON can create the object
* Only expected SON can confirm the transaction
* Transaction must be initiated (paid) by SON account owner (SON account given in operation)
* Transaction confirmation must contain exactly the same data as existing object
* Mirror SON owner account weights from son-account.active.account_auths to active SONs
* Fix duplicated typedef, peerplays_sidechain::sidechain_type to chain::sidechain_type
* Add missing serialized field

* [SON-318_SON-319] - Add approval checks for son down, deregister proposals (#321)

* [SON-318_SON-319] - Add approval checks for son down and deregister proposals

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-311] Add try_create_son call without explicit deposit params (#324)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Fix build error

* Quickfix - change GPOS and SON hardfork times

* [SON-332] Check gitlab building process for dirty build (#327)

* Fix failing son test, fix data types and check condition
* Very clean build on Gitlab

* update son-account parameters (#328)

* [SON-329] Hotfix - Enable test test_update_dividend_interval

* [SON-313] - Limit SON functionality when min no. of sons are not present (#329)

* [SON-313] - Limit SON functionality when min no. of sons are not present

* Revert SON HF related checks and tests

* Remove the capability to process proposals in plugin

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-307] Create PBTC asset  (#326)

* SON-297_SON-336 - SON vesting functionality broken after graphene merge (#331)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - add initialization values to extension params, remove trailing spaces

* [SON-305, SON-308, SON-310] Use BTC asset in bitcoin deposits and withdraws (#332)

* [SON-339] - SON Schedule crash (#334)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues (#335)

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-322, SON-324] Approval checks for processing deposit/withdrawal (#330)

* Refactor proposal processing
* Added check for approving son_wallet_deposit_process_operation
* Added check for approving son_wallet_withdraw_process_operation
* Calculating exchange rates fixed
* Fix depositing Peerplays assets

* [SON-320] Added check for approving son_wallet_update_operation (#336)

* [SON-325] Added check for approving sidechain_transaction_create_operation (#337)

* [SON-341, SON-342] Fix issue with deposits number (#339)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* [SON-344] BTC asset is created with wrong quote asset id, Fixed (#341)

* [SON-344] BTC asset is created with wrong quote asset id, Fixed
* Respond to code review

* [SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342)

* [SON-348] Transaction hash not saved in object after Bitcoin transaction is sent (#343)

- Fixed
- Unused parameters removed

* [SON-337] - Prevent update_son_votes without GPOS vesting (#344)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-353] Refactor PW processing, PW transfer fixed (#347)

* Add proposal checks for deposit and withdrawal
* Refactor proposal approvement
* Fix transaction verification
* Remove logs

* [SON-354] Fix son_info compare function (#350)

* check object's id (#351)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* SON Weighted Multi Signature Signing (#349)

* Bring in the bitcoin utils code into plugin
* Add tx creation, signing and tests
* tx deserialization fix
* add 10-of-14 multisig address test
* Add signing and verification tests and sign_transaction_standalone
* Add send_transaction_standalone function
* Debug logs and additional tests
* Fix for son deletion in the middle
* Extend script_builder
* Witness script for weighted wallet
* btc_weighted_multisig_address implementation
* Fix for bad-txns-nonstandard-inputs
* Weighted multisignature address test
* Create test tx with weighted multisig wallet
* Fix the issues with tx signing
* End to End test weighted multi sig
* 1 or m-of-n deposit address support
* Move network_type enum to the base class
* btc_one_or_weighted_multisig_address implementation
* Simplify redeem script
* Fix error in redeem_script
* btc_one_or_weighted_multisig_address tests
* Refactor sidechain address mapping
* CLANG code format
* CLANG code format sidechain tests
* Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring
* Move util functions to Utils file
* Add proper checks for withdraw fee
* Deposit address creation, import deposit/withdraw addresses, some code cleanup

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-349] Delay BTC asset issue/reserve until tx confirmed on sidchain (#348)

* Separate transaction settling from deposit/withdrawal processing
* Handle peerplays deposits with transaction settling
* Remove logs
* All dev features enabled/disabled with single flag
* Deposit/withdraw process and sidechain transaction creation in single proposal

* Hotfix - remove importing sidechain addresses

* Hotfix - remove redundant deposit sidechain address recreation

* private-key option update

* Use decoderawtraction json for proposal approvals (#352)

* Use decoderawtraction json for proposal approvals
* Use default null string to get first vout

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Prevent incorrect signatures to be added to transaction (#354)

* Prevent incorrect signatures to be added to transaction
* Check signers list before signing

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - use getrawtransaction for approvals and settling (#355)

* Revert "Use decoderawtraction json for proposal approvals (#352)"
This reverts commit d3385b28cb.
* User getrawtransaction for proposal approvals and settling
* Code cleanup

* [SON-135] Add timelock to user deposit address (#356)

* timelocks
* timelocked deposit address
* test for deposit timelock

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - fix threshold_weight calculation in redeem scripts

* fix broken peerplays_sidechain tests (#357)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Save deposit address redeem and witness script into sidechain address object

* [SON-359] - Fix Errors processing to-be-refunded deposits (#358)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-363] - Remove son deletion (#359)

* [SON-363] - Remove son deletion

* Fix the tests

* [SON-314] - Weighted Rewards and equal weighted son-account (#360)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Bitcoin network type deduction (#361)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* chore: changed building to debug mode

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* chore: updated Dockerfile with dnsutils

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Son deposit address enhancements (#362)

* Deposit address enhancements

* fix tests

Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>

* Ws updates

* Fix for custom operation authority checking (BTS Issue #210) (#382)

* Resolve #210: [HF] Check authorities on custom_operation

The required_auths field on custom_operation was being ignored during authority checking. This commit causes it to be checked correctly, and adds a unit test verifying as much.

* Ref #381: Fixes

Build and logic fixes for Pull Request #381

* Ref #381: Fix bad merge

During merge conflict resolution, I accidentally broke custom
authorities. This fixes it.

* compilation fix

Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* Cleanup changes for pretier diff

* Cleanup changes for prettier diff

* NFT Permissions (#380)

* Account Roles Permission 1 - Working code with tests

* Account Roles Permission 2 - Add marketplace offer/bid tests

* Account Roles Permission 3 - Add Op check

* Account Roles Permission 4 - Add chain params and limits

* Cleanup changes for prettier diff

* Fix failing saving_keys_wallet_test

* Fix failing saving_keys_wallet_test

* Align submodule versions

* Add missing break

* Increase tests log_level, some cleanup

* Decrease log level for tests

* Fix block_tests/maintenance_interval test

* Fix son_operation_tests/son_pay_test test

* Remove base_uri length checks

* Fix HF info

* hotfix - chain params variable overflow, rbac hf check (#387)

* hotfix - son max count fix (#389)

* hotfix - son max count fix

* init variables

* Release build fix, missing includes

* Fix release build on 18.04, fc::smart_ref_* removed

* Gitlab will build Debug and Release versions

* Revert "Gitlab will build Debug and Release versions"

This reverts commit 7a721f8094.

* Gitlab will build Release version only

* Hotfix/remove smart ref (#396)

* Merge develop into beatrice (#386)

* Fix building on Ubuntu 18.04 with GCC 7

* Peerplays SON plugin skeleton (#122)

* Peerplays SON plugin skeleton
* SON tests skeleton

* Part two of SON-83 - plugins option in command line and config file (#126)

- Empty SON plugin is INACTIVE by default
- To enable it, add peerplays_sidechain to plugins section in
  config file, or use --plugins command line option
- Plugin can work with or without witness

* SON11 - Add chain extension parameter to set SON count

* [SON-107] Merge develop branch to SONs-base (#166)

* fix rng and get_winner_numbers implemented

* coipied code for bitshares fixing 429 and 433 isuues

* ticket_purchase_operation implemented. added lottery_options to asset

* lottery end implemented

* minor logic changes. added db_api and cli_wallet methods

* fix reindex on peerplays network

* fix some tests. add gitlab-ci.yml

* add pull to gitlab-ci

* fix

* fix and comment some tests

* added owner to lottery_asset_options. commented async call in on_applied_block callback

* added get_account_lotteries method to db_api and cli, lottery end_date and ticket_price verification

* merge get_account_lotteries branch. fix create_witness test

* fix test genesis and end_date verification

* fixed indices sorting and lottery end checking by date

* update db_version for replay and removed duplicate include files

* Added ntp and upgraded boost version

* Revert "GPOS protocol"

* need to remove backup files

* virtual-op-fix for deterministic virtual_op number

* Merged beatrice into 5050

* Updated gitmodules, changes to allow voting on lottery fee

* Removed submodule libraries/fc

* Added libraries/fc

* added missing , in types.hpp

* Added sweeps parameters to parameter_extension

* added missing comma in operations.hpp, small changes to config.hpp

* fixed returntype in chain_parameters.hpp

* removed sweeps_parameter_extensions

* Changed fc library

* fixed asset_object

* Changed peerplays-fc submodule

* Changed fc submodule to ubuntu 18.04 upgrade

* Removed submodule libraries/fc

* Added fc library back

* fix casting in overloaded function

* Removed blind_sign and unblind_signature functions

* Added new lottery_asset_create_operation

* Changed sweeps hardfork time

* Removed redundant if from asset_evaluator and fixed db_notify

* fixed duplicate code in fee_tests

* removed redundant tgenesis file

* Enable building on Ubuntu 18.04 using GCC 7 compiler

* fix: is_benefactor_reward had the default value of true when not set

* Docker file for Ubuntu 18.04

Base image updated to Unbuntu 18.04
Prerequisite list updated
Basic configuration updated

* Quick fix: Added missing package pkg-config

* Docker file updates

* 5050 fee update and compilation error fix

* Dockerfile, set system locale

Prevents locale::facet::_S_create_c_locale name error

* Update README.md

Fix typo

* Update README.md

* Changed hardfork time for SWEEPS and Core-429

* revert master changes that were brought in previous commit

* Fixed error when account_history_object with id 0 doesnt exist

* Fixed error while loading object database

* test for zero id object in account history

* Reorder operations in Dockerfile, to make image creation faster

- Reorder prevents unnecessary building of Boost libraries

* Fix for irrelevant signature included issue

* fix copyrigth messages order

* remove double empty lines

* Backport fix for `get_account_history` from https://github.com/bitshares/bitshares-core/pull/628 and add additional account history test case

* NTP client back

* GRPH-53-Log_format_error

* Merge pull request #1036 from jmjatlanta/issue_730

Add fail_reason to proposal_object

* Unit test case fixes and prepared SONs base

* Use offsetof instead of custom macro

* Hide some compiler warnings

* Make all the tests compile

* Add nullptr check in api.cpp for easier testing

* Add test case for broadcast_trx_with_callback API

* Unit test case fixes and prepared SONs base

* Merge pull request #714 from pmconrad/json_fix

JSON fix

* Increase max depth for trx confirmation callback

* Adapt to variant API with `max_depth` argument

* Update fc submodule

* Created unit test for #325

* remove needless find()

* GRPH-4-CliWallet_crash_ctrlD

* fix copyright message

* Make all the tests compile

* increase delay for node connection

* Increase block creation timeout to 2500ms

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Improved resilience of block database against corruption

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed duplicate ops returned from get_account_history

* minor performance improvement

* Added comment

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Fixed test failures and compilation issue

* Fixed account_history_pagination test

* Fix compilation in debug mode

* Removed unrelated comment

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* Allow sufficient space for new undo_session

* Throw for deep nesting

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* Added cli_test to CI

* use random port numbers in app_test (#154)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* fix for lottery end

* fix declarations

* fix declarations

* fix boost integer

* fix compilation

* fix chain tests

* fix app_test

* try to fix cli test

* fix incorrect max_depth param

* working cli test

* correct fc version

* Revert "[SON-107] Merge develop branch to SONs-base (#166)"

This reverts commit 499e318199.

* Fix build error, add missing GRAPHENE_MAX_NESTED_OBJECTS parameter

* Plugin description added, SON plugin params example

* fix for cli test

* SON object, operations, cli_wallet commands and RPC (#160)

- create_son, update_son, delete_son, list_sons
- get_sons, get_son_by_account, lookup_son_accounts, get_son_count
- vote_for_son, update_son_votes
- claim_registered_son
- get_son in cli_wallet
- Updating global_property_object
- Decrease SON hardfork time for test purposes
- CLI Wallet tests imported from develop branch

* fix affiliate tests

* SON-108 - Add cli wallet tests for create_son (#174)

* SON-108 - Add cli wallet tests for create_son

* Add info message at the beginning and end of the SON CLI tests

* Minor output message change

* Enable Boost test messages in unit tests

* [SON-110] get_son cli test (#173)

* get_son cli test

* update_son cli test

* Add cli wallet tests for vote_for_son (#175)

* fix insert object processing in indexes, son_delete is working

* Fix segfault when using delete_son from cli_wallet (#177)

* Fix segfault when using list_sons from cli_wallet (#178)

* Add son_delete cli tests (#182)

* Add son_delete cli tests

* add son vesting config options

* add vesting balance type support

* add dormant vesting policy for son

* add precision to son vesting amount

* SON118-Add Budget for SON (#165)

* SON118-Add Budget for SON

* SON118 - Compilation errors fix

* SON118 - Proper commenting around pay_sons function

* SON118 - Comment correction, SON statistics object implementation type correction

* SON118 - Add missing index init and reflect enums

* SON118 - Correcting the indentation

* SON118 SON144 - Add unit test, code fixes and resolve failures for existing tests

* SON118 SON144 - Removing extra spaces added

* abstraction of dormant vesting policy

* force son create vesting balance to have dormant policy

* remove not needed code from wallet son commands, add delete son test to cli (#181)

* Active SONs, list up to 15, order by votes, add test (#185)

* Add test for selecting 15 SONs with highest votes
* Display up to 15 active SONs, SON ordering by total_votes

* fix build error (#191)

* fix build error

* adapt son_pay_test to dormant vesting policy

* [SON-113] Unit test for cli `update_son_votes` (#179)

* refactor cli tests

* update_son_votes tests

* list_sons test

* test changes in get_global_properties() result

* fix generate_block failure

* fix update_son_votes test

* improve update_son cli test

* fix linking errors

* refactor select_top_fifteen_sons test

* refactor other son cli tests to use son_test_helper

* create_vesting call in wallet_api

* test fix

* fix create_son in wallet_api and cli tests

* SON126 - Witness Proposals to deregister SONs (#192)

* SON126 - Witness Proposals to deregister SONs

* SON126 - Approval by witness, removal of son_proposal_object, commenting

* SON126 - Witness proposal tests and related fixes

* SON126 - Proper commenting

* fix son_delete_operation reflection

* [SON-160] Fix create_vesting wallet_api call (#206)

* Fix create_vesting wallet_api call

* change type for vesting_type in create_vesting_balance

* [SON-113] Fix several issues in update_son_votes call in wallet_api  (#208)

* do not allow update votes with both empty lists

* fix error messages

* check number of sons against votes number in account_object

* Update error message

* list_active_sons api call implementation

* unit test for list_active_sons

* fix code style

* use assert instead of checking condition with low possibility

* Fixed betting tests (#217)

* Fixed betting tests

* Removed comments

* removed unrelated parameter description from delete_son

* Add Bitcoin network listener to a SON plugin (#196)

* Add Bitcoin network listener to a SON plugin
* Add default parameters for Peerplays Bitcoin test node
* Add Bitcoin block processing
* Update source code to last designs
* Set default parameters for peerplays_sidechain plugin to Bitcoin test server
* WIP: Some Bitcoin transaction processing

* [SON-199] Fix unit tests (#233)

* fix app_test

* fix son_delete_test

* Add peerplays account for a SON in a config/command line options (#231)

* SON193-SON200- SON Heartbeats and maintenance mode changes (#241)

* SON193-SON200- SON Heartbeats and maintenance mode changes

* SON193-SON200- SON Heartbeats and maintenance tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

* SON194-SON195 - Report SON Down, addition of SON Account for sidechain consensus (#244)

* SON194-SON195 - Addition of SON BTC Account and report son down changes

* SON194-SON195 - SON BTC Account errors rectification

* SON194-SON195 - Adding Tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

Co-authored-by: obucinac <obucinac@users.noreply.github.com>

* SON206 - Plugin SON Heartbeat changes (#250)

* SON206 - Plugin SON Heartbeat changes

* SON206 - Plugin SON Heartbeat changes, comment removal

* SON206 - Plugin SON Heartbeat changes, stub testing and changes

* SON206 - Plugin SON Heartbeat changes, removing debugs prints

* Wallet recreation on new set of SONs voted in (#256)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* Fix build errors

* SON212-SON213 - Add Sidechain Plugin Code to report and approve SON Down proposal (#260)

* SON212 - Add Sidechain Plugin Code to report SON Down

* SON212-SON213 - Add Sidechain Plugin Code to report SON Down, Approve proposal from sidechain plugin

* SON212-SON213 - Fix Build Error (#262)

* SON212-SON213 - Fix Build Error

* SON212-SON213 - Fix Build Error Add smart_ref definition for linking

* Updated gitlab CI to sync submodules (#265)

* SON217 - SON Maintenance,Heartbeat state transition changes (#264)

* SON217 - SON Maintenance,Heartbeat state transition changes

* SON217 - SON Maintenance,Heartbeat state transition changes

* [SON-202] Implement cli_wallet commands for maintenance mode (#261)

* Add stop_son_maintenance CLI call

* fix bug with SON activation

* son_maintenance_operation

* son_maintenance_operation tests

* cli test for son maintenance state

* start_son_maintenance CLI call

* keep maintenance state during active SON set changes

* Quick fix for list_active_sons

* SON199 - Fix Unit Test Failure (#268)

* Quickfix for update_sidechain_address and delete_sidechain_address cli commands

* SON206_Plugin_CrashFix_Reorg - Plugin Changes (#272)

* SON206_Plugin_CrashFix_Reorg - Plugin Changes

* SON206_Plugin_CrashFix_Reorg - add owner auths to consensus account

* SON165 - Keys mapping missing from wallet data (#274)

* SON232 - Avoid duplicate proposals from sidechain plugin (#275)

* SON233 - Provide correct downtime metrics to user (#278)

* son_wallet_object operations and multisig wallet recreation by RPC (#263)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object
* son_wallet_object operations
* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
* son_wallet_object API and cli wallet commands
* Send RPC command to bitcoin node to recreate multisig wallet
* Updating wallet info through operation instead through database.modify() for persistance
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
* Refactor primary wallet recreation
* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
* Quickfix for checking payer in evaluator
* Fix failing son_wallet_tests
- Check for son_btc_account is temporarely disabled
* Remove redundant file
Co-authored-by: gladcow <jahr@yandex.ru>

* SON214 - Request maintenance wallet commands (#280)

* SON wallet transfer object and operations (#279)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add is_active_son guards for sidechain events processing

Co-authored-by: gladcow <jahr@yandex.ru>

* Support multiple SON nodes per software instance (#282)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Temoprary disable account history tests for tracking accounts

Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-209] Create P2SH address with custom redeemScript (#271)

* Create redeem script for SONs primary wallet

* Add importaddress call

Allows to watch for related transactions without private keys import

* Get UTXO set for watched addresses

* createrawtransaction call

* signing PW spending transaction

* unit test for btc tx serialization

* sending PW transfer in test

* BIP143 tx signing

* use bech32 address format

* use single sha256 for lock script

* Digest fix

* working signing

* separate signing

* test partially signed PW transfer

* add ability to gather signatures before signing (#290)

* [SON-242] fix list_active_sons call after deleting an active son (#292)

* test to reproduce error in list_active_sons after delete_son

* prevent exception in list_active_list

* [SON-260] Sidechain Token withdrawal (#286)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* Withdrawal refactoring

* Withdrawal refactoring

Co-authored-by: gladcow <jahr@yandex.ru>

* SON261 - Bitcoin deposit, withdrawal, PW transfer (#287)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* SON261 - Deposit transfer ( user address -> PW ) and Withdrawal transfer ( PW -> user address ) for m-of-n multisig

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* SON261 - Withdrawal transfer ( PW -> user address ), addition of bitcoin public private key to config.ini for multiple sons mode

* Withdrawal refactoring

* Withdrawal refactoring

* SON261 - Fix prepare_tx

* SON261 - Add PW->PW Transfer and Code reorg

* Fix file permissions

Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-264] Integrating deposit/withdrawals with bitcoin transactions (feature/SON-260 + SON261 branches) (#291)

* Partial integration done, some Bitcoin RPC refactoring
* CLang Format config file
* CLang Format config file v2.0
* Fix repeating tasks that should be executed by scheduled SON only
* Fix withdrawal
* Integrate PW wallet fund moving
* Resolve conflicts

Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>

* SON200 - SON Down proposal broken after latest merges (#294)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness (#298)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness

* Various SON improvements (#297)

* Refactor SON processing
* Better exposure of sidechain private keys in sidechain handlers
* Support non default Bitcoin wallets
* Fix crash on config file recreation
* clang-format formatting
* New Bitcoin wallet related RPC calls
* Add missing create_son_deregister_proposals calls
* Add missing create_son_deregister_proposals calls
* Add loading/unlocking/locking of non-default bitcoin wallet
* Bitcon RFC logs improved, proposal aprovement improved
* Move signal connection after handlers are created

* Merge develop into SONS

* SON118 - Add tx sign metrics for SON rewards (#302)

* resolved compilation issues and other conflicts

* SON202 - Maintenance improvements (#303)

* Quickfix, remove dead code, return result from wallet withdraw do_evaluate

* SON275 - ZMQ Crash on application exit (#306)

* SON275 - ZMQ Crash on application exit

* SON275 - Fix Indentation

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* need to assign both name and id to stats id

* fix unit test case failures(add gpos vesting before voting)

* SON276 - Fix SON proposal exceptions - I (#307)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Add SON statistic for tracking reported sidechain transactions (#308)

- Deposit and Withdrawal object extended to contain expected
  and received transaction reports from SON network
- SON statistic object extended to contain total number of
  sidechain transactions reported by SON network when SON was
  active and number of transactions reported by single SON when
  he was active
- Code formatting

* Allow voting for son, only if GPOS vesting balance available

* notifications of SONS should get restrict to sons functionality

* update GPOS hardfork date to sons branch

* SON127 - Add son parameter extensions to genesis, push proposal fix (#310)

* SON276 - Fix SON proposal exceptions - I

* SON127 - Add son parameter extensions to genesis, push proposal fix

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* update GPOS HF to fall in before SONS HF, remove check

* updated unit test cases to reflect GPOS vesting and update account id's according to sons-account

* [SON-24] - SON Rewards missing serialisations and end to end testing (#313)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Revert "Merge develop branch changes(GPOS+graphene updates) into SONs branch"

* [SON-122] - SON Statistics improvements and consensus account creation (#318)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Replace raw with psbt transactions to support parital tx signing (#311)

* RPC calls for PSBT, raw transactions replaced with PSBT
* Fix estimatesmartfeerate, extensive RPC calls logging for debugging purposes
* Remove dead code
* Partial signing functional for deposit and withdrawal
* Fix sidechain_type declarations
* Depositing Peerplays asset refactored
* Partial signing functional for primary wallet funds moving
* Prettier logs
* Refactor multiple SON support processing
* Serialize field complete from sidechain_transaction_sign_operation
* Refactor transaction signing in particular order, BTC only (maybe) need it
* Add number of required signatures parameter for addmultisigaddress
* Change default bitcoin node parameters
* Transaction signing only by scheduled son
* Removed scheduling log
* Prevent PW funds moving to the same address
* Refactor sidechain_transaction_object processing, code cleanup
* Remove obsolete tests
* Decrease logging
* Code readability
* When updated, import son wallet bitcoin address to bitcoin wallet
* When updated, recreate son wallet bitcoin address on each node
* Refactor on_changed_objects, move it into task
* Add check to prevent deposit/withdrawal double processing
* Improved check for sidechain transaction object creation
* Single sidechain transaction signature per block allowed only
* Unlock wallet on addmultisigaddress
* Import both address and redeem script on primary wallet change, fix some compiler warnings
* Fix invalid list of signers for PW funds transfer

* [SON-312] Refactor create_son to assign owner account public key as a signing_key

remove key derivation from create son (#323)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* [SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322)

* Parallelizing sidechain transaction signing (#319)

* [SON-321, SON-323] Deposit/Withdraw object creation refactoring (#320)

* Remove proposals for creating deposit and withdrawal objects, strenghten evaluator checks
* Only active SON can create the object
* Only expected SON can confirm the transaction
* Transaction must be initiated (paid) by SON account owner (SON account given in operation)
* Transaction confirmation must contain exactly the same data as existing object
* Mirror SON owner account weights from son-account.active.account_auths to active SONs
* Fix duplicated typedef, peerplays_sidechain::sidechain_type to chain::sidechain_type
* Add missing serialized field

* [SON-318_SON-319] - Add approval checks for son down, deregister proposals (#321)

* [SON-318_SON-319] - Add approval checks for son down and deregister proposals

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-311] Add try_create_son call without explicit deposit params (#324)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Fix build error

* Quickfix - change GPOS and SON hardfork times

* [SON-332] Check gitlab building process for dirty build (#327)

* Fix failing son test, fix data types and check condition
* Very clean build on Gitlab

* update son-account parameters (#328)

* [SON-329] Hotfix - Enable test test_update_dividend_interval

* [SON-313] - Limit SON functionality when min no. of sons are not present (#329)

* [SON-313] - Limit SON functionality when min no. of sons are not present

* Revert SON HF related checks and tests

* Remove the capability to process proposals in plugin

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-307] Create PBTC asset  (#326)

* SON-297_SON-336 - SON vesting functionality broken after graphene merge (#331)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - add initialization values to extension params, remove trailing spaces

* [SON-305, SON-308, SON-310] Use BTC asset in bitcoin deposits and withdraws (#332)

* [SON-339] - SON Schedule crash (#334)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues (#335)

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-322, SON-324] Approval checks for processing deposit/withdrawal (#330)

* Refactor proposal processing
* Added check for approving son_wallet_deposit_process_operation
* Added check for approving son_wallet_withdraw_process_operation
* Calculating exchange rates fixed
* Fix depositing Peerplays assets

* [SON-320] Added check for approving son_wallet_update_operation (#336)

* [SON-325] Added check for approving sidechain_transaction_create_operation (#337)

* [SON-341, SON-342] Fix issue with deposits number (#339)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* [SON-344] BTC asset is created with wrong quote asset id, Fixed (#341)

* [SON-344] BTC asset is created with wrong quote asset id, Fixed
* Respond to code review

* [SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342)

* [SON-348] Transaction hash not saved in object after Bitcoin transaction is sent (#343)

- Fixed
- Unused parameters removed

* [SON-337] - Prevent update_son_votes without GPOS vesting (#344)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-353] Refactor PW processing, PW transfer fixed (#347)

* Add proposal checks for deposit and withdrawal
* Refactor proposal approvement
* Fix transaction verification
* Remove logs

* [SON-354] Fix son_info compare function (#350)

* check object's id (#351)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* SON Weighted Multi Signature Signing (#349)

* Bring in the bitcoin utils code into plugin
* Add tx creation, signing and tests
* tx deserialization fix
* add 10-of-14 multisig address test
* Add signing and verification tests and sign_transaction_standalone
* Add send_transaction_standalone function
* Debug logs and additional tests
* Fix for son deletion in the middle
* Extend script_builder
* Witness script for weighted wallet
* btc_weighted_multisig_address implementation
* Fix for bad-txns-nonstandard-inputs
* Weighted multisignature address test
* Create test tx with weighted multisig wallet
* Fix the issues with tx signing
* End to End test weighted multi sig
* 1 or m-of-n deposit address support
* Move network_type enum to the base class
* btc_one_or_weighted_multisig_address implementation
* Simplify redeem script
* Fix error in redeem_script
* btc_one_or_weighted_multisig_address tests
* Refactor sidechain address mapping
* CLANG code format
* CLANG code format sidechain tests
* Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring
* Move util functions to Utils file
* Add proper checks for withdraw fee
* Deposit address creation, import deposit/withdraw addresses, some code cleanup

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-349] Delay BTC asset issue/reserve until tx confirmed on sidchain (#348)

* Separate transaction settling from deposit/withdrawal processing
* Handle peerplays deposits with transaction settling
* Remove logs
* All dev features enabled/disabled with single flag
* Deposit/withdraw process and sidechain transaction creation in single proposal

* Hotfix - remove importing sidechain addresses

* Hotfix - remove redundant deposit sidechain address recreation

* private-key option update

* Use decoderawtraction json for proposal approvals (#352)

* Use decoderawtraction json for proposal approvals
* Use default null string to get first vout

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Prevent incorrect signatures to be added to transaction (#354)

* Prevent incorrect signatures to be added to transaction
* Check signers list before signing

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - use getrawtransaction for approvals and settling (#355)

* Revert "Use decoderawtraction json for proposal approvals (#352)"
This reverts commit d3385b28cb.
* User getrawtransaction for proposal approvals and settling
* Code cleanup

* [SON-135] Add timelock to user deposit address (#356)

* timelocks
* timelocked deposit address
* test for deposit timelock

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - fix threshold_weight calculation in redeem scripts

* fix broken peerplays_sidechain tests (#357)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Save deposit address redeem and witness script into sidechain address object

* [SON-359] - Fix Errors processing to-be-refunded deposits (#358)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-363] - Remove son deletion (#359)

* [SON-363] - Remove son deletion

* Fix the tests

* [SON-314] - Weighted Rewards and equal weighted son-account (#360)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Bitcoin network type deduction (#361)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* chore: changed building to debug mode

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* chore: updated Dockerfile with dnsutils

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Son deposit address enhancements (#362)

* Deposit address enhancements

* fix tests

Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>

* Ws updates

* Fix for custom operation authority checking (BTS Issue #210) (#382)

* Resolve #210: [HF] Check authorities on custom_operation

The required_auths field on custom_operation was being ignored during authority checking. This commit causes it to be checked correctly, and adds a unit test verifying as much.

* Ref #381: Fixes

Build and logic fixes for Pull Request #381

* Ref #381: Fix bad merge

During merge conflict resolution, I accidentally broke custom
authorities. This fixes it.

* compilation fix

Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* Cleanup changes for pretier diff

* Cleanup changes for prettier diff

* NFT Permissions (#380)

* Account Roles Permission 1 - Working code with tests

* Account Roles Permission 2 - Add marketplace offer/bid tests

* Account Roles Permission 3 - Add Op check

* Account Roles Permission 4 - Add chain params and limits

* Cleanup changes for prettier diff

* Fix failing saving_keys_wallet_test

* Fix failing saving_keys_wallet_test

* Align submodule versions

* Add missing break

* Increase tests log_level, some cleanup

* Decrease log level for tests

* Fix block_tests/maintenance_interval test

* Fix son_operation_tests/son_pay_test test

* Remove base_uri length checks

* Fix HF info

Co-authored-by: S <obucinac@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* SON hardfork time to Saturday, October 17, 2020 00:00:00 UTC

* hotfix - chain params variable overflow, rbac hf check (#387)

* hotfix - son max count fix

* init variables

* Update SON HF time to October 20th 2020, 00:00:00

* Update SON HF time to October 20th 2020, 00:00:00

* Release build fix, missing includes (#391)

fixes https://github.com/peerplays-network/peerplays/issues/390

* Fix release build on 18.04, fc::smart_ref_* removed

* Gitlab will build Debug and Release versions

* Revert "Gitlab will build Debug and Release versions"

This reverts commit 7a721f8094.

* Gitlab will build Release version only

* add safe copy

* verify_transaction proper value

* proper init of publick_key

Co-authored-by: serkixenos <70147861+serkixenos@users.noreply.github.com>
Co-authored-by: S <obucinac@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>
Co-authored-by: Serki <serki.xenos@gmail.com>

* #endif

Co-authored-by: S <obucinac@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>
2020-10-23 14:03:47 +05:30
sierra19XX
890079c33f
Hotfix/remove smart ref (#396)
* Merge develop into beatrice (#386)

* Fix building on Ubuntu 18.04 with GCC 7

* Peerplays SON plugin skeleton (#122)

* Peerplays SON plugin skeleton
* SON tests skeleton

* Part two of SON-83 - plugins option in command line and config file (#126)

- Empty SON plugin is INACTIVE by default
- To enable it, add peerplays_sidechain to plugins section in
  config file, or use --plugins command line option
- Plugin can work with or without witness

* SON11 - Add chain extension parameter to set SON count

* [SON-107] Merge develop branch to SONs-base (#166)

* fix rng and get_winner_numbers implemented

* coipied code for bitshares fixing 429 and 433 isuues

* ticket_purchase_operation implemented. added lottery_options to asset

* lottery end implemented

* minor logic changes. added db_api and cli_wallet methods

* fix reindex on peerplays network

* fix some tests. add gitlab-ci.yml

* add pull to gitlab-ci

* fix

* fix and comment some tests

* added owner to lottery_asset_options. commented async call in on_applied_block callback

* added get_account_lotteries method to db_api and cli, lottery end_date and ticket_price verification

* merge get_account_lotteries branch. fix create_witness test

* fix test genesis and end_date verification

* fixed indices sorting and lottery end checking by date

* update db_version for replay and removed duplicate include files

* Added ntp and upgraded boost version

* Revert "GPOS protocol"

* need to remove backup files

* virtual-op-fix for deterministic virtual_op number

* Merged beatrice into 5050

* Updated gitmodules, changes to allow voting on lottery fee

* Removed submodule libraries/fc

* Added libraries/fc

* added missing , in types.hpp

* Added sweeps parameters to parameter_extension

* added missing comma in operations.hpp, small changes to config.hpp

* fixed returntype in chain_parameters.hpp

* removed sweeps_parameter_extensions

* Changed fc library

* fixed asset_object

* Changed peerplays-fc submodule

* Changed fc submodule to ubuntu 18.04 upgrade

* Removed submodule libraries/fc

* Added fc library back

* fix casting in overloaded function

* Removed blind_sign and unblind_signature functions

* Added new lottery_asset_create_operation

* Changed sweeps hardfork time

* Removed redundant if from asset_evaluator and fixed db_notify

* fixed duplicate code in fee_tests

* removed redundant tgenesis file

* Enable building on Ubuntu 18.04 using GCC 7 compiler

* fix: is_benefactor_reward had the default value of true when not set

* Docker file for Ubuntu 18.04

Base image updated to Unbuntu 18.04
Prerequisite list updated
Basic configuration updated

* Quick fix: Added missing package pkg-config

* Docker file updates

* 5050 fee update and compilation error fix

* Dockerfile, set system locale

Prevents locale::facet::_S_create_c_locale name error

* Update README.md

Fix typo

* Update README.md

* Changed hardfork time for SWEEPS and Core-429

* revert master changes that were brought in previous commit

* Fixed error when account_history_object with id 0 doesnt exist

* Fixed error while loading object database

* test for zero id object in account history

* Reorder operations in Dockerfile, to make image creation faster

- Reorder prevents unnecessary building of Boost libraries

* Fix for irrelevant signature included issue

* fix copyrigth messages order

* remove double empty lines

* Backport fix for `get_account_history` from https://github.com/bitshares/bitshares-core/pull/628 and add additional account history test case

* NTP client back

* GRPH-53-Log_format_error

* Merge pull request #1036 from jmjatlanta/issue_730

Add fail_reason to proposal_object

* Unit test case fixes and prepared SONs base

* Use offsetof instead of custom macro

* Hide some compiler warnings

* Make all the tests compile

* Add nullptr check in api.cpp for easier testing

* Add test case for broadcast_trx_with_callback API

* Unit test case fixes and prepared SONs base

* Merge pull request #714 from pmconrad/json_fix

JSON fix

* Increase max depth for trx confirmation callback

* Adapt to variant API with `max_depth` argument

* Update fc submodule

* Created unit test for #325

* remove needless find()

* GRPH-4-CliWallet_crash_ctrlD

* fix copyright message

* Make all the tests compile

* increase delay for node connection

* Increase block creation timeout to 2500ms

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Improved resilience of block database against corruption

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed duplicate ops returned from get_account_history

* minor performance improvement

* Added comment

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Fixed test failures and compilation issue

* Fixed account_history_pagination test

* Fix compilation in debug mode

* Removed unrelated comment

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* Allow sufficient space for new undo_session

* Throw for deep nesting

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* Added cli_test to CI

* use random port numbers in app_test (#154)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* fix for lottery end

* fix declarations

* fix declarations

* fix boost integer

* fix compilation

* fix chain tests

* fix app_test

* try to fix cli test

* fix incorrect max_depth param

* working cli test

* correct fc version

* Revert "[SON-107] Merge develop branch to SONs-base (#166)"

This reverts commit 499e318199.

* Fix build error, add missing GRAPHENE_MAX_NESTED_OBJECTS parameter

* Plugin description added, SON plugin params example

* fix for cli test

* SON object, operations, cli_wallet commands and RPC (#160)

- create_son, update_son, delete_son, list_sons
- get_sons, get_son_by_account, lookup_son_accounts, get_son_count
- vote_for_son, update_son_votes
- claim_registered_son
- get_son in cli_wallet
- Updating global_property_object
- Decrease SON hardfork time for test purposes
- CLI Wallet tests imported from develop branch

* fix affiliate tests

* SON-108 - Add cli wallet tests for create_son (#174)

* SON-108 - Add cli wallet tests for create_son

* Add info message at the beginning and end of the SON CLI tests

* Minor output message change

* Enable Boost test messages in unit tests

* [SON-110] get_son cli test (#173)

* get_son cli test

* update_son cli test

* Add cli wallet tests for vote_for_son (#175)

* fix insert object processing in indexes, son_delete is working

* Fix segfault when using delete_son from cli_wallet (#177)

* Fix segfault when using list_sons from cli_wallet (#178)

* Add son_delete cli tests (#182)

* Add son_delete cli tests

* add son vesting config options

* add vesting balance type support

* add dormant vesting policy for son

* add precision to son vesting amount

* SON118-Add Budget for SON (#165)

* SON118-Add Budget for SON

* SON118 - Compilation errors fix

* SON118 - Proper commenting around pay_sons function

* SON118 - Comment correction, SON statistics object implementation type correction

* SON118 - Add missing index init and reflect enums

* SON118 - Correcting the indentation

* SON118 SON144 - Add unit test, code fixes and resolve failures for existing tests

* SON118 SON144 - Removing extra spaces added

* abstraction of dormant vesting policy

* force son create vesting balance to have dormant policy

* remove not needed code from wallet son commands, add delete son test to cli (#181)

* Active SONs, list up to 15, order by votes, add test (#185)

* Add test for selecting 15 SONs with highest votes
* Display up to 15 active SONs, SON ordering by total_votes

* fix build error (#191)

* fix build error

* adapt son_pay_test to dormant vesting policy

* [SON-113] Unit test for cli `update_son_votes` (#179)

* refactor cli tests

* update_son_votes tests

* list_sons test

* test changes in get_global_properties() result

* fix generate_block failure

* fix update_son_votes test

* improve update_son cli test

* fix linking errors

* refactor select_top_fifteen_sons test

* refactor other son cli tests to use son_test_helper

* create_vesting call in wallet_api

* test fix

* fix create_son in wallet_api and cli tests

* SON126 - Witness Proposals to deregister SONs (#192)

* SON126 - Witness Proposals to deregister SONs

* SON126 - Approval by witness, removal of son_proposal_object, commenting

* SON126 - Witness proposal tests and related fixes

* SON126 - Proper commenting

* fix son_delete_operation reflection

* [SON-160] Fix create_vesting wallet_api call (#206)

* Fix create_vesting wallet_api call

* change type for vesting_type in create_vesting_balance

* [SON-113] Fix several issues in update_son_votes call in wallet_api  (#208)

* do not allow update votes with both empty lists

* fix error messages

* check number of sons against votes number in account_object

* Update error message

* list_active_sons api call implementation

* unit test for list_active_sons

* fix code style

* use assert instead of checking condition with low possibility

* Fixed betting tests (#217)

* Fixed betting tests

* Removed comments

* removed unrelated parameter description from delete_son

* Add Bitcoin network listener to a SON plugin (#196)

* Add Bitcoin network listener to a SON plugin
* Add default parameters for Peerplays Bitcoin test node
* Add Bitcoin block processing
* Update source code to last designs
* Set default parameters for peerplays_sidechain plugin to Bitcoin test server
* WIP: Some Bitcoin transaction processing

* [SON-199] Fix unit tests (#233)

* fix app_test

* fix son_delete_test

* Add peerplays account for a SON in a config/command line options (#231)

* SON193-SON200- SON Heartbeats and maintenance mode changes (#241)

* SON193-SON200- SON Heartbeats and maintenance mode changes

* SON193-SON200- SON Heartbeats and maintenance tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

* SON194-SON195 - Report SON Down, addition of SON Account for sidechain consensus (#244)

* SON194-SON195 - Addition of SON BTC Account and report son down changes

* SON194-SON195 - SON BTC Account errors rectification

* SON194-SON195 - Adding Tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

Co-authored-by: obucinac <obucinac@users.noreply.github.com>

* SON206 - Plugin SON Heartbeat changes (#250)

* SON206 - Plugin SON Heartbeat changes

* SON206 - Plugin SON Heartbeat changes, comment removal

* SON206 - Plugin SON Heartbeat changes, stub testing and changes

* SON206 - Plugin SON Heartbeat changes, removing debugs prints

* Wallet recreation on new set of SONs voted in (#256)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* Fix build errors

* SON212-SON213 - Add Sidechain Plugin Code to report and approve SON Down proposal (#260)

* SON212 - Add Sidechain Plugin Code to report SON Down

* SON212-SON213 - Add Sidechain Plugin Code to report SON Down, Approve proposal from sidechain plugin

* SON212-SON213 - Fix Build Error (#262)

* SON212-SON213 - Fix Build Error

* SON212-SON213 - Fix Build Error Add smart_ref definition for linking

* Updated gitlab CI to sync submodules (#265)

* SON217 - SON Maintenance,Heartbeat state transition changes (#264)

* SON217 - SON Maintenance,Heartbeat state transition changes

* SON217 - SON Maintenance,Heartbeat state transition changes

* [SON-202] Implement cli_wallet commands for maintenance mode (#261)

* Add stop_son_maintenance CLI call

* fix bug with SON activation

* son_maintenance_operation

* son_maintenance_operation tests

* cli test for son maintenance state

* start_son_maintenance CLI call

* keep maintenance state during active SON set changes

* Quick fix for list_active_sons

* SON199 - Fix Unit Test Failure (#268)

* Quickfix for update_sidechain_address and delete_sidechain_address cli commands

* SON206_Plugin_CrashFix_Reorg - Plugin Changes (#272)

* SON206_Plugin_CrashFix_Reorg - Plugin Changes

* SON206_Plugin_CrashFix_Reorg - add owner auths to consensus account

* SON165 - Keys mapping missing from wallet data (#274)

* SON232 - Avoid duplicate proposals from sidechain plugin (#275)

* SON233 - Provide correct downtime metrics to user (#278)

* son_wallet_object operations and multisig wallet recreation by RPC (#263)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object
* son_wallet_object operations
* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
* son_wallet_object API and cli wallet commands
* Send RPC command to bitcoin node to recreate multisig wallet
* Updating wallet info through operation instead through database.modify() for persistance
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
* Refactor primary wallet recreation
* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
* Quickfix for checking payer in evaluator
* Fix failing son_wallet_tests
- Check for son_btc_account is temporarely disabled
* Remove redundant file
Co-authored-by: gladcow <jahr@yandex.ru>

* SON214 - Request maintenance wallet commands (#280)

* SON wallet transfer object and operations (#279)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add is_active_son guards for sidechain events processing

Co-authored-by: gladcow <jahr@yandex.ru>

* Support multiple SON nodes per software instance (#282)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Temoprary disable account history tests for tracking accounts

Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-209] Create P2SH address with custom redeemScript (#271)

* Create redeem script for SONs primary wallet

* Add importaddress call

Allows to watch for related transactions without private keys import

* Get UTXO set for watched addresses

* createrawtransaction call

* signing PW spending transaction

* unit test for btc tx serialization

* sending PW transfer in test

* BIP143 tx signing

* use bech32 address format

* use single sha256 for lock script

* Digest fix

* working signing

* separate signing

* test partially signed PW transfer

* add ability to gather signatures before signing (#290)

* [SON-242] fix list_active_sons call after deleting an active son (#292)

* test to reproduce error in list_active_sons after delete_son

* prevent exception in list_active_list

* [SON-260] Sidechain Token withdrawal (#286)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* Withdrawal refactoring

* Withdrawal refactoring

Co-authored-by: gladcow <jahr@yandex.ru>

* SON261 - Bitcoin deposit, withdrawal, PW transfer (#287)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* SON261 - Deposit transfer ( user address -> PW ) and Withdrawal transfer ( PW -> user address ) for m-of-n multisig

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* SON261 - Withdrawal transfer ( PW -> user address ), addition of bitcoin public private key to config.ini for multiple sons mode

* Withdrawal refactoring

* Withdrawal refactoring

* SON261 - Fix prepare_tx

* SON261 - Add PW->PW Transfer and Code reorg

* Fix file permissions

Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-264] Integrating deposit/withdrawals with bitcoin transactions (feature/SON-260 + SON261 branches) (#291)

* Partial integration done, some Bitcoin RPC refactoring
* CLang Format config file
* CLang Format config file v2.0
* Fix repeating tasks that should be executed by scheduled SON only
* Fix withdrawal
* Integrate PW wallet fund moving
* Resolve conflicts

Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>

* SON200 - SON Down proposal broken after latest merges (#294)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness (#298)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness

* Various SON improvements (#297)

* Refactor SON processing
* Better exposure of sidechain private keys in sidechain handlers
* Support non default Bitcoin wallets
* Fix crash on config file recreation
* clang-format formatting
* New Bitcoin wallet related RPC calls
* Add missing create_son_deregister_proposals calls
* Add missing create_son_deregister_proposals calls
* Add loading/unlocking/locking of non-default bitcoin wallet
* Bitcon RFC logs improved, proposal aprovement improved
* Move signal connection after handlers are created

* Merge develop into SONS

* SON118 - Add tx sign metrics for SON rewards (#302)

* resolved compilation issues and other conflicts

* SON202 - Maintenance improvements (#303)

* Quickfix, remove dead code, return result from wallet withdraw do_evaluate

* SON275 - ZMQ Crash on application exit (#306)

* SON275 - ZMQ Crash on application exit

* SON275 - Fix Indentation

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* need to assign both name and id to stats id

* fix unit test case failures(add gpos vesting before voting)

* SON276 - Fix SON proposal exceptions - I (#307)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Add SON statistic for tracking reported sidechain transactions (#308)

- Deposit and Withdrawal object extended to contain expected
  and received transaction reports from SON network
- SON statistic object extended to contain total number of
  sidechain transactions reported by SON network when SON was
  active and number of transactions reported by single SON when
  he was active
- Code formatting

* Allow voting for son, only if GPOS vesting balance available

* notifications of SONS should get restrict to sons functionality

* update GPOS hardfork date to sons branch

* SON127 - Add son parameter extensions to genesis, push proposal fix (#310)

* SON276 - Fix SON proposal exceptions - I

* SON127 - Add son parameter extensions to genesis, push proposal fix

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* update GPOS HF to fall in before SONS HF, remove check

* updated unit test cases to reflect GPOS vesting and update account id's according to sons-account

* [SON-24] - SON Rewards missing serialisations and end to end testing (#313)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Revert "Merge develop branch changes(GPOS+graphene updates) into SONs branch"

* [SON-122] - SON Statistics improvements and consensus account creation (#318)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Replace raw with psbt transactions to support parital tx signing (#311)

* RPC calls for PSBT, raw transactions replaced with PSBT
* Fix estimatesmartfeerate, extensive RPC calls logging for debugging purposes
* Remove dead code
* Partial signing functional for deposit and withdrawal
* Fix sidechain_type declarations
* Depositing Peerplays asset refactored
* Partial signing functional for primary wallet funds moving
* Prettier logs
* Refactor multiple SON support processing
* Serialize field complete from sidechain_transaction_sign_operation
* Refactor transaction signing in particular order, BTC only (maybe) need it
* Add number of required signatures parameter for addmultisigaddress
* Change default bitcoin node parameters
* Transaction signing only by scheduled son
* Removed scheduling log
* Prevent PW funds moving to the same address
* Refactor sidechain_transaction_object processing, code cleanup
* Remove obsolete tests
* Decrease logging
* Code readability
* When updated, import son wallet bitcoin address to bitcoin wallet
* When updated, recreate son wallet bitcoin address on each node
* Refactor on_changed_objects, move it into task
* Add check to prevent deposit/withdrawal double processing
* Improved check for sidechain transaction object creation
* Single sidechain transaction signature per block allowed only
* Unlock wallet on addmultisigaddress
* Import both address and redeem script on primary wallet change, fix some compiler warnings
* Fix invalid list of signers for PW funds transfer

* [SON-312] Refactor create_son to assign owner account public key as a signing_key

remove key derivation from create son (#323)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* [SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322)

* Parallelizing sidechain transaction signing (#319)

* [SON-321, SON-323] Deposit/Withdraw object creation refactoring (#320)

* Remove proposals for creating deposit and withdrawal objects, strenghten evaluator checks
* Only active SON can create the object
* Only expected SON can confirm the transaction
* Transaction must be initiated (paid) by SON account owner (SON account given in operation)
* Transaction confirmation must contain exactly the same data as existing object
* Mirror SON owner account weights from son-account.active.account_auths to active SONs
* Fix duplicated typedef, peerplays_sidechain::sidechain_type to chain::sidechain_type
* Add missing serialized field

* [SON-318_SON-319] - Add approval checks for son down, deregister proposals (#321)

* [SON-318_SON-319] - Add approval checks for son down and deregister proposals

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-311] Add try_create_son call without explicit deposit params (#324)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Fix build error

* Quickfix - change GPOS and SON hardfork times

* [SON-332] Check gitlab building process for dirty build (#327)

* Fix failing son test, fix data types and check condition
* Very clean build on Gitlab

* update son-account parameters (#328)

* [SON-329] Hotfix - Enable test test_update_dividend_interval

* [SON-313] - Limit SON functionality when min no. of sons are not present (#329)

* [SON-313] - Limit SON functionality when min no. of sons are not present

* Revert SON HF related checks and tests

* Remove the capability to process proposals in plugin

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-307] Create PBTC asset  (#326)

* SON-297_SON-336 - SON vesting functionality broken after graphene merge (#331)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - add initialization values to extension params, remove trailing spaces

* [SON-305, SON-308, SON-310] Use BTC asset in bitcoin deposits and withdraws (#332)

* [SON-339] - SON Schedule crash (#334)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues (#335)

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-322, SON-324] Approval checks for processing deposit/withdrawal (#330)

* Refactor proposal processing
* Added check for approving son_wallet_deposit_process_operation
* Added check for approving son_wallet_withdraw_process_operation
* Calculating exchange rates fixed
* Fix depositing Peerplays assets

* [SON-320] Added check for approving son_wallet_update_operation (#336)

* [SON-325] Added check for approving sidechain_transaction_create_operation (#337)

* [SON-341, SON-342] Fix issue with deposits number (#339)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* [SON-344] BTC asset is created with wrong quote asset id, Fixed (#341)

* [SON-344] BTC asset is created with wrong quote asset id, Fixed
* Respond to code review

* [SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342)

* [SON-348] Transaction hash not saved in object after Bitcoin transaction is sent (#343)

- Fixed
- Unused parameters removed

* [SON-337] - Prevent update_son_votes without GPOS vesting (#344)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-353] Refactor PW processing, PW transfer fixed (#347)

* Add proposal checks for deposit and withdrawal
* Refactor proposal approvement
* Fix transaction verification
* Remove logs

* [SON-354] Fix son_info compare function (#350)

* check object's id (#351)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* SON Weighted Multi Signature Signing (#349)

* Bring in the bitcoin utils code into plugin
* Add tx creation, signing and tests
* tx deserialization fix
* add 10-of-14 multisig address test
* Add signing and verification tests and sign_transaction_standalone
* Add send_transaction_standalone function
* Debug logs and additional tests
* Fix for son deletion in the middle
* Extend script_builder
* Witness script for weighted wallet
* btc_weighted_multisig_address implementation
* Fix for bad-txns-nonstandard-inputs
* Weighted multisignature address test
* Create test tx with weighted multisig wallet
* Fix the issues with tx signing
* End to End test weighted multi sig
* 1 or m-of-n deposit address support
* Move network_type enum to the base class
* btc_one_or_weighted_multisig_address implementation
* Simplify redeem script
* Fix error in redeem_script
* btc_one_or_weighted_multisig_address tests
* Refactor sidechain address mapping
* CLANG code format
* CLANG code format sidechain tests
* Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring
* Move util functions to Utils file
* Add proper checks for withdraw fee
* Deposit address creation, import deposit/withdraw addresses, some code cleanup

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-349] Delay BTC asset issue/reserve until tx confirmed on sidchain (#348)

* Separate transaction settling from deposit/withdrawal processing
* Handle peerplays deposits with transaction settling
* Remove logs
* All dev features enabled/disabled with single flag
* Deposit/withdraw process and sidechain transaction creation in single proposal

* Hotfix - remove importing sidechain addresses

* Hotfix - remove redundant deposit sidechain address recreation

* private-key option update

* Use decoderawtraction json for proposal approvals (#352)

* Use decoderawtraction json for proposal approvals
* Use default null string to get first vout

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Prevent incorrect signatures to be added to transaction (#354)

* Prevent incorrect signatures to be added to transaction
* Check signers list before signing

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - use getrawtransaction for approvals and settling (#355)

* Revert "Use decoderawtraction json for proposal approvals (#352)"
This reverts commit d3385b28cb.
* User getrawtransaction for proposal approvals and settling
* Code cleanup

* [SON-135] Add timelock to user deposit address (#356)

* timelocks
* timelocked deposit address
* test for deposit timelock

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - fix threshold_weight calculation in redeem scripts

* fix broken peerplays_sidechain tests (#357)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Save deposit address redeem and witness script into sidechain address object

* [SON-359] - Fix Errors processing to-be-refunded deposits (#358)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-363] - Remove son deletion (#359)

* [SON-363] - Remove son deletion

* Fix the tests

* [SON-314] - Weighted Rewards and equal weighted son-account (#360)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Bitcoin network type deduction (#361)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* chore: changed building to debug mode

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* chore: updated Dockerfile with dnsutils

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Son deposit address enhancements (#362)

* Deposit address enhancements

* fix tests

Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>

* Ws updates

* Fix for custom operation authority checking (BTS Issue #210) (#382)

* Resolve #210: [HF] Check authorities on custom_operation

The required_auths field on custom_operation was being ignored during authority checking. This commit causes it to be checked correctly, and adds a unit test verifying as much.

* Ref #381: Fixes

Build and logic fixes for Pull Request #381

* Ref #381: Fix bad merge

During merge conflict resolution, I accidentally broke custom
authorities. This fixes it.

* compilation fix

Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* Cleanup changes for pretier diff

* Cleanup changes for prettier diff

* NFT Permissions (#380)

* Account Roles Permission 1 - Working code with tests

* Account Roles Permission 2 - Add marketplace offer/bid tests

* Account Roles Permission 3 - Add Op check

* Account Roles Permission 4 - Add chain params and limits

* Cleanup changes for prettier diff

* Fix failing saving_keys_wallet_test

* Fix failing saving_keys_wallet_test

* Align submodule versions

* Add missing break

* Increase tests log_level, some cleanup

* Decrease log level for tests

* Fix block_tests/maintenance_interval test

* Fix son_operation_tests/son_pay_test test

* Remove base_uri length checks

* Fix HF info

Co-authored-by: S <obucinac@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* SON hardfork time to Saturday, October 17, 2020 00:00:00 UTC

* hotfix - chain params variable overflow, rbac hf check (#387)

* hotfix - son max count fix

* init variables

* Update SON HF time to October 20th 2020, 00:00:00

* Update SON HF time to October 20th 2020, 00:00:00

* Release build fix, missing includes (#391)

fixes https://github.com/peerplays-network/peerplays/issues/390

* Fix release build on 18.04, fc::smart_ref_* removed

* Gitlab will build Debug and Release versions

* Revert "Gitlab will build Debug and Release versions"

This reverts commit 7a721f8094.

* Gitlab will build Release version only

* add safe copy

* verify_transaction proper value

* proper init of publick_key

Co-authored-by: serkixenos <70147861+serkixenos@users.noreply.github.com>
Co-authored-by: S <obucinac@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>
Co-authored-by: Serki <serki.xenos@gmail.com>
2020-10-22 23:33:46 +05:30
serkixenos
d332c009da
Merge pull request #392 from peerplays-network/hotfix/release_build_fix_develop
Release build fix, missing includes
2020-10-19 12:54:10 +02:00
pravin-battu
d0aef87ec6 editline implementation 2020-10-16 11:38:21 -03:00
serkixenos
959474610f
Release build fix, missing includes (#391)
fixes https://github.com/peerplays-network/peerplays/issues/390
2020-10-16 18:42:14 +05:30
Serki
a086b13495 Release build fix, missing includes 2020-10-16 11:47:10 +02:00
serkixenos
fc1a815250
Update SON HF time to October 20th 2020, 00:00:00 2020-10-14 20:14:59 +02:00
serkixenos
2d28c13e7a
Update SON HF time to October 20th 2020, 00:00:00 2020-10-14 20:04:35 +02:00
sierra19XX
a20be87337
hotfix - son max count fix (#389)
* hotfix - son max count fix

* init variables
2020-10-13 07:07:57 +11:00
sierra19XX
71090ca678 init variables 2020-10-12 13:12:18 +02:00
sierra19XX
f0437308cb hotfix - son max count fix 2020-10-12 13:12:07 +02:00
sierra19XX
9642e5d7af hotfix - chain params variable overflow, rbac hf check (#387) 2020-10-09 18:58:10 +02:00
sierra19XX
b31b402fd5
hotfix - chain params variable overflow, rbac hf check (#387) 2020-10-09 23:58:25 +11:00
Serki
3e8a64f1b7 SON hardfork time to Saturday, October 17, 2020 00:00:00 UTC 2020-10-07 14:59:11 +02:00
serkixenos
7d1db4e883
Merge develop into beatrice (#386)
* Fix building on Ubuntu 18.04 with GCC 7

* Peerplays SON plugin skeleton (#122)

* Peerplays SON plugin skeleton
* SON tests skeleton

* Part two of SON-83 - plugins option in command line and config file (#126)

- Empty SON plugin is INACTIVE by default
- To enable it, add peerplays_sidechain to plugins section in
  config file, or use --plugins command line option
- Plugin can work with or without witness

* SON11 - Add chain extension parameter to set SON count

* [SON-107] Merge develop branch to SONs-base (#166)

* fix rng and get_winner_numbers implemented

* coipied code for bitshares fixing 429 and 433 isuues

* ticket_purchase_operation implemented. added lottery_options to asset

* lottery end implemented

* minor logic changes. added db_api and cli_wallet methods

* fix reindex on peerplays network

* fix some tests. add gitlab-ci.yml

* add pull to gitlab-ci

* fix

* fix and comment some tests

* added owner to lottery_asset_options. commented async call in on_applied_block callback

* added get_account_lotteries method to db_api and cli, lottery end_date and ticket_price verification

* merge get_account_lotteries branch. fix create_witness test

* fix test genesis and end_date verification

* fixed indices sorting and lottery end checking by date

* update db_version for replay and removed duplicate include files

* Added ntp and upgraded boost version

* Revert "GPOS protocol"

* need to remove backup files

* virtual-op-fix for deterministic virtual_op number

* Merged beatrice into 5050

* Updated gitmodules, changes to allow voting on lottery fee

* Removed submodule libraries/fc

* Added libraries/fc

* added missing , in types.hpp

* Added sweeps parameters to parameter_extension

* added missing comma in operations.hpp, small changes to config.hpp

* fixed returntype in chain_parameters.hpp

* removed sweeps_parameter_extensions

* Changed fc library

* fixed asset_object

* Changed peerplays-fc submodule

* Changed fc submodule to ubuntu 18.04 upgrade

* Removed submodule libraries/fc

* Added fc library back

* fix casting in overloaded function

* Removed blind_sign and unblind_signature functions

* Added new lottery_asset_create_operation

* Changed sweeps hardfork time

* Removed redundant if from asset_evaluator and fixed db_notify

* fixed duplicate code in fee_tests

* removed redundant tgenesis file

* Enable building on Ubuntu 18.04 using GCC 7 compiler

* fix: is_benefactor_reward had the default value of true when not set

* Docker file for Ubuntu 18.04

Base image updated to Unbuntu 18.04
Prerequisite list updated
Basic configuration updated

* Quick fix: Added missing package pkg-config

* Docker file updates

* 5050 fee update and compilation error fix

* Dockerfile, set system locale

Prevents locale::facet::_S_create_c_locale name error

* Update README.md

Fix typo

* Update README.md

* Changed hardfork time for SWEEPS and Core-429

* revert master changes that were brought in previous commit

* Fixed error when account_history_object with id 0 doesnt exist

* Fixed error while loading object database

* test for zero id object in account history

* Reorder operations in Dockerfile, to make image creation faster

- Reorder prevents unnecessary building of Boost libraries

* Fix for irrelevant signature included issue

* fix copyrigth messages order

* remove double empty lines

* Backport fix for `get_account_history` from https://github.com/bitshares/bitshares-core/pull/628 and add additional account history test case

* NTP client back

* GRPH-53-Log_format_error

* Merge pull request #1036 from jmjatlanta/issue_730

Add fail_reason to proposal_object

* Unit test case fixes and prepared SONs base

* Use offsetof instead of custom macro

* Hide some compiler warnings

* Make all the tests compile

* Add nullptr check in api.cpp for easier testing

* Add test case for broadcast_trx_with_callback API

* Unit test case fixes and prepared SONs base

* Merge pull request #714 from pmconrad/json_fix

JSON fix

* Increase max depth for trx confirmation callback

* Adapt to variant API with `max_depth` argument

* Update fc submodule

* Created unit test for #325

* remove needless find()

* GRPH-4-CliWallet_crash_ctrlD

* fix copyright message

* Make all the tests compile

* increase delay for node connection

* Increase block creation timeout to 2500ms

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Improved resilience of block database against corruption

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed duplicate ops returned from get_account_history

* minor performance improvement

* Added comment

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Fixed test failures and compilation issue

* Fixed account_history_pagination test

* Fix compilation in debug mode

* Removed unrelated comment

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* Allow sufficient space for new undo_session

* Throw for deep nesting

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* Added cli_test to CI

* use random port numbers in app_test (#154)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* fix for lottery end

* fix declarations

* fix declarations

* fix boost integer

* fix compilation

* fix chain tests

* fix app_test

* try to fix cli test

* fix incorrect max_depth param

* working cli test

* correct fc version

* Revert "[SON-107] Merge develop branch to SONs-base (#166)"

This reverts commit 499e318199.

* Fix build error, add missing GRAPHENE_MAX_NESTED_OBJECTS parameter

* Plugin description added, SON plugin params example

* fix for cli test

* SON object, operations, cli_wallet commands and RPC (#160)

- create_son, update_son, delete_son, list_sons
- get_sons, get_son_by_account, lookup_son_accounts, get_son_count
- vote_for_son, update_son_votes
- claim_registered_son
- get_son in cli_wallet
- Updating global_property_object
- Decrease SON hardfork time for test purposes
- CLI Wallet tests imported from develop branch

* fix affiliate tests

* SON-108 - Add cli wallet tests for create_son (#174)

* SON-108 - Add cli wallet tests for create_son

* Add info message at the beginning and end of the SON CLI tests

* Minor output message change

* Enable Boost test messages in unit tests

* [SON-110] get_son cli test (#173)

* get_son cli test

* update_son cli test

* Add cli wallet tests for vote_for_son (#175)

* fix insert object processing in indexes, son_delete is working

* Fix segfault when using delete_son from cli_wallet (#177)

* Fix segfault when using list_sons from cli_wallet (#178)

* Add son_delete cli tests (#182)

* Add son_delete cli tests

* add son vesting config options

* add vesting balance type support

* add dormant vesting policy for son

* add precision to son vesting amount

* SON118-Add Budget for SON (#165)

* SON118-Add Budget for SON

* SON118 - Compilation errors fix

* SON118 - Proper commenting around pay_sons function

* SON118 - Comment correction, SON statistics object implementation type correction

* SON118 - Add missing index init and reflect enums

* SON118 - Correcting the indentation

* SON118 SON144 - Add unit test, code fixes and resolve failures for existing tests

* SON118 SON144 - Removing extra spaces added

* abstraction of dormant vesting policy

* force son create vesting balance to have dormant policy

* remove not needed code from wallet son commands, add delete son test to cli (#181)

* Active SONs, list up to 15, order by votes, add test (#185)

* Add test for selecting 15 SONs with highest votes
* Display up to 15 active SONs, SON ordering by total_votes

* fix build error (#191)

* fix build error

* adapt son_pay_test to dormant vesting policy

* [SON-113] Unit test for cli `update_son_votes` (#179)

* refactor cli tests

* update_son_votes tests

* list_sons test

* test changes in get_global_properties() result

* fix generate_block failure

* fix update_son_votes test

* improve update_son cli test

* fix linking errors

* refactor select_top_fifteen_sons test

* refactor other son cli tests to use son_test_helper

* create_vesting call in wallet_api

* test fix

* fix create_son in wallet_api and cli tests

* SON126 - Witness Proposals to deregister SONs (#192)

* SON126 - Witness Proposals to deregister SONs

* SON126 - Approval by witness, removal of son_proposal_object, commenting

* SON126 - Witness proposal tests and related fixes

* SON126 - Proper commenting

* fix son_delete_operation reflection

* [SON-160] Fix create_vesting wallet_api call (#206)

* Fix create_vesting wallet_api call

* change type for vesting_type in create_vesting_balance

* [SON-113] Fix several issues in update_son_votes call in wallet_api  (#208)

* do not allow update votes with both empty lists

* fix error messages

* check number of sons against votes number in account_object

* Update error message

* list_active_sons api call implementation

* unit test for list_active_sons

* fix code style

* use assert instead of checking condition with low possibility

* Fixed betting tests (#217)

* Fixed betting tests

* Removed comments

* removed unrelated parameter description from delete_son

* Add Bitcoin network listener to a SON plugin (#196)

* Add Bitcoin network listener to a SON plugin
* Add default parameters for Peerplays Bitcoin test node
* Add Bitcoin block processing
* Update source code to last designs
* Set default parameters for peerplays_sidechain plugin to Bitcoin test server
* WIP: Some Bitcoin transaction processing

* [SON-199] Fix unit tests (#233)

* fix app_test

* fix son_delete_test

* Add peerplays account for a SON in a config/command line options (#231)

* SON193-SON200- SON Heartbeats and maintenance mode changes (#241)

* SON193-SON200- SON Heartbeats and maintenance mode changes

* SON193-SON200- SON Heartbeats and maintenance tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

* SON194-SON195 - Report SON Down, addition of SON Account for sidechain consensus (#244)

* SON194-SON195 - Addition of SON BTC Account and report son down changes

* SON194-SON195 - SON BTC Account errors rectification

* SON194-SON195 - Adding Tests

* User sidechain address mappings (#240)

* WIP: Sidechain objects
* Revert "WIP: Sidechain objects"
This reverts commit 8676940a28.
* WIP: User sidechain address mappings
* Fix reflection problem
* Reflect missing members of sidechain_address_update_operation
* Add sidechain address operation tests
* Enable RPC calls
* Fix build errors due to merge conflict
* Fix RPC, add CLI wallet commands for sidechain addresses
* Improved peerplays_sidechain_plugin_impl
* Remove short param for son-id
* Fix crashing errors on bitcoin event received
* Code review changes

* SON207 - Introduce scheduling for SONs similar to witnesses (#251)

* Extend SON objects to contain sidechain public keys (#254)

Co-authored-by: obucinac <obucinac@users.noreply.github.com>

* SON206 - Plugin SON Heartbeat changes (#250)

* SON206 - Plugin SON Heartbeat changes

* SON206 - Plugin SON Heartbeat changes, comment removal

* SON206 - Plugin SON Heartbeat changes, stub testing and changes

* SON206 - Plugin SON Heartbeat changes, removing debugs prints

* Wallet recreation on new set of SONs voted in (#256)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* Fix build errors

* SON212-SON213 - Add Sidechain Plugin Code to report and approve SON Down proposal (#260)

* SON212 - Add Sidechain Plugin Code to report SON Down

* SON212-SON213 - Add Sidechain Plugin Code to report SON Down, Approve proposal from sidechain plugin

* SON212-SON213 - Fix Build Error (#262)

* SON212-SON213 - Fix Build Error

* SON212-SON213 - Fix Build Error Add smart_ref definition for linking

* Updated gitlab CI to sync submodules (#265)

* SON217 - SON Maintenance,Heartbeat state transition changes (#264)

* SON217 - SON Maintenance,Heartbeat state transition changes

* SON217 - SON Maintenance,Heartbeat state transition changes

* [SON-202] Implement cli_wallet commands for maintenance mode (#261)

* Add stop_son_maintenance CLI call

* fix bug with SON activation

* son_maintenance_operation

* son_maintenance_operation tests

* cli test for son maintenance state

* start_son_maintenance CLI call

* keep maintenance state during active SON set changes

* Quick fix for list_active_sons

* SON199 - Fix Unit Test Failure (#268)

* Quickfix for update_sidechain_address and delete_sidechain_address cli commands

* SON206_Plugin_CrashFix_Reorg - Plugin Changes (#272)

* SON206_Plugin_CrashFix_Reorg - Plugin Changes

* SON206_Plugin_CrashFix_Reorg - add owner auths to consensus account

* SON165 - Keys mapping missing from wallet data (#274)

* SON232 - Avoid duplicate proposals from sidechain plugin (#275)

* SON233 - Provide correct downtime metrics to user (#278)

* son_wallet_object operations and multisig wallet recreation by RPC (#263)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object
* son_wallet_object operations
* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
* son_wallet_object API and cli wallet commands
* Send RPC command to bitcoin node to recreate multisig wallet
* Updating wallet info through operation instead through database.modify() for persistance
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
* Refactor primary wallet recreation
* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
* Quickfix for checking payer in evaluator
* Fix failing son_wallet_tests
- Check for son_btc_account is temporarely disabled
* Remove redundant file
Co-authored-by: gladcow <jahr@yandex.ru>

* SON214 - Request maintenance wallet commands (#280)

* SON wallet transfer object and operations (#279)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add is_active_son guards for sidechain events processing

Co-authored-by: gladcow <jahr@yandex.ru>

* Support multiple SON nodes per software instance (#282)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Temoprary disable account history tests for tracking accounts

Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-209] Create P2SH address with custom redeemScript (#271)

* Create redeem script for SONs primary wallet

* Add importaddress call

Allows to watch for related transactions without private keys import

* Get UTXO set for watched addresses

* createrawtransaction call

* signing PW spending transaction

* unit test for btc tx serialization

* sending PW transfer in test

* BIP143 tx signing

* use bech32 address format

* use single sha256 for lock script

* Digest fix

* working signing

* separate signing

* test partially signed PW transfer

* add ability to gather signatures before signing (#290)

* [SON-242] fix list_active_sons call after deleting an active son (#292)

* test to reproduce error in list_active_sons after delete_son

* prevent exception in list_active_list

* [SON-260] Sidechain Token withdrawal (#286)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* Withdrawal refactoring

* Withdrawal refactoring

Co-authored-by: gladcow <jahr@yandex.ru>

* SON261 - Bitcoin deposit, withdrawal, PW transfer (#287)

* Extend GPO.active_sons to contain votes and all public keys

* Introduce son_wallet_object

* son_wallet_object operations

* son_wallet_object operations

* son_wallet_object operations completed, basic tests added

* Create son_wallet_object on new set of SONs, to initiate primary wallet recreation

* son_wallet_object API and cli wallet commands

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Send RPC command to bitcoin node to recreate multisig wallet

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Wallet recreation by scheduled SON only, some cosmetic refactoring

* Updating wallet info through operation instead through database.modify() for persistance

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp

Co-Authored-By: gladcow <jahr@yandex.ru>

* Fix #include <graphene/chain/son_wallet_transfer_object.hpp>

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* SON wallet transfer object and operations, for tracking assets deposit/withdrawal

* Refactor primary wallet recreation

* Refactor primary wallet recreation

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal

* Quickfix for checking payer in evaluator

* Quickfix for checking payer in evaluator

* Fix failing son_wallet_tests

- Check for son_btc_account is temporarely disabled

* Remove redundant file

* Squashed commit of the following:

commit a688bb93ed
Author: obucinac <obucinac@users.noreply.github.com>
Date:   Tue Feb 4 19:31:45 2020 +0100

    son_wallet_object operations and multisig wallet recreation by RPC (#263)

    * Extend GPO.active_sons to contain votes and all public keys

    * Introduce son_wallet_object
    * son_wallet_object operations
    * Create son_wallet_object on new set of SONs, to initiate primary wallet recreation
    * son_wallet_object API and cli wallet commands
    * Send RPC command to bitcoin node to recreate multisig wallet
    * Updating wallet info through operation instead through database.modify() for persistance
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Update libraries/chain/include/graphene/chain/protocol/son_wallet.hpp
    * Fix #include <graphene/chain/son_wallet_transfer_object.hpp>
    * Refactor primary wallet recreation
    * PW recreation refactoring, prevent duplicated recreations, update wallet address through proposal
    * Quickfix for checking payer in evaluator
    * Fix failing son_wallet_tests
    - Check for son_btc_account is temporarely disabled
    * Remove redundant file
    Co-authored-by: gladcow <jahr@yandex.ru>

commit 6e61d6b055
Author: satyakoneru <satyakoneru.iiith@gmail.com>
Date:   Tue Feb 4 00:14:39 2020 +1100

    SON233 - Provide correct downtime metrics to user (#278)

* Remove duplicated item in CMakeLists.txt

* Issue tokens to the user who deposited Bitcoin, WIP...

* Add son_wallet_transfer_process_operation

* Issue tokens to the user who deposited Bitcoin, WIP...

* Support multiple SON nodes per software instance

* Add is_active_son guards for sidechain events processing

* Add is_active_son guards, fix sending proposals and aprovals

* Managing GRAPHENE_SON_ACCOUNT and issuing assets on Bitcoin deposit

* Fix bad param

* Fix aprovals on already approved or invalid proposals

* Move transfer inside son_wallet_transfer_process_operation

* Fix merging issue

* Add cmake command line option SUPPORT_MULTIPLE_SONS

* Skeleton of sidechain_net_handler_peerplays

* Skeleton of Peerplays network listener

* SON261 - Deposit transfer ( user address -> PW ) and Withdrawal transfer ( PW -> user address ) for m-of-n multisig

* Temoprary disable account history tests for tracking accounts

* Full Peerplays listener, use GRAPHENE_SON_ACCOUNT instead son_btc_account

* Renaming son_wallet_transfer* to son_wallet_deposit*, introducing son_wallet_withdrawal*

* Extend sidechain_address_object to contain withdrawal addresses
- Withdrawal address is the address where system will send sidechain currencies

* Rename son_wallet_withdrawal* to son_wallet_withdraw*

* Some refactoring

* SON261 - Withdrawal transfer ( PW -> user address ), addition of bitcoin public private key to config.ini for multiple sons mode

* Withdrawal refactoring

* Withdrawal refactoring

* SON261 - Fix prepare_tx

* SON261 - Add PW->PW Transfer and Code reorg

* Fix file permissions

Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: gladcow <jahr@yandex.ru>

* [SON-264] Integrating deposit/withdrawals with bitcoin transactions (feature/SON-260 + SON261 branches) (#291)

* Partial integration done, some Bitcoin RPC refactoring
* CLang Format config file
* CLang Format config file v2.0
* Fix repeating tasks that should be executed by scheduled SON only
* Fix withdrawal
* Integrate PW wallet fund moving
* Resolve conflicts

Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>

* SON200 - SON Down proposal broken after latest merges (#294)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness (#298)

* SON200 - SON Down proposal broken after latest merges

* Add the owner weight threshold similar to witnesses and committee accounts

* SON269 - Move SON deregistration to Plugin from witness

* Various SON improvements (#297)

* Refactor SON processing
* Better exposure of sidechain private keys in sidechain handlers
* Support non default Bitcoin wallets
* Fix crash on config file recreation
* clang-format formatting
* New Bitcoin wallet related RPC calls
* Add missing create_son_deregister_proposals calls
* Add missing create_son_deregister_proposals calls
* Add loading/unlocking/locking of non-default bitcoin wallet
* Bitcon RFC logs improved, proposal aprovement improved
* Move signal connection after handlers are created

* Merge develop into SONS

* SON118 - Add tx sign metrics for SON rewards (#302)

* resolved compilation issues and other conflicts

* SON202 - Maintenance improvements (#303)

* Quickfix, remove dead code, return result from wallet withdraw do_evaluate

* SON275 - ZMQ Crash on application exit (#306)

* SON275 - ZMQ Crash on application exit

* SON275 - Fix Indentation

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* need to assign both name and id to stats id

* fix unit test case failures(add gpos vesting before voting)

* SON276 - Fix SON proposal exceptions - I (#307)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Add SON statistic for tracking reported sidechain transactions (#308)

- Deposit and Withdrawal object extended to contain expected
  and received transaction reports from SON network
- SON statistic object extended to contain total number of
  sidechain transactions reported by SON network when SON was
  active and number of transactions reported by single SON when
  he was active
- Code formatting

* Allow voting for son, only if GPOS vesting balance available

* notifications of SONS should get restrict to sons functionality

* update GPOS hardfork date to sons branch

* SON127 - Add son parameter extensions to genesis, push proposal fix (#310)

* SON276 - Fix SON proposal exceptions - I

* SON127 - Add son parameter extensions to genesis, push proposal fix

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* update GPOS HF to fall in before SONS HF, remove check

* updated unit test cases to reflect GPOS vesting and update account id's according to sons-account

* [SON-24] - SON Rewards missing serialisations and end to end testing (#313)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Revert "Merge develop branch changes(GPOS+graphene updates) into SONs branch"

* [SON-122] - SON Statistics improvements and consensus account creation (#318)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Replace raw with psbt transactions to support parital tx signing (#311)

* RPC calls for PSBT, raw transactions replaced with PSBT
* Fix estimatesmartfeerate, extensive RPC calls logging for debugging purposes
* Remove dead code
* Partial signing functional for deposit and withdrawal
* Fix sidechain_type declarations
* Depositing Peerplays asset refactored
* Partial signing functional for primary wallet funds moving
* Prettier logs
* Refactor multiple SON support processing
* Serialize field complete from sidechain_transaction_sign_operation
* Refactor transaction signing in particular order, BTC only (maybe) need it
* Add number of required signatures parameter for addmultisigaddress
* Change default bitcoin node parameters
* Transaction signing only by scheduled son
* Removed scheduling log
* Prevent PW funds moving to the same address
* Refactor sidechain_transaction_object processing, code cleanup
* Remove obsolete tests
* Decrease logging
* Code readability
* When updated, import son wallet bitcoin address to bitcoin wallet
* When updated, recreate son wallet bitcoin address on each node
* Refactor on_changed_objects, move it into task
* Add check to prevent deposit/withdrawal double processing
* Improved check for sidechain transaction object creation
* Single sidechain transaction signature per block allowed only
* Unlock wallet on addmultisigaddress
* Import both address and redeem script on primary wallet change, fix some compiler warnings
* Fix invalid list of signers for PW funds transfer

* [SON-312] Refactor create_son to assign owner account public key as a signing_key

remove key derivation from create son (#323)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* [SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322)

* Parallelizing sidechain transaction signing (#319)

* [SON-321, SON-323] Deposit/Withdraw object creation refactoring (#320)

* Remove proposals for creating deposit and withdrawal objects, strenghten evaluator checks
* Only active SON can create the object
* Only expected SON can confirm the transaction
* Transaction must be initiated (paid) by SON account owner (SON account given in operation)
* Transaction confirmation must contain exactly the same data as existing object
* Mirror SON owner account weights from son-account.active.account_auths to active SONs
* Fix duplicated typedef, peerplays_sidechain::sidechain_type to chain::sidechain_type
* Add missing serialized field

* [SON-318_SON-319] - Add approval checks for son down, deregister proposals (#321)

* [SON-318_SON-319] - Add approval checks for son down and deregister proposals

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-311] Add try_create_son call without explicit deposit params (#324)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Fix build error

* Quickfix - change GPOS and SON hardfork times

* [SON-332] Check gitlab building process for dirty build (#327)

* Fix failing son test, fix data types and check condition
* Very clean build on Gitlab

* update son-account parameters (#328)

* [SON-329] Hotfix - Enable test test_update_dividend_interval

* [SON-313] - Limit SON functionality when min no. of sons are not present (#329)

* [SON-313] - Limit SON functionality when min no. of sons are not present

* Revert SON HF related checks and tests

* Remove the capability to process proposals in plugin

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-307] Create PBTC asset  (#326)

* SON-297_SON-336 - SON vesting functionality broken after graphene merge (#331)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - add initialization values to extension params, remove trailing spaces

* [SON-305, SON-308, SON-310] Use BTC asset in bitcoin deposits and withdraws (#332)

* [SON-339] - SON Schedule crash (#334)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues (#335)

* [SON-291,SON-328] - SON Configuration invalid, PW creation issues

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-322, SON-324] Approval checks for processing deposit/withdrawal (#330)

* Refactor proposal processing
* Added check for approving son_wallet_deposit_process_operation
* Added check for approving son_wallet_withdraw_process_operation
* Calculating exchange rates fixed
* Fix depositing Peerplays assets

* [SON-320] Added check for approving son_wallet_update_operation (#336)

* [SON-325] Added check for approving sidechain_transaction_create_operation (#337)

* [SON-341, SON-342] Fix issue with deposits number (#339)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* [SON-344] BTC asset is created with wrong quote asset id, Fixed (#341)

* [SON-344] BTC asset is created with wrong quote asset id, Fixed
* Respond to code review

* [SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342)

* [SON-348] Transaction hash not saved in object after Bitcoin transaction is sent (#343)

- Fixed
- Unused parameters removed

* [SON-337] - Prevent update_son_votes without GPOS vesting (#344)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-353] Refactor PW processing, PW transfer fixed (#347)

* Add proposal checks for deposit and withdrawal
* Refactor proposal approvement
* Fix transaction verification
* Remove logs

* [SON-354] Fix son_info compare function (#350)

* check object's id (#351)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* SON Weighted Multi Signature Signing (#349)

* Bring in the bitcoin utils code into plugin
* Add tx creation, signing and tests
* tx deserialization fix
* add 10-of-14 multisig address test
* Add signing and verification tests and sign_transaction_standalone
* Add send_transaction_standalone function
* Debug logs and additional tests
* Fix for son deletion in the middle
* Extend script_builder
* Witness script for weighted wallet
* btc_weighted_multisig_address implementation
* Fix for bad-txns-nonstandard-inputs
* Weighted multisignature address test
* Create test tx with weighted multisig wallet
* Fix the issues with tx signing
* End to End test weighted multi sig
* 1 or m-of-n deposit address support
* Move network_type enum to the base class
* btc_one_or_weighted_multisig_address implementation
* Simplify redeem script
* Fix error in redeem_script
* btc_one_or_weighted_multisig_address tests
* Refactor sidechain address mapping
* CLANG code format
* CLANG code format sidechain tests
* Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring
* Move util functions to Utils file
* Add proper checks for withdraw fee
* Deposit address creation, import deposit/withdraw addresses, some code cleanup

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>

* [SON-349] Delay BTC asset issue/reserve until tx confirmed on sidchain (#348)

* Separate transaction settling from deposit/withdrawal processing
* Handle peerplays deposits with transaction settling
* Remove logs
* All dev features enabled/disabled with single flag
* Deposit/withdraw process and sidechain transaction creation in single proposal

* Hotfix - remove importing sidechain addresses

* Hotfix - remove redundant deposit sidechain address recreation

* private-key option update

* Use decoderawtraction json for proposal approvals (#352)

* Use decoderawtraction json for proposal approvals
* Use default null string to get first vout

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Prevent incorrect signatures to be added to transaction (#354)

* Prevent incorrect signatures to be added to transaction
* Check signers list before signing

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Hotfix - use getrawtransaction for approvals and settling (#355)

* Revert "Use decoderawtraction json for proposal approvals (#352)"
This reverts commit d3385b28cb.
* User getrawtransaction for proposal approvals and settling
* Code cleanup

* [SON-135] Add timelock to user deposit address (#356)

* timelocks
* timelocked deposit address
* test for deposit timelock

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - fix threshold_weight calculation in redeem scripts

* fix broken peerplays_sidechain tests (#357)

Co-authored-by: gladcow <s.gladkov@pbsa.info>

* Hotfix - Save deposit address redeem and witness script into sidechain address object

* [SON-359] - Fix Errors processing to-be-refunded deposits (#358)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* [SON-363] - Remove son deletion (#359)

* [SON-363] - Remove son deletion

* Fix the tests

* [SON-314] - Weighted Rewards and equal weighted son-account (#360)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Bitcoin network type deduction (#361)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* chore: changed building to debug mode

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* chore: updated Dockerfile with dnsutils

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>

* Son deposit address enhancements (#362)

* Deposit address enhancements

* fix tests

Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>

* Ws updates

* Fix for custom operation authority checking (BTS Issue #210) (#382)

* Resolve #210: [HF] Check authorities on custom_operation

The required_auths field on custom_operation was being ignored during authority checking. This commit causes it to be checked correctly, and adds a unit test verifying as much.

* Ref #381: Fixes

Build and logic fixes for Pull Request #381

* Ref #381: Fix bad merge

During merge conflict resolution, I accidentally broke custom
authorities. This fixes it.

* compilation fix

Co-authored-by: Nathan Hourt <nathan@followmyvote.com>

* Cleanup changes for pretier diff

* Cleanup changes for prettier diff

* NFT Permissions (#380)

* Account Roles Permission 1 - Working code with tests

* Account Roles Permission 2 - Add marketplace offer/bid tests

* Account Roles Permission 3 - Add Op check

* Account Roles Permission 4 - Add chain params and limits

* Cleanup changes for prettier diff

* Fix failing saving_keys_wallet_test

* Fix failing saving_keys_wallet_test

* Align submodule versions

* Add missing break

* Increase tests log_level, some cleanup

* Decrease log level for tests

* Fix block_tests/maintenance_interval test

* Fix son_operation_tests/son_pay_test test

* Remove base_uri length checks

* Fix HF info

Co-authored-by: S <obucinac@gmail.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: blockc p <pravin.blockc@gmail.com>
Co-authored-by: Nathan Hourt <nathan@followmyvote.com>
2020-10-06 18:19:42 +05:30
serkixenos
abe17869f3
Merge beatrice only changes into develop
Merge beatrice only changes into develop
2020-10-05 14:54:05 +02:00
Serki
dcc84aee5b Merge branch 'develop' into merge/develop2beatrice 2020-10-01 15:41:35 +02:00
Serki
7121da7eb5 Merge branch 'develop' of https://github.com/peerplays-network/peerplays into develop 2020-10-01 15:37:23 +02:00
serkixenos
ed44efd19c
Sidechain Operating Node 2020-10-01 15:36:59 +02:00
Serki
cbb8cbe4c2 Fix HF info 2020-10-01 15:28:12 +02:00
Serki
bba9c3ac1d Remove base_uri length checks 2020-10-01 14:21:08 +02:00
Serki
62bea3f9f5 Merge branch 'beatrice' into develop 2020-09-30 18:04:25 +02:00
Serki
64b4b8f622 Fix son_operation_tests/son_pay_test test 2020-09-29 14:09:46 +02:00
Serki
12e07fa7ad Merge branch 'feature/SONs-base' of https://github.com/peerplays-network/peerplays into feature/SONs-base 2020-09-29 13:40:58 +02:00
Serki
e1737053b5 Fix block_tests/maintenance_interval test 2020-09-29 13:40:13 +02:00
serkixenos
808ecf6575 Decrease log level for tests 2020-09-28 13:46:48 +00:00
Serki
3e6c812883 Increase tests log_level, some cleanup 2020-09-25 23:38:06 +02:00
Serki
2582b829ec Add missing break 2020-09-25 21:05:56 +02:00
Serki
c2a3467c02 Align submodule versions 2020-09-25 19:51:05 +02:00
Serki
b43d52312b Fix failing saving_keys_wallet_test 2020-09-24 16:57:19 +02:00
Serki
0359193813 Fix failing saving_keys_wallet_test 2020-09-24 16:56:30 +02:00
Serki
e79995ba69 Cleanup changes for prettier diff 2020-09-23 16:26:51 +02:00
Serki
ec74e7fc21 Merge branch 'develop' into feature/SONs-base 2020-09-23 15:43:28 +02:00
sierra19XX
213a188c46
NFT Permissions (#380)
* Account Roles Permission 1 - Working code with tests

* Account Roles Permission 2 - Add marketplace offer/bid tests

* Account Roles Permission 3 - Add Op check

* Account Roles Permission 4 - Add chain params and limits
2020-09-23 00:26:24 +05:30
Serki
318b992cb2 Cleanup changes for prettier diff 2020-09-22 19:23:16 +02:00
Serki
2264aa0052 Cleanup changes for pretier diff 2020-09-22 18:56:19 +02:00
Serki
c6c26a7d9f Merge branch 'develop' into feature/SONs-base 2020-09-22 18:23:36 +02:00
sierra19XX
c46e899cf4
Fix for custom operation authority checking (BTS Issue #210) (#382)
* Resolve #210: [HF] Check authorities on custom_operation

The required_auths field on custom_operation was being ignored during authority checking. This commit causes it to be checked correctly, and adds a unit test verifying as much.

* Ref #381: Fixes

Build and logic fixes for Pull Request #381

* Ref #381: Fix bad merge

During merge conflict resolution, I accidentally broke custom
authorities. This fixes it.

* compilation fix

Co-authored-by: Nathan Hourt <nathan@followmyvote.com>
2020-09-08 18:05:29 +05:30
Roshan Syed
5aede1f246 ci: added additional security scanning for gitlab 2020-08-31 17:58:02 +00:00
Bobinson K B
adb22299d9 Merge branch 'ws-updates' into 'develop'
Ws updates

See merge request PBSA/peerplays!1
2020-08-29 16:27:01 +00:00
blockc p
ae3edc6e27 Ws updates 2020-08-29 16:27:01 +00:00
sierra19XX
bfdecbb49b
Son deposit address enhancements (#362)
* Deposit address enhancements

* fix tests

Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>
2020-08-14 19:32:33 +05:30
sierra19XX
6514f8fadd
NFT Marketplace HRP Beatrice Merge (#371)
* private-key option update

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* ci: update .gitlab-ci.yml

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* GPOS2 HF - Handle rolling period on missing blocks (#369)

* Mainnet chain halt 5050 Issue (#370)

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

* Peerplays Marketplace + NFT (#367)

* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>

* Beatrice NFT HF

Co-authored-by: pbattu123 <43043205+pbattu123@users.noreply.github.com>
Co-authored-by: pbattu123 <p.battu@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
2020-08-11 01:42:59 +10:00
sierra19XX
ecd14b8329
Peerplays Marketplace + NFT (#367)
* ppy marketplace 1 - add evaluators and objects

* NFT object and basic operations

* ci: update .gitlab-ci.yml

* ci: update .gitlab-ci.yml

* NFT evaluators and basic tests, no evaluator checks

* Evaluator checks in place

* ppy marketplace 2 - batch sale, offer_object escrow

* Database API

* Wallet API

* NFT metadata implemented

* Fix NFT tests

* Database API for NFT metadata and enumerables

* ppy marketplace 4 - Add tests NFT+Marketplace

* ppy marketplace 5 - Add revenue split

* ppy marketplace 6 - Remove unnecessary files

* ppy marketplace 7 - Add db, wallet changes and some NFT fixes

* ppy marketplace 8 - Add pagination for list APIs

* New DB API, list all NFTs, list NFTs by owner

* Marketplace + NFT + RBAC (#368)

* rbac1 - evaluators and op validators added
* rbac2 - op_type hf checks
* rbac3 - tx auth verify changes
* Update .gitlab-ci.yml
* rbac4 - basic op tests
* rbac5 - clear expired and deleted permission linked auths
* rbac6 - more tests
* rbac7 - more tests
* rbac8 - more tests
* rbac9 - wallet and db api changes
* rbac10 - db api changes for required signature fetch
* rbac11 - add db_api tests
* rbac12 - add missing code for key auths

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: sierra19XX <15652887+sierra19XX@users.noreply.github.com>

* Fix nft_get_token_uri returning empty string

* Fix nft_mint_evaluator to save token_uri

* Fix cli_wallet to properly pass metadata id for nft_create

* ppy marketplace 9 - FC_REFLECT offer create op

* Add stricter checks to NFTs

* Unlisting offers, add result in offer history object

* Reverting genesis.json wrong commit

* Add non-transferable non-sellable properties to NFTs

* Review comments - change variable names, use scoped enums

* nft_metadata_update changes

* NFT HF checks and op fee addition changes

* NFT make revenue_split integer from double

* revenue_split condition check allow zero or above

Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Roshan Syed <roshan.syed.rs@gmail.com>
Co-authored-by: Satyanarayana Koneru <skoneru@SK-GT.local>
Co-authored-by: obucina <11353193+obucina@users.noreply.github.com>
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-08-10 23:18:47 +10:00
sierra19XX
c36d4c9687
Mainnet chain halt 5050 Issue (#370) 2020-07-30 21:28:27 +10:00
sierra19XX
a5aa7c200d
GPOS2 HF - Handle rolling period on missing blocks (#369) 2020-07-30 21:28:08 +10:00
Roshan Syed
75b87b3c17 chore: updated Dockerfile with dnsutils 2020-07-16 19:16:40 +00:00
Roshan Syed
490a332db1 ci: update .gitlab-ci.yml 2020-07-09 13:33:14 +00:00
Roshan Syed
3bc945aeea ci: update .gitlab-ci.yml 2020-06-17 13:31:44 +00:00
Roshan Syed
23d2ce000e ci: update .gitlab-ci.yml 2020-06-16 16:53:31 +00:00
Roshan Syed
cf8f1d94a8 chore: changed building to debug mode 2020-06-12 16:23:08 +00:00
sierra19XX
e69d35dc82
Chain crash/corruption due to bad check (#363)
Co-authored-by: Koneru Satyanarayana <15652887+satyakoneru@users.noreply.github.com>
2020-05-08 13:58:23 -03:00
sierra19XX
129d5ebf86
Bitcoin network type deduction (#361)
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-05-05 22:21:07 +10:00
sierra19XX
4896e48b3e
[SON-314] - Weighted Rewards and equal weighted son-account (#360)
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-05-05 22:20:48 +10:00
sierra19XX
6797cdc3d3
[SON-363] - Remove son deletion (#359)
* [SON-363] - Remove son deletion

* Fix the tests
2020-05-04 15:37:41 +10:00
sierra19XX
be538614a9
[SON-359] - Fix Errors processing to-be-refunded deposits (#358)
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-04-23 11:18:30 +02:00
Srdjan Obucina
984000f63e Hotfix - Save deposit address redeem and witness script into sidechain address object 2020-04-23 02:56:24 +02:00
gladcow
072906b3fd
fix broken peerplays_sidechain tests (#357)
Co-authored-by: gladcow <s.gladkov@pbsa.info>
2020-04-22 22:48:33 +02:00
Srdjan Obucina
8d7e574aa5 Hotfix - fix threshold_weight calculation in redeem scripts 2020-04-22 18:01:53 +02:00
gladcow
9db4615698
[SON-135] Add timelock to user deposit address (#356)
* timelocks
* timelocked deposit address
* test for deposit timelock

Co-authored-by: gladcow <s.gladkov@pbsa.info>
2020-04-21 14:54:46 +02:00
obucina
746b71f2fd
Hotfix - use getrawtransaction for approvals and settling (#355)
* Revert "Use decoderawtraction json for proposal approvals (#352)"
This reverts commit d3385b28cb.
* User getrawtransaction for proposal approvals and settling
* Code cleanup
2020-04-21 14:53:31 +02:00
sierra19XX
4db9e3a941
Prevent incorrect signatures to be added to transaction (#354)
* Prevent incorrect signatures to be added to transaction
* Check signers list before signing

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-04-21 14:41:24 +02:00
pbattu123
d8ca4d4625
Merge pull request #353 from peerplays-network/issue_a_gitlab
Unable set private-key option through cli comand
2020-04-20 14:33:58 -03:00
sierra19XX
d3385b28cb
Use decoderawtraction json for proposal approvals (#352)
* Use decoderawtraction json for proposal approvals
* Use default null string to get first vout

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-04-20 16:09:56 +02:00
pbattu123
a4c922cee9 private-key option update 2020-04-20 09:15:54 -03:00
Srdjan Obucina
5030c113bc Hotfix - remove redundant deposit sidechain address recreation 2020-04-20 04:14:06 +02:00
Srdjan Obucina
e7099fbc5c Hotfix - remove importing sidechain addresses 2020-04-20 02:46:47 +02:00
obucina
453772d59f
[SON-349] Delay BTC asset issue/reserve until tx confirmed on sidchain (#348)
* Separate transaction settling from deposit/withdrawal processing
* Handle peerplays deposits with transaction settling
* Remove logs
* All dev features enabled/disabled with single flag
* Deposit/withdraw process and sidechain transaction creation in single proposal
2020-04-19 06:19:59 +02:00
sierra19XX
b436b790fb
SON Weighted Multi Signature Signing (#349)
* Bring in the bitcoin utils code into plugin
* Add tx creation, signing and tests
* tx deserialization fix
* add 10-of-14 multisig address test
* Add signing and verification tests and sign_transaction_standalone
* Add send_transaction_standalone function
* Debug logs and additional tests
* Fix for son deletion in the middle
* Extend script_builder
* Witness script for weighted wallet
* btc_weighted_multisig_address implementation
* Fix for bad-txns-nonstandard-inputs
* Weighted multisignature address test
* Create test tx with weighted multisig wallet
* Fix the issues with tx signing
* End to End test weighted multi sig
* 1 or m-of-n deposit address support
* Move network_type enum to the base class
* btc_one_or_weighted_multisig_address implementation
* Simplify redeem script
* Fix error in redeem_script
* btc_one_or_weighted_multisig_address tests
* Refactor sidechain address mapping
* CLANG code format
* CLANG code format sidechain tests
* Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring
* Move util functions to Utils file
* Add proper checks for withdraw fee
* Deposit address creation, import deposit/withdraw addresses, some code cleanup

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
2020-04-18 22:18:04 +02:00
gladcow
fbb4bbd757
check object's id (#351)
Co-authored-by: gladcow <s.gladkov@pbsa.info>
2020-04-17 21:38:47 +02:00
obucina
5305757136
[SON-354] Fix son_info compare function (#350) 2020-04-17 21:02:30 +02:00
pbattu123
be14592ea8
Merge Plugins and graphene update changes from beatrice TESTNET to master (#317)
* increase delay for node connection

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Improved resilience of block database against corruption

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Updated GitLab CI

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed test failures and compilation issue

* minor performance improvement

* Added comment

* Fix compilation in debug mode

* Fixed duplicate ops returned from get_account_history

* Fixed account_history_pagination test

* Removed unrelated comment

* Update to fixed version of fc

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* changes to withdraw_vesting feature(for both cdd and GPOS)

* Comments update

* update to GPOS hardfork ref

* Remove leftover comment from merge

* fix for get_vesting_balance API call

* braces update

* Allow sufficient space for new undo_session

* Throw for deep nesting

* node.cpp: Check the attacker/buggy client before updating items ids

The peer is an attacker or buggy, which means the item_hashes_received is
not correct.

Move the check before updating items ids to save some time in this case.

* Create .gitlab-ci.yml

* Added cli_test to CI

* fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile

* use random port numbers in app_test (#154)

* Changes to compiple with GCC 7(Ubuntu 18.04)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* changes to have separate methods and single withdrawl fee for multiple vest objects

* 163-fix, Return only non-zero vesting balances

* Support/gitlab develop (#168)

* Added code_quality to CI

* Update .gitlab-ci.yml

* Point to PBSA/peerplays-fc commit f13d063 (#167)

* [GRPH-3] Additional cli tests (#155)

* Additional cli tests

* Compatible with latest fc changes

* Fixed Spacing issues

* [GRPH-106] Added voting tests (#136)

* Added more voting tests

* Added additional option

* Adjust p2p log level (#180)

* Added submodule sync to peerplays compile process

* merge gpos to develop (#186)

* issue - 154: Don't allow to vote when vesting balance is 0

* changes to withdraw_vesting feature(for both cdd and GPOS)

* Comments update

* update to GPOS hardfork ref

* fix for get_vesting_balance API call

* braces update

* Create .gitlab-ci.yml

* fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile

* Changes to compiple with GCC 7(Ubuntu 18.04)

* changes to have separate methods and single withdrawl fee for multiple vest objects

* 163-fix, Return only non-zero vesting balances

* Revert "Revert "GPOS protocol""

This reverts commit 67616417b7.

* add new line needed to gpos hardfork file

* comment temporally cli_vote_for_2_witnesses until refactor or delete

* fix gpos tests

* fix gitlab-ci conflict

* Fixed few error messages

* error message corrections at other places

* Updated FC repository to peerplays-network/peerplays-fc (#189)

Point to fc commit hash 6096e94 [latest-fc branch]

* Project name update in Doxyfile (#146)

* changes to allow user to vote in each sub-period

* Fixed GPOS vesting factor issue when proxy is set

* Added unit test for proxy voting

* Review changes

* changes to update last voting time

* resolve merge conflict

* unit test changes and also separated GPOS test suite

* delete unused variables

* removed witness check

* eliminate time gap between two consecutive vesting periods

* deleted GPOS specific test suite and updated gpos tests

* updated GPOS hf

* Fixed dividend distribution issue and added test case

* fix flag

* clean newlines gpos_tests

* adapt gpos_tests to changed flag

* Fix to roll in GPOS rules, carry votes from 6th sub-period

* check was already modified

* comments updated

* updated comments to the benefit of reviewer

* Added token symbol name in error messages

* Added token symbol name in error messages (#204)

* case 1: Fixed last voting time issue

* get_account bug fixed

* Fixed flag issue

* Fixed spelling issue

* remove non needed gcc5 changes to dockerfile

* GRPH134- High CPU Issue, websocket changes (#213)

* update submodule branch to refer to the latest commit on latest-fc branch (#214)

* Improve account maintenance performance (#130)

* Improve account maintenance performance

* merge fixes

* Fixed merge issue

* Fixed indentations and extra ';'

* Update CI for syncing gitmodules (#216)

* Added logging for the old update_expired_feeds bug

The old bug is https://github.com/cryptonomex/graphene/issues/615 .

Due to the bug, `update_median_feeds()` and `check_call_orders()`
will be called when a feed is not actually expired, normally this
should not affect consensus since calling them should not change
any data in the state.

However, the logging indicates that `check_call_orders()` did
change some data under certain circumstances, specifically, when
multiple limit order matching issue (#453) occurred at same block.
* https://github.com/bitshares/bitshares-core/issues/453

* Minor performance improvement for price::is_null()

* Use static refs in db_getter for immutable objects

* Minor performance improvement for db_maint

* Minor code updates for asset_evaluator.cpp

* changed an `assert()` to `FC_ASSERT()`
* replaced one `db.get(asset_id_type())` with `db.get_core_asset()`
* capture only required variables for lambda

* Improve update_expired_feeds performance #1093

* Change static refs to member pointers of db class

* Added getter for witness schedule object

* Added getter for core dynamic data object

* Use getters

* Removed unused variable

* Add comments for update_expired_feeds in db_block

* Minor refactory asset_create_evaluator::do_apply()

* Added FC_ASSERT for dynamic data id of core asset

* Added header inclusions in db_management.cpp

* fix global objects usage during replay

* Logging config parsing issue

* added new files

* compilation fix

* Simplified code in database::pay_workers()

* issue with withdrawl

* Added unit test for empty account history

* set extensions default values

* Update GPOS hardfork date and don't allow GPOS features before hardfork time

* refer to latest commit of latest-fc branch (#224)

* account name or id support in all database api

* asset id or name support in all asset APIs

* Fixed compilation issues

* Fixed alignment issues

* Externalized some API templates

* Externalize serialization of blocks, tx, ops

* Externalized db objects

* Externalized genesis serialization

* Externalized serialization in protocol library

* Undo superfluous change

* remove default value for extension parameter

* fix compilation issues

* GRPH-46-Quit_command_cliwallet

* removed multiple function definition

* Fixed chainparameter update proposal issue

* Move GPOS withdraw logic to have single transaction(also single fee) and update API

* Added log for authorization failure of proposal operations

* Votes consideration on GPOS activation

* bump fc version

* fix gpos tests

* Bump fc version

* Updated gpos/voting_tests

* Fixed withdraw vesting bug

* Added unit test

* Update hardfork date for TESTNET, sync fc module and update logs

* avoid wlog as it filling up space

* Beatrice hot fix(sync issue fix)

* gpos tests fix

* Set hardfork date to Jan5th on TESTNET

* Merge Elasticplugin, snapshot plugin and graphene updates to beatrice (#304)

* check witness signature before adding block to fork db

* Replace verify_no_send_in_progress with no_parallel_execution_guard

* fixed cli_wallet log issue

* Port plugin sanitization code

* avoid directly overwriting wallet file

* Implemented "plugins" config variable

* allow plugin to have descriptions

* Merge pull request #444 from oxarbitrage/elasticsearch

Elasticsearch plugin

* Merge pull request #500 from oxarbitrage/elasticsearch-extras

es_objects plugin

* Merge pull request #873 from pmconrad/585_fix_history_ids

Fix history ids

* Merge pull request #1201 from oxarbitrage/elasticsearch_tests2

Elasticsearch refactor

* Merge pull request #1271 from oxarbitrage/es_objects

refine es_objects plugin

* Merge pull request #1429 from oxarbitrage/es_objects_templates

Add an adaptor to es_objects and template function to reduce code

* Merge pull request #1458 from oxarbitrage/issue1455

add option elasticsearch-start-es-after-block to es plugin

* Merge pull request #1541 from oxarbitrage/es_objects_start_after_block

add es-objects-start-es-after-block option

* explicitly cleanup external library facilities

* Merge pull request #1717 from oxarbitrage/issue1652

add genesis data to es_objects

* Merge pull request #1073 from xiangxn/merge-impacted

merge impacted into db_notify

* Merge pull request #1725 from oxarbitrage/issue1682

elasticsearch history api #1682

* change ES index prefixes to Peerplays-specific

* sync develop with beatrice

* fix the data writing to ES during sync issues

* fix CLI tests

* brought updates from mainnet branch (#285)

* Fix unit test failures (#289)

* fixed unit test failures from the recent merges

* fixed unit test failures from the recent merges

* enable snapshot plugin (#288)

* sync fc branch(build optimization changes)

* update to es plugin

* fix verify witness signature method (#295)

* enable mandatory plugins to have smooth transition for next release

* updated tests to keep in-line with plugin changes

Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Peter Conrad <conrad@quisquis.de>
Co-authored-by: Alfredo <oxarbitrage@gmail.com>
Co-authored-by: Abit <abitmore@users.noreply.github.com>
Co-authored-by: crypto-ape <43807588+crypto-ape@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>

* sync latest fc commit on beatrice

* sweeps winner_ticket_id changes

Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Miha Čančula <miha@noughmad.eu>
Co-authored-by: Ronak Patel <r.patel@pbsa.info>
Co-authored-by: Srdjan Obucina <obucinac@gmail.com>
Co-authored-by: Peter Conrad <conrad@quisquis.de>
Co-authored-by: Peter Conrad <cyrano@quisquis.de>
Co-authored-by: Abit <abitmore@users.noreply.github.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: cifer <maintianyu@gmail.com>
Co-authored-by: John Jones <jmjatlanta@gmail.com>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Wei Yang <richard.weiyang@gmail.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
Co-authored-by: crypto-ape <43807588+crypto-ape@users.noreply.github.com>
2020-04-15 20:34:15 +05:30
obucina
dd8abfe1cd
[SON-353] Refactor PW processing, PW transfer fixed (#347)
* Add proposal checks for deposit and withdrawal
* Refactor proposal approvement
* Fix transaction verification
* Remove logs
2020-04-15 00:33:56 +02:00
pbattu123
6fd2e5efb0
Merge pull request #345 from peerplays-network/feature/beatrice_winner_id
5050 winner id changes
2020-04-10 12:08:54 -03:00
pbattu123
02a89dd770 update HF to 15th April 2020-04-10 12:01:28 -03:00
pbattu123
fb90c83b29 Merge commit 'refs/pull/340/head' of https://github.com/peerplays-network/peerplays into feature/beatrice_winner_id 2020-04-10 11:28:25 -03:00
pbattu123
b857603f10
Merge pull request #340 from peerplays-network/feature/nh5050_winner_id
Feature/nh5050 winner_ticket_id changes
2020-04-10 11:10:51 -03:00
sierra19XX
6a8cd25878
[SON-337] - Prevent update_son_votes without GPOS vesting (#344)
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-04-10 14:56:20 +02:00
pbattu123
03ebcc6f3b update variable type to uint64 2020-04-10 09:39:09 -03:00
pbattu123
f701f03401 update HF date 16th April 2020 2020-04-10 08:53:25 -03:00
pbattu123
e3cf4ab9e2 changes to fetch operations based on lottery asset 2020-04-09 22:05:18 -03:00
obucina
7988236b2a
[SON-348] Transaction hash not saved in object after Bitcoin transaction is sent (#343)
- Fixed
- Unused parameters removed
2020-04-09 23:24:48 +02:00
pbattu123
dd88b8f1ff update HF check 2020-04-08 09:05:39 -03:00
pbattu123
cb7429e818 code improvement with edge case handling 2020-04-07 01:31:17 -03:00
pbattu123
e445e1a11c update HF-check 2020-04-06 14:47:38 -03:00
pbattu123
9ffce8f33c update HF check 2020-04-06 14:45:50 -03:00
pbattu123
29f41ec7da nh5050:winner ticket id changes 2020-04-06 12:30:55 -03:00
pbattu123
dc9cbe679d
Merge pull request #305 from peerplays-network/sync_fc_beatrice
Sync latest fc commit on beatrice
2020-03-09 14:42:22 -03:00
pbattu123
2f034420e0 sync latest fc commit on beatrice 2020-03-09 14:40:31 -03:00
pbattu123
08318d06a2
Merge Elasticplugin, snapshot plugin and graphene updates to beatrice (#304)
* check witness signature before adding block to fork db

* Replace verify_no_send_in_progress with no_parallel_execution_guard

* fixed cli_wallet log issue

* Port plugin sanitization code

* avoid directly overwriting wallet file

* Implemented "plugins" config variable

* allow plugin to have descriptions

* Merge pull request #444 from oxarbitrage/elasticsearch

Elasticsearch plugin

* Merge pull request #500 from oxarbitrage/elasticsearch-extras

es_objects plugin

* Merge pull request #873 from pmconrad/585_fix_history_ids

Fix history ids

* Merge pull request #1201 from oxarbitrage/elasticsearch_tests2

Elasticsearch refactor

* Merge pull request #1271 from oxarbitrage/es_objects

refine es_objects plugin

* Merge pull request #1429 from oxarbitrage/es_objects_templates

Add an adaptor to es_objects and template function to reduce code

* Merge pull request #1458 from oxarbitrage/issue1455

add option elasticsearch-start-es-after-block to es plugin

* Merge pull request #1541 from oxarbitrage/es_objects_start_after_block

add es-objects-start-es-after-block option

* explicitly cleanup external library facilities

* Merge pull request #1717 from oxarbitrage/issue1652

add genesis data to es_objects

* Merge pull request #1073 from xiangxn/merge-impacted

merge impacted into db_notify

* Merge pull request #1725 from oxarbitrage/issue1682

elasticsearch history api #1682

* change ES index prefixes to Peerplays-specific

* sync develop with beatrice

* fix the data writing to ES during sync issues

* fix CLI tests

* brought updates from mainnet branch (#285)

* Fix unit test failures (#289)

* fixed unit test failures from the recent merges

* fixed unit test failures from the recent merges

* enable snapshot plugin (#288)

* sync fc branch(build optimization changes)

* update to es plugin

* fix verify witness signature method (#295)

* enable mandatory plugins to have smooth transition for next release

* updated tests to keep in-line with plugin changes

Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: Peter Conrad <conrad@quisquis.de>
Co-authored-by: Alfredo <oxarbitrage@gmail.com>
Co-authored-by: Abit <abitmore@users.noreply.github.com>
Co-authored-by: crypto-ape <43807588+crypto-ape@users.noreply.github.com>
Co-authored-by: gladcow <s.gladkov@pbsa.info>
2020-03-09 18:28:13 +05:30
pbattu123
ac109234d2
Merge pull request #299 from peerplays-network/plugins_enable_fix1
Enable mandatory plugins to have smooth transition for next release
2020-03-06 16:04:04 -04:00
pbattu123
cd8d7253cb updated tests to keep in-line with plugin changes 2020-03-06 15:15:51 -04:00
pbattu123
32d9175061 enable mandatory plugins to have smooth transition for next release 2020-02-27 14:27:49 -04:00
pbattu123
24e7610bce
Merge pull request #296 from peerplays-network/es_update1
ES update1
2020-02-26 13:57:17 -04:00
pbattu123
b7951e916b
fix verify witness signature method (#295) 2020-02-26 22:25:36 +05:30
pbattu123
7f0bc332be update to es plugin 2020-02-26 12:41:22 -04:00
pbattu123
371c4c521d
Merge pull request #293 from peerplays-network/sync_fc_dev
Sync fc with latest updates
2020-02-24 13:52:07 -04:00
pbattu123
71e73146eb sync fc branch(build optimization changes) 2020-02-24 11:13:19 -04:00
pbattu123
926d4ae381
enable snapshot plugin (#288) 2020-02-24 10:24:01 -04:00
pbattu123
b68e6ce854
Fix unit test failures (#289)
* fixed unit test failures from the recent merges

* fixed unit test failures from the recent merges
2020-02-20 23:38:38 +05:30
pbattu123
5188a686d9
Merge pull request #229 from peerplays-network/feature/GRPH-155
[GRPH-155] fixed cli_wallet log issue
2020-02-13 12:59:39 -04:00
pbattu123
d5df44935a
Merge pull request #230 from peerplays-network/feature/GRPH-163
[GRPH-163] Port plugin sanitization code
2020-02-13 10:43:59 -04:00
pbattu123
c93c3d3b18
Merge pull request #226 from peerplays-network/feature/GRPH-160
[GRPH-160] check witness signature before adding block to fork db
2020-02-13 09:00:22 -04:00
pbattu123
524b3088df
Merge pull request #228 from peerplays-network/feature/GRPH-162
Replace verify_no_send_in_progress with no_parallel_execution_guard
2020-02-13 08:59:20 -04:00
pbattu123
0e4434a0dc
Merge branch 'develop' into feature/GRPH-155 2020-02-13 08:57:28 -04:00
pbattu123
0579058792
Merge branch 'develop' into feature/GRPH-163 2020-02-13 08:53:44 -04:00
pbattu123
bf25029e4a
Merge pull request #242 from peerplays-network/feature/GRPH-169
[GRPH-169] Avoid directly overwriting wallet file on exit
2020-02-13 08:47:25 -04:00
pbattu123
046ee5b75c
Merge pull request #257 from peerplays-network/feature/GRPH-205
Backport ElasticSearch plugins from BitShares
2020-02-13 08:46:45 -04:00
pbattu123
2dbad503c0
Merge pull request #187 from peerplays-network/support/docker
Added submodule sync to peerplays compile process
2020-02-12 16:08:39 -04:00
pbattu123
11919cdbd9
brought updates from mainnet branch (#285) 2020-02-12 23:38:23 +05:30
pbattu123
c0b57fce33
resync/replay issues addressed (#283)
* resync/replay issues addressed

* minor changes done to withdraw GPOS vesting balance by WITNESS account
2020-02-10 19:21:50 +05:30
pbattu123
0b280882af
Merge beatrice(GPOS changes) with master (#270)
* Created unit test for #325

* remove needless find()

* issue - 154: Don't allow to vote when vesting balance is 0

* Increase block creation timeout to 2500ms

* increase delay for node connection

* remove cache from cli get_account

* add cli tests framework

* Adjust newly merged code to new API

* Merged changes from Bitshares PR 1036

* GRPH-76 - Short-cut long sequences of missed blocks

Fixes database::update_global_dynamic_data to speed up counting missed blocks.
(This also fixes a minor issue with counting - the previous algorithm would skip missed blocks for the witness who signed the first block after the gap.)

* Improved resilience of block database against corruption

* Moved reindex logic into database / chain_database, make use of additional blocks in block_database

Fixed tests wrt db.open

* Enable undo + fork database for final blocks in a replay

Dont remove blocks from block db when popping blocks, handle edge case in replay wrt fork_db, adapted unit tests

* Log starting block number of replay

* Prevent unsigned integer underflow

* Fixed lock detection

* Dont leave _data_dir empty if db is locked

* Writing the object_database is now almost atomic

* Improved consistency check for block_log

* Cut back block_log index file if inconsistent

* Fixed undo_database

* Added test case for broken merge on empty undo_db

* exclude second undo_db.enable() call in some cases

* Add missing change

* change bitshares to core in message

* Merge pull request #938 from bitshares/fix-block-storing

Store correct block ID when switching forks

* Fixed integer overflow issue

* Fix for for history ID mismatch ( Bitshares PR #875 )

* Update the FC submodule with the changes for GRPH-4

* Merged Bitshares PR #1462 and compilation fixes

* Support/gitlab (#123)

* Updated gitlab process

* Fix undefined references in cli test

* Updated GitLab CI

* Fix #436 object_database created outside of witness data directory

* supplement more comments on database::_opened variable

* prevent segfault when destructing application obj

* Fixed test failures and compilation issue

* minor performance improvement

* Added comment

* Fix compilation in debug mode

* Fixed duplicate ops returned from get_account_history

* Fixed account_history_pagination test

* Removed unrelated comment

* Update to fixed version of fc

* Skip auth check when pushing self-generated blocks

* Extract public keys before pushing a transaction

* Dereference chain_database shared_ptr

* Updated transaction::signees to mutable

and
* updated get_signature_keys() to return a const reference,
* get_signature_keys() will update signees on first call,
* modified test cases and wallet.cpp accordingly,
* no longer construct a new signed_transaction object before pushing

* Added get_asset_count API

* No longer extract public keys before pushing a trx

and removed unused new added constructor and _get_signature_keys() function from signed_transaction struct

* changes to withdraw_vesting feature(for both cdd and GPOS)

* Comments update

* update to GPOS hardfork ref

* Remove leftover comment from merge

* fix for get_vesting_balance API call

* braces update

* Allow sufficient space for new undo_session

* Throw for deep nesting

* node.cpp: Check the attacker/buggy client before updating items ids

The peer is an attacker or buggy, which means the item_hashes_received is
not correct.

Move the check before updating items ids to save some time in this case.

* Create .gitlab-ci.yml

* Added cli_test to CI

* fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile

* use random port numbers in app_test (#154)

* Changes to compiple with GCC 7(Ubuntu 18.04)

* proposal fail_reason bug fixed (#157)

* Added Sonarcloud code_quality to CI (#159)

* Added sonarcloud analysis (#158)

* changes to have separate methods and single withdrawl fee for multiple vest objects

* 163-fix, Return only non-zero vesting balances

* Support/gitlab develop (#168)

* Added code_quality to CI

* Update .gitlab-ci.yml

* Point to PBSA/peerplays-fc commit f13d063 (#167)

* [GRPH-3] Additional cli tests (#155)

* Additional cli tests

* Compatible with latest fc changes

* Fixed Spacing issues

* [GRPH-106] Added voting tests (#136)

* Added more voting tests

* Added additional option

* Adjust p2p log level (#180)

* merge gpos to develop (#186)

* issue - 154: Don't allow to vote when vesting balance is 0

* changes to withdraw_vesting feature(for both cdd and GPOS)

* Comments update

* update to GPOS hardfork ref

* fix for get_vesting_balance API call

* braces update

* Create .gitlab-ci.yml

* fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile

* Changes to compiple with GCC 7(Ubuntu 18.04)

* changes to have separate methods and single withdrawl fee for multiple vest objects

* 163-fix, Return only non-zero vesting balances

* Revert "Revert "GPOS protocol""

This reverts commit 67616417b7.

* add new line needed to gpos hardfork file

* comment temporally cli_vote_for_2_witnesses until refactor or delete

* fix gpos tests

* fix gitlab-ci conflict

* Fixed few error messages

* error message corrections at other places

* Updated FC repository to peerplays-network/peerplays-fc (#189)

Point to fc commit hash 6096e94 [latest-fc branch]

* Project name update in Doxyfile (#146)

* changes to allow user to vote in each sub-period

* Fixed GPOS vesting factor issue when proxy is set

* Added unit test for proxy voting

* Review changes

* changes to update last voting time

* resolve merge conflict

* unit test changes and also separated GPOS test suite

* delete unused variables

* removed witness check

* eliminate time gap between two consecutive vesting periods

* deleted GPOS specific test suite and updated gpos tests

* updated GPOS hf

* Fixed dividend distribution issue and added test case

* fix flag

* clean newlines gpos_tests

* adapt gpos_tests to changed flag

* Fix to roll in GPOS rules, carry votes from 6th sub-period

* check was already modified

* comments updated

* updated comments to the benefit of reviewer

* Added token symbol name in error messages

* Added token symbol name in error messages (#204)

* case 1: Fixed last voting time issue

* get_account bug fixed

* Fixed flag issue

* Fixed spelling issue

* remove non needed gcc5 changes to dockerfile

* GRPH134- High CPU Issue, websocket changes (#213)

* update submodule branch to refer to the latest commit on latest-fc branch (#214)

* Improve account maintenance performance (#130)

* Improve account maintenance performance

* merge fixes

* Fixed merge issue

* Fixed indentations and extra ';'

* Update CI for syncing gitmodules (#216)

* Added logging for the old update_expired_feeds bug

The old bug is https://github.com/cryptonomex/graphene/issues/615 .

Due to the bug, `update_median_feeds()` and `check_call_orders()`
will be called when a feed is not actually expired, normally this
should not affect consensus since calling them should not change
any data in the state.

However, the logging indicates that `check_call_orders()` did
change some data under certain circumstances, specifically, when
multiple limit order matching issue (#453) occurred at same block.
* https://github.com/bitshares/bitshares-core/issues/453

* Minor performance improvement for price::is_null()

* Use static refs in db_getter for immutable objects

* Minor performance improvement for db_maint

* Minor code updates for asset_evaluator.cpp

* changed an `assert()` to `FC_ASSERT()`
* replaced one `db.get(asset_id_type())` with `db.get_core_asset()`
* capture only required variables for lambda

* Improve update_expired_feeds performance #1093

* Change static refs to member pointers of db class

* Added getter for witness schedule object

* Added getter for core dynamic data object

* Use getters

* Removed unused variable

* Add comments for update_expired_feeds in db_block

* Minor refactory asset_create_evaluator::do_apply()

* Added FC_ASSERT for dynamic data id of core asset

* Added header inclusions in db_management.cpp

* fix global objects usage during replay

* Logging config parsing issue

* added new files

* compilation fix

* Simplified code in database::pay_workers()

* issue with withdrawl

* Added unit test for empty account history

* set extensions default values

* Update GPOS hardfork date and don't allow GPOS features before hardfork time

* refer to latest commit of latest-fc branch (#224)

* account name or id support in all database api

* asset id or name support in all asset APIs

* Fixed compilation issues

* Fixed alignment issues

* Externalized some API templates

* Externalize serialization of blocks, tx, ops

* Externalized db objects

* Externalized genesis serialization

* Externalized serialization in protocol library

* Undo superfluous change

* remove default value for extension parameter

* fix compilation issues

* GRPH-46-Quit_command_cliwallet

* removed multiple function definition

* Fixed chainparameter update proposal issue

* Move GPOS withdraw logic to have single transaction(also single fee) and update API

* Added log for authorization failure of proposal operations

* Votes consideration on GPOS activation

* bump fc version

* fix gpos tests

* Bump fc version

* Updated gpos/voting_tests

* Fixed withdraw vesting bug

* Added unit test

* Update hardfork date for TESTNET, sync fc module and update logs

* avoid wlog as it filling up space

* Beatrice hot fix(sync issue fix)

* gpos tests fix

* Set hardfork date to Jan5th on TESTNET

Co-authored-by: Peter Conrad <github.com@quisquis.de>
Co-authored-by: John M. Jones <jmjatlanta@gmail.com>
Co-authored-by: obucinac <obucinac@users.noreply.github.com>
Co-authored-by: Bobinson K B <bobinson@gmail.com>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Miha Čančula <miha@noughmad.eu>
Co-authored-by: Abit <abitmore@users.noreply.github.com>
Co-authored-by: Roshan Syed <r.syed@pbsa.info>
Co-authored-by: Sandip Patel <sandip@knackroot.com>
Co-authored-by: RichardWeiYang <richard.weiyang@gmail.com>
Co-authored-by: gladcow <jahr@yandex.ru>
Co-authored-by: satyakoneru <satyakoneru.iiith@gmail.com>
2020-02-07 21:23:08 +05:30
PBSA Github Manager
54c66b226e
Update README.md 2020-01-20 09:53:28 -04:00
PBSA Github Manager
7a8026df63
Update README.md
Corrected bad link for witness node setup
2020-01-20 09:52:03 -04:00
PBSA Github Manager
9b0fb50330
Update README.md
Updated to include links to new Peerplays Documentation portal (GitBook)
2020-01-20 09:43:24 -04:00
PBSA Github Manager
b8d03b82a6
Update README.md 2020-01-20 09:42:20 -04:00
gladcow
e55075ec6d fix CLI tests 2020-01-17 18:51:44 +03:00
pbattu123
62b8bde1e0
Merge pull request #258 from peerplays-network/sync-develop
sync develop with beatrice
2020-01-16 15:33:29 -04:00
gladcow
0a90442966 fix the data writing to ES during sync issues 2020-01-13 15:35:18 +03:00
PBSA Github Manager
434837f61f
Update README.md 2020-01-06 10:02:37 -04:00
pbattu123
63750ecf57 sync develop with beatrice 2020-01-02 11:33:05 -04:00
gladcow
bfa878f9b2 change ES index prefixes to Peerplays-specific 2020-01-01 14:51:25 +03:00
Alfredo Garcia
62247c543d Merge pull request #1725 from oxarbitrage/issue1682
elasticsearch history api #1682
2020-01-01 14:51:25 +03:00
Alfredo Garcia
de4faee7f0 Merge pull request #1073 from xiangxn/merge-impacted
merge impacted into db_notify
2019-12-31 00:22:51 +03:00
Alfredo Garcia
2f054ac619 Merge pull request #1717 from oxarbitrage/issue1652
add genesis data to es_objects
2019-12-31 00:21:08 +03:00
crypto-ape
82ef3a51d1 explicitly cleanup external library facilities 2019-12-31 00:20:42 +03:00
Alfredo Garcia
6d9ad94e20 Merge pull request #1541 from oxarbitrage/es_objects_start_after_block
add es-objects-start-es-after-block option
2019-12-31 00:20:17 +03:00
Alfredo Garcia
c4612a522b Merge pull request #1458 from oxarbitrage/issue1455
add option elasticsearch-start-es-after-block to es plugin
2019-12-31 00:13:39 +03:00
Alfredo Garcia
4f5f8f4479 Merge pull request #1429 from oxarbitrage/es_objects_templates
Add an adaptor to es_objects and template function to reduce code
2019-12-31 00:09:08 +03:00
Alfredo Garcia
2d19aa3de1 Merge pull request #1271 from oxarbitrage/es_objects
refine es_objects plugin
2019-12-31 00:04:13 +03:00
Abit
c9583f4486 Merge pull request #1201 from oxarbitrage/elasticsearch_tests2
Elasticsearch refactor
2019-12-31 00:03:25 +03:00
Abit
e91e61e6cb Merge pull request #873 from pmconrad/585_fix_history_ids
Fix history ids
2019-12-30 23:20:31 +03:00
oxarbitrage
8d900a5276 Merge pull request #500 from oxarbitrage/elasticsearch-extras
es_objects plugin
2019-12-30 22:25:55 +03:00
oxarbitrage
00f14c4729 Merge pull request #444 from oxarbitrage/elasticsearch
Elasticsearch plugin
2019-12-30 21:09:24 +03:00
Alfredo
f3d961bb70 allow plugin to have descriptions 2019-12-30 19:55:13 +03:00
Peter Conrad
e1244eb7ab Implemented "plugins" config variable 2019-12-30 18:55:08 +03:00
pbattu123
51fd7d16ee
Merge pull request #255 from peerplays-network/hf-update
Set hardfork date to Jan5th on TESTNET
2019-12-24 12:03:10 -04:00
pbattu123
d52f9fbb59 Set hardfork date to Jan5th on TESTNET 2019-12-24 10:46:27 -04:00
pbattu123
b7cd99c35f
Merge pull request #253 from peerplays-network/GPOS-1
GPOS-1, Testnet sync issue fix
2019-12-23 11:39:50 -04:00
pbattu123
b6fc207160 gpos tests fix 2019-12-20 22:16:09 -04:00
pbattu123
054f06adc7 Beatrice hot fix(sync issue fix) 2019-12-20 21:55:45 -04:00
pbattu123
26886cc7d5 avoid wlog as it filling up space 2019-12-17 12:13:46 -04:00
pbattu123
a7937bf4ae
Merge pull request #248 from peerplays-network/GRPH-170
Update hardfork date for TESTNET, sync fc module and update logs
2019-12-17 10:18:26 -04:00
pbattu123
a4d399d6cc Update hardfork date for TESTNET, sync fc module and update logs 2019-12-17 09:18:34 -04:00
pbattu123
9746e74885
Merge pull request #246 from peerplays-network/develop
Merge GPOS feature and Graphene updates into TESTNET
2019-12-16 14:10:29 -04:00
pbattu123
b1f2ba5ba6
Merge pull request #243 from peerplays-network/feature/BLOCKBACK-186-Bug-Fix
[BLOCKBACK-186] Withdraw vesting bug fix
2019-12-13 16:25:43 -04:00
Sandip Patel
e7af03a987 Added unit test 2019-12-13 13:11:03 +05:30
Sandip Patel
b57220a180 Fixed withdraw vesting bug 2019-12-12 14:14:31 +05:30
Sandip Patel
d3ecbba3d7 avoid directly overwriting wallet file 2019-12-11 17:02:26 +05:30
pbattu123
f1fef49373
Merge pull request #237 from peerplays-network/BLOCKBACK-183
BLOCKBACK-183 GPOS: Votes consideration on GPOS activation
2019-12-08 21:42:26 -04:00
pbattu123
c98c7bcb94 Updated gpos/voting_tests 2019-12-07 23:41:22 -04:00
pbattu123
b5249ac2b1 Bump fc version 2019-12-07 22:15:53 -04:00
pbattu123
383b8d0b02 fix gpos tests 2019-12-07 17:06:48 -04:00
pbattu123
91e8dca261
Merge pull request #239 from peerplays-network/BLOCKCBACK-187
bump fc version BB-187
2019-12-07 13:52:32 -04:00
pbattu123
91c65b9845
Merge pull request #234 from peerplays-network/BLOCKBACK-186
BLOCKBACK-186 fix: GPOS
2019-12-07 13:51:58 -04:00
pbattu123
e0db30291c bump fc version 2019-12-06 16:35:59 -04:00
pbattu123
3b65288867
Merge pull request #232 from peerplays-network/feature/GRPH-166
[GRPH-166] Fixed chainparameter update proposal issue
2019-12-06 13:04:50 -04:00
pbattu123
70b5a9414f
Merge pull request #90 from peerplays-network/GRPH-46
GRPH-46-Quit_command_cliwallet
2019-12-06 12:33:15 -04:00
pbattu123
067fcd13f7 Votes consideration on GPOS activation 2019-12-06 11:26:49 -04:00
Sandip Patel
d5662ada04 Added log for authorization failure of proposal operations 2019-12-06 11:07:38 +05:30
pbattu123
38bb9226ec Move GPOS withdraw logic to have single transaction(also single fee) and update API 2019-12-05 13:46:13 -04:00
Sandip Patel
2dfaa866ca Fixed chainparameter update proposal issue 2019-12-05 18:53:38 +05:30
PBSA Github Manager
709c74505b
Update README.md 2019-12-04 13:26:19 -04:00
Alfredo Garcia
3a2def7311
Merge pull request #137 from peerplays-network/feature/GRPH-92
[GRPH 92] Build optimization
2019-12-03 20:43:50 -03:00
Sandip Patel
e989275414 removed multiple function definition 2019-12-03 19:44:16 +05:30
satyakoneru
9a9c35649b GRPH-46-Quit_command_cliwallet 2019-12-03 19:39:03 +05:30
Sandip Patel
5606fc5fc2 Port plugin sanitization code 2019-12-03 15:17:45 +05:30
Sandip Patel
45aac6dc61 fixed cli_wallet log issue 2019-12-03 14:20:15 +05:30
gladcow
40c2fd8783 fix compilation issues 2019-12-02 17:41:13 +03:00
Sandip Patel
ffbae79a48 Replace verify_no_send_in_progress with no_parallel_execution_guard 2019-12-02 12:04:28 +05:30
pbattu123
c49ce31201
Merge pull request #227 from peerplays-network/GRPH-159
GRPH 159
2019-11-29 14:21:45 -04:00
pbattu123
0b2c9dde22 remove default value for extension parameter 2019-11-29 10:15:13 -04:00
Peter Conrad
25458c294d Undo superfluous change 2019-11-29 14:10:40 +03:00
Peter Conrad
854119233a Externalized serialization in protocol library 2019-11-29 14:10:40 +03:00
Peter Conrad
2358149e46 Externalized genesis serialization 2019-11-29 14:10:40 +03:00
Peter Conrad
b3d6058485 Externalized db objects 2019-11-29 14:10:40 +03:00
Peter Conrad
71d8bfd843 Externalize serialization of blocks, tx, ops 2019-11-29 14:10:40 +03:00
Peter Conrad
4df7298a0d Externalized some API templates 2019-11-29 14:10:40 +03:00
Sandip Patel
614e51cca0 check witness signature before adding block to fork db 2019-11-29 16:08:23 +05:30
Alfredo Garcia
6f0ce36292
Merge pull request #225 from peerplays-network/feature/GRPH-152
[GRPH-152] Allow APIs to be called by account/asset name and id
2019-11-28 15:29:12 -03:00
Sandip Patel
ad5707ed95 Fixed alignment issues 2019-11-28 10:36:26 +05:30
Sandip Patel
41445a8764 Fixed compilation issues 2019-11-26 18:18:42 +05:30
Sandip Patel
a5d8a15728 asset id or name support in all asset APIs 2019-11-26 16:51:20 +05:30
Sandip Patel
7aeaa14bae account name or id support in all database api 2019-11-26 13:50:06 +05:30
pbattu123
fd23d149d6 refer to latest commit of latest-fc branch (#224) 2019-11-25 16:23:42 -04:00
pbattu123
9b7776e301
Merge pull request #220 from peerplays-network/BLOCKBACK-177
issue with withdrawl
2019-11-25 10:51:06 -04:00
pbattu123
0ecf2e8d0e
Merge pull request #222 from peerplays-network/feature/BLOCKBACK-182
[BLOCKBACK-182] set extensions default values
2019-11-25 10:49:25 -04:00
pbattu123
fd2679a888
Merge pull request #223 from peerplays-network/BLOCKBACK-181
BLOCKBACK-181 Update GPOS hardfork date and don't allow GPOS features before hardfork time
2019-11-24 12:21:44 -04:00
pbattu123
e6d3dd0662 Update GPOS hardfork date and don't allow GPOS features before hardfork time 2019-11-23 20:46:17 -04:00
Alfredo Garcia
df4e045128
Merge pull request #218 from peerplays-network/feature/GRPH-150
[GRPH-150] P2P Log files are not created
2019-11-22 16:49:25 -03:00
pbattu123
89a63af930
Merge pull request #221 from peerplays-network/feature/GRPH-49-test-case
Added unit test for empty account history
2019-11-22 09:50:50 -04:00
Sandip Patel
c17d73f11b set extensions default values 2019-11-22 18:46:55 +05:30
Sandip Patel
ae47eb9390 Added unit test for empty account history 2019-11-22 11:49:33 +05:30
pbattu123
9c1e7af9c7 issue with withdrawl 2019-11-21 10:40:39 -04:00
Alfredo Garcia
e7e08169c8
Merge pull request #116 from peerplays-network/GRPH-81
[GRPH-81] Different performance optimization
2019-11-20 13:36:41 -03:00
abitmore
d3b2c4ce95 Simplified code in database::pay_workers() 2019-11-20 14:23:20 +03:00
Sandip Patel
9baf81e7c6 compilation fix 2019-11-14 19:13:57 +05:30
Sandip Patel
ac5d55be0f added new files 2019-11-14 17:05:01 +05:30
Sandip Patel
7a1f1a7293 Logging config parsing issue 2019-11-14 17:02:54 +05:30
Alfredo Garcia
fccd856429
Merge pull request #149 from peerplays-network/feature/GRPH-114
[GRPH-114] Check the attacker/buggy client before updating items ids
2019-11-11 09:50:46 -03:00
Alfredo Garcia
943953c66d
Merge pull request #212 from peerplays-network/develop_gpos
[GRPH-137] Merge gpos into develop
2019-11-08 10:44:00 -03:00
gladcow
d99ef0c1f9 fix global objects usage during replay 2019-11-08 15:42:09 +03:00
abitmore
4f54b13074 Added header inclusions in db_management.cpp 2019-11-08 15:42:09 +03:00
abitmore
6a7d670762 Added FC_ASSERT for dynamic data id of core asset 2019-11-08 15:42:09 +03:00
abitmore
02f6019896 Minor refactory asset_create_evaluator::do_apply() 2019-11-08 15:42:09 +03:00
abitmore
2f6de1f056 Add comments for update_expired_feeds in db_block 2019-11-08 15:42:09 +03:00
abitmore
66f6f26934 Removed unused variable 2019-11-08 15:42:09 +03:00
abitmore
83736ba656 Use getters 2019-11-08 15:42:09 +03:00
abitmore
1939cd127b Added getter for core dynamic data object 2019-11-08 15:42:09 +03:00
abitmore
dcc6902720 Added getter for witness schedule object 2019-11-08 15:42:09 +03:00
abitmore
04102d549c Change static refs to member pointers of db class 2019-11-08 15:39:16 +03:00
abitmore
36e318a503 Improve update_expired_feeds performance #1093 2019-11-08 15:39:16 +03:00
abitmore
e27b074f62 Minor code updates for asset_evaluator.cpp
* changed an `assert()` to `FC_ASSERT()`
* replaced one `db.get(asset_id_type())` with `db.get_core_asset()`
* capture only required variables for lambda
2019-11-08 15:37:46 +03:00
abitmore
ac7ac9f1f2 Minor performance improvement for db_maint 2019-11-08 15:37:46 +03:00
abitmore
cabbd7d070 Use static refs in db_getter for immutable objects 2019-11-08 15:37:46 +03:00
abitmore
01a81554ff Minor performance improvement for price::is_null() 2019-11-08 15:37:46 +03:00
abitmore
8a9d3e7775 Added logging for the old update_expired_feeds bug
The old bug is https://github.com/cryptonomex/graphene/issues/615 .

Due to the bug, `update_median_feeds()` and `check_call_orders()`
will be called when a feed is not actually expired, normally this
should not affect consensus since calling them should not change
any data in the state.

However, the logging indicates that `check_call_orders()` did
change some data under certain circumstances, specifically, when
multiple limit order matching issue (#453) occurred at same block.
* https://github.com/bitshares/bitshares-core/issues/453
2019-11-08 15:37:46 +03:00
Roshan Syed
2f4830a778 Update CI for syncing gitmodules (#216) 2019-11-07 19:13:12 +05:30
Alfredo Garcia
25ab039a58
Merge branch 'develop' into develop_gpos 2019-11-07 08:08:53 -03:00
Sandip Patel
0bcfaa385b Improve account maintenance performance (#130)
* Improve account maintenance performance

* merge fixes

* Fixed merge issue

* Fixed indentations and extra ';'
2019-11-07 11:25:02 +05:30
pbattu123
50b80e9155 update submodule branch to refer to the latest commit on latest-fc branch (#214) 2019-11-07 08:44:42 +05:30
satyakoneru
3e6b9196ce GRPH134- High CPU Issue, websocket changes (#213) 2019-11-06 20:15:15 +05:30
Alfredo Garcia
a07bcad7e8 remove non needed gcc5 changes to dockerfile 2019-11-06 11:10:33 -03:00
Alfredo Garcia
f831f9527f Merge branch 'qa_gpos_18.04' into develop_gpos 2019-11-05 14:34:04 -03:00
Alfredo Garcia
20a9f9b84d
Merge pull request #211 from peerplays-network/feature/BLOCKBACK-162
[BLOCKBACK-162] Fixed spelling issue in error message
2019-11-05 09:00:11 -03:00
Sandip Patel
61fa3918ef Fixed spelling issue 2019-11-05 15:02:38 +05:30
pbattu123
ab780862d3
Merge pull request #205 from peerplays-network/BLOCKBACK-155
[Blockback 155] GPOS - Multiple issues with vote_for_witness
2019-10-31 13:57:31 -03:00
Sandip Patel
fd8659caaf Fixed flag issue 2019-10-31 19:01:50 +05:30
Sandip Patel
e7f65c6760 get_account bug fixed 2019-10-31 15:41:40 +05:30
Sandip Patel
5d36258f0c case 1: Fixed last voting time issue 2019-10-31 15:02:05 +05:30
Sandip Patel
c8db22d481 Added token symbol name in error messages (#204) 2019-10-30 18:29:30 +05:30
Sandip Patel
d5d4fdd6d3 Added token symbol name in error messages 2019-10-30 17:51:02 +05:30
pbattu123
3a817e17ea
Merge pull request #202 from peerplays-network/BLOCKBACK-174
BLOCKBACK- 174 Roll in GPOS votes from 6th sub-period
2019-10-28 14:49:51 -03:00
pbattu123
3f8ac21b1e updated comments to the benefit of reviewer 2019-10-28 12:14:53 -03:00
pbattu123
9f0b23122f comments updated 2019-10-28 10:46:10 -03:00
pbattu123
ac3554ea2e check was already modified 2019-10-27 13:11:58 -03:00
pbattu123
5f1436b8be Fix to roll in GPOS rules, carry votes from 6th sub-period 2019-10-27 12:54:54 -03:00
pbattu123
5caaedd43a
Merge pull request #201 from peerplays-network/fix_flag
Fix update_last_voting_time flag
2019-10-27 12:44:43 -03:00
Alfredo Garcia
7c1966247b adapt gpos_tests to changed flag 2019-10-27 09:10:53 -03:00
Alfredo Garcia
84f30926bc clean newlines gpos_tests 2019-10-27 08:54:37 -03:00
Alfredo Garcia
a80d25f9df fix flag 2019-10-27 08:54:18 -03:00
Alfredo Garcia
aef57f1720
Merge pull request #200 from peerplays-network/feature/BLOCKBACK-166
[BLOCKBACK-166] GPOS - dividend distribution for UIAs
2019-10-26 08:08:27 -03:00
pbattu123
46dab2545c
Merge pull request #193 from peerplays-network/BLOCKBACK-155
BLOCKBACK- 155: allow token holder to vote in each subperiod without unvote
2019-10-25 10:23:24 -03:00
pbattu123
8269c94601
Merge branch 'qa_gpos_18.04' into BLOCKBACK-155 2019-10-25 10:21:55 -03:00
Sandip Patel
a8423f167d Fixed dividend distribution issue and added test case 2019-10-25 16:41:34 +05:30
Alfredo Garcia
e63452cb3c
Merge pull request #199 from peerplays-network/BLOCKBACK_164
BLOCKBACK-164 Eliminate time gap between two consecutive vesting periods
2019-10-25 08:01:56 -03:00
Alfredo Garcia
ed49ab8eea
Merge pull request #190 from peerplays-network/feature/BLOCKBACK-162
[BLOCKBACK-162] Error message correction
2019-10-25 07:04:01 -03:00
pbattu123
bdd1863cf2 updated GPOS hf 2019-10-24 23:53:47 -03:00
pbattu123
22e5dfa502 deleted GPOS specific test suite and updated gpos tests 2019-10-24 15:31:49 -03:00
pbattu123
78787c2a14 eliminate time gap between two consecutive vesting periods 2019-10-24 14:39:01 -03:00
Sandip Patel
69630183f9 removed witness check 2019-10-24 19:24:09 +05:30
pbattu123
f7d7f043ce delete unused variables 2019-10-23 23:18:44 -03:00
pbattu123
cf3b54ece4 unit test changes and also separated GPOS test suite 2019-10-23 23:13:23 -03:00
pbattu123
d6da2963dc resolve merge conflict 2019-10-23 22:15:26 -03:00
pbattu123
3be3fd36bb Merge branch 'BLOCKBACK-155' of https://github.com/peerplays-network/peerplays into BLOCKBACK-155 2019-10-23 18:36:39 -03:00
pbattu123
48d0d88ff0 changes to update last voting time 2019-10-23 18:33:17 -03:00
pbattu123
d4460870bd
Merge branch 'qa_gpos_18.04' into BLOCKBACK-155 2019-10-23 17:57:13 -03:00
pbattu123
39e9557749
Merge pull request #197 from peerplays-network/feature/BLOCKBACK-165
[BLOCKBACK-165] Fixed GPOS vesting factor issue when proxy is set
2019-10-23 17:48:57 -03:00
Sandip Patel
8bbab4c113 Review changes 2019-10-23 18:25:33 +05:30
Sandip Patel
ccdea033f3 Added unit test for proxy voting 2019-10-23 17:41:16 +05:30
Sandip Patel
73829bd97f Fixed GPOS vesting factor issue when proxy is set 2019-10-23 11:56:38 +05:30
pbattu123
0d1c41557d changes to allow user to vote in each sub-period 2019-10-22 10:39:45 -03:00
Sandip Patel
d2a6f6d319 Project name update in Doxyfile (#146) 2019-10-22 18:22:22 +05:30
Sandip Patel
f7c592dd0e Updated FC repository to peerplays-network/peerplays-fc (#189)
Point to fc commit hash 6096e94 [latest-fc branch]
2019-10-21 23:24:20 +05:30
Sandip Patel
0800e2bc67 error message corrections at other places 2019-10-19 16:38:12 +05:30
Sandip Patel
c025f639d7 Fixed few error messages 2019-10-19 10:58:56 +05:30
Alfredo Garcia
8c188bd53f merge gpos to develop (#186)
* issue - 154: Don't allow to vote when vesting balance is 0

* changes to withdraw_vesting feature(for both cdd and GPOS)

* Comments update

* update to GPOS hardfork ref

* fix for get_vesting_balance API call

* braces update

* Create .gitlab-ci.yml

* fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile

* Changes to compiple with GCC 7(Ubuntu 18.04)

* changes to have separate methods and single withdrawl fee for multiple vest objects

* 163-fix, Return only non-zero vesting balances

* Revert "Revert "GPOS protocol""

This reverts commit 67616417b7.

* add new line needed to gpos hardfork file

* comment temporally cli_vote_for_2_witnesses until refactor or delete

* fix gpos tests

* fix gitlab-ci conflict
2019-10-17 22:09:44 +05:30
Roshan Syed
98cf5d9ba6
Added submodule sync to peerplays compile process 2019-10-17 11:47:38 -03:00
Sandip Patel
e3b2459de4 Adjust p2p log level (#180) 2019-10-16 20:57:39 +05:30
Sandip Patel
40534446da [GRPH-106] Added voting tests (#136)
* Added more voting tests

* Added additional option
2019-10-10 21:29:01 +05:30
Sandip Patel
ec33f0cc07 [GRPH-3] Additional cli tests (#155)
* Additional cli tests

* Compatible with latest fc changes

* Fixed Spacing issues
2019-10-10 21:24:12 +05:30
pbattu123
7b1d31e8d2
Merge pull request #172 from peerplays-network/graphene-release1
Graphene Updates Release 1
2019-10-09 20:58:46 -03:00
pbattu123
d5dffa64b7
Merge pull request #163 from peerplays-network/153/fix-add-on
Changes to have separate withdraw_vesting methods and single withdraw fee for multiple objects
2019-10-06 16:39:07 -03:00
pbattu123
3f6b7abadb
Merge pull request #164 from peerplays-network/jira-163-fix
163-fix, Return only non-zero vesting balances
2019-10-06 16:38:52 -03:00
pbattu123
c73d0a338a 163-fix, Return only non-zero vesting balances 2019-10-03 22:22:21 -03:00
pbattu123
d65f20a89f changes to have separate methods and single withdrawl fee for multiple vest objects 2019-10-03 16:38:40 -03:00
pbattu123
f1eb625df8 Changes to compiple with GCC 7(Ubuntu 18.04) 2019-09-30 00:27:21 -03:00
Bobinson K B
7fae375e0f
fixing build errors (#150)
* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile
2019-09-26 11:41:28 -04:00
Bobinson K B
a0f793951c
updates to PR template 2019-09-26 20:26:23 +05:30
Roshan Syed
db01f313e5
Create .gitlab-ci.yml 2019-09-25 10:30:15 -03:00
Wei Yang
83b19d0b84 node.cpp: Check the attacker/buggy client before updating items ids
The peer is an attacker or buggy, which means the item_hashes_received is
not correct.

Move the check before updating items ids to save some time in this case.
2019-09-24 13:35:48 +03:00
pbattu123
af47ed0625
Merge pull request #143 from peerplays-network/issue/154-fix
Issue/154 fix
2019-09-22 13:25:12 -03:00
pbattu123
a7df686ebe braces update 2019-09-21 13:08:33 -03:00
pbattu123
4a72f943e8 fix for get_vesting_balance API call 2019-09-21 13:04:43 -03:00
pbattu123
79dc2f4dde
Merge pull request #141 from peerplays-network/BLOCKBACK-153
Issue Blockback 153 fix
2019-09-21 12:56:40 -03:00
pbattu123
9ec835b361
Merge pull request #95 from peerplays-network/issue-154
issue - 157: Don't allow to vote when the vesting balance is 0
2019-09-21 12:54:17 -03:00
pbattu123
8e1c038558 update to GPOS hardfork ref 2019-09-20 16:58:06 -03:00
pbattu123
b358241e43 Comments update 2019-09-20 14:03:59 -03:00
pbattu123
2a3d8a4c66 changes to withdraw_vesting feature(for both cdd and GPOS) 2019-09-20 11:32:07 -03:00
PBSA Github Manager
5d43b28b1b Update README.md (#132) 2019-09-17 15:07:00 -03:00
Bobinson K B
1d7e4fc630
Merge pull request #103 from peerplays-network/github-issue-template1
Update issue & PR templates
2019-09-10 11:05:55 -04:00
Bobinson Bobby
c7164bd99d issue and PR template
adding requested changes
added PR template
2019-09-09 01:18:28 +05:30
pbattu123
62ddd6775d
Merge pull request #114 from peerplays-network/review-fixes
Bring back all review fixes that were deleted with 50/50 merge
2019-09-06 09:01:46 -03:00
pbattu123
e82a3dbcc0 Hardfork date updated to Sep12-10pm EST 2019-09-06 08:59:56 -03:00
pbattu123
7ce73aeb4e update 2019-09-04 13:09:11 -03:00
pbattu123
d28f9b0dbc missing things 2019-09-04 12:15:58 -03:00
pbattu123
f998c4611a bring back all review fixes that were deleted with 50/50 merge 2019-09-04 11:29:16 -03:00
pbattu123
a50da70215
Merge pull request #107 from peerplays-network/hardfork-50/50
Hardfork 50/50
2019-09-03 16:21:42 -03:00
pbattu123
651e781984
Merge pull request #75 from peerplays-network/beatrice
Ubuntu 18.04 Upgrade + 5050 dApp changes
2019-09-03 16:11:24 -03:00
PBSA
a029784a76 update to fc path(pointed to peerplays-network 2019-09-03 19:08:58 +00:00
pbattu123
bec5918586 update hardfork date for 18.04 upgrade + 50/50 dApp 2019-09-03 11:07:00 -03:00
Bobinson Bobby
145624d026 github issue templates
build, feature, issue templates
2019-09-03 11:38:05 +05:30
Bobinson K B
f25cee8616
updating the issue template - bug report 2019-09-03 11:20:26 +05:30
Bobinson K B
2716202cdc Update issue templates 2019-09-03 11:17:39 +05:30
pbattu123
8613bab257 issue - 154: Don't allow to vote when vesting balance is 0 2019-08-29 10:34:15 -03:00
pbattu123
c35a88bd51
Merge pull request #37 from peerplays-network/feature/SONs-base
Unit test case fixes
2019-08-20 14:54:04 -03:00
394 changed files with 254492 additions and 15648 deletions

View file

@ -1,6 +1,5 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -3
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
@ -12,7 +11,7 @@ AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: None
@ -57,6 +56,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 6
ContinuationIndentWidth: 6
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
@ -69,12 +69,17 @@ IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: None
IndentWidth: 3
IndentWrappedFunctionNames: false
@ -110,18 +115,22 @@ SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 3
UseCRLF: false
UseTab: Never
...

1
.gitignore vendored
View file

@ -14,6 +14,7 @@ data
CMakeDoxyfile.in
build
build__*
libraries/utilities/git_revision.cpp

View file

@ -1,20 +1,27 @@
include:
- template: Code-Quality.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml
- template: SAST.gitlab-ci.yml
- template: Secret-Detection.gitlab-ci.yml
stages:
- build
- test
- dockerize
- python-test
- deploy
build:
build-mainnet:
stage: build
script:
- rm -rf .git/modules/* ./docs ./libraries/fc
- rm -rf .git/modules/docs .git/modules/libraries/fc ./docs ./libraries/fc
- git submodule sync
- git submodule update --init --recursive
- rm -rf build
- mkdir build
- cd build
- cmake ..
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j$(nproc)
artifacts:
untracked: true
@ -25,35 +32,140 @@ build:
tags:
- builder
test:
test-mainnet:
stage: test
dependencies:
- build
- build-mainnet
script:
- ./build/libraries/fc/tests/all_tests
- ./build/tests/betting_test --log_level=message
- ./build/tests/chain_test --log_level=message
- ./build/tests/cli_test --log_level=message
tags:
- builder
code_quality:
stage: test
image: docker:stable
dockerize-mainnet:
stage: dockerize
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
IMAGE: $CI_REGISTRY_IMAGE/mainnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
before_script:
- docker info
- docker builder prune -a -f
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
- docker build --no-cache -t $IMAGE .
- docker push $IMAGE
after_script:
- docker rmi $IMAGE
tags:
- builder
timeout:
3h
build-testnet:
stage: build
script:
- rm -rf .git/modules/docs .git/modules/libraries/fc ./docs ./libraries/fc
- git submodule sync
- git submodule update --init --recursive
- rm -rf build
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1 ..
- make -j$(nproc)
artifacts:
paths: [gl-code-quality-report.json]
expire_in: 1 week
except:
variables:
- $CODE_QUALITY_DISABLED
untracked: true
paths:
- build/libraries/
- build/programs/
- build/tests/
when: manual
tags:
- builder
deploy-testnet:
stage: deploy
dependencies:
- build-testnet
script:
- sudo systemctl stop witness
- rm $WORK_DIR/peerplays/witness_node || true
- cp build/programs/witness_node/witness_node $WORK_DIR/peerplays/
- sudo systemctl restart witness
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: always
environment:
name: devnet
url: $DEVNET_URL
tags:
- devnet
test-testnet:
stage: test
dependencies:
- build-testnet
script:
- ./build/libraries/fc/tests/all_tests
- ./build/tests/betting_test --log_level=message
- ./build/tests/chain_test --log_level=message
- ./build/tests/cli_test --log_level=message
tags:
- builder
when:
manual
timeout:
1h
dockerize-testnet:
stage: dockerize
variables:
IMAGE: $CI_REGISTRY_IMAGE/testnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
before_script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --no-cache -t $IMAGE .
- docker push $IMAGE
after_script:
- docker rmi $IMAGE
tags:
- builder
when:
manual
timeout:
3h
test-e2e:
stage: python-test
variables:
IMAGE: $CI_REGISTRY_IMAGE/mainnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
before_script:
- docker info
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- git clone https://gitlab.com/PBSA/tools-libs/peerplays-utils.git
- cd peerplays-utils/peerplays-qa-environment
- git checkout origin/feature/python-e2e-tests-for-CI
- cd e2e-tests/
- python3 -m venv venv
- source venv/bin/activate
- pip3 install -r requirements.txt
- docker-compose down --remove-orphans
- docker ps -a
- docker pull $IMAGE
- docker tag $IMAGE peerplays-base:latest
- docker image ls -a
- docker-compose build
- python3 main.py --start all
- docker ps -a
- python3 -m pytest test_btc_init_state.py test_hive_inital_state.py test_pp_inital_state.py
- python3 main.py --stop
- deactivate
- docker ps -a
after_script:
- docker rmi $(docker images -a | grep -v 'hive-for-peerplays\|ethereum-for-peerplays\|bitcoin-for-peerplays\|ubuntu-for-peerplays' | awk '{print $3}')
tags:
- python-tests
when:
manual

14
.gitmodules vendored
View file

@ -1,9 +1,9 @@
[submodule "docs"]
path = docs
url = https://github.com/bitshares/bitshares-core.wiki.git
ignore = dirty
path = docs
url = https://github.com/bitshares/bitshares-core.wiki.git
ignore = dirty
[submodule "libraries/fc"]
path = libraries/fc
url = https://github.com/peerplays-network/peerplays-fc.git
branch = latest-fc
ignore = dirty
path = libraries/fc
url = https://gitlab.com/PBSA/tools-libs/peerplays-fc.git
branch = develop
ignore = dirty

View file

@ -0,0 +1,10 @@
sonar.projectKey=peerplays-network_peerplays
sonar.organization=peerplays-network
# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=peerplays
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=.
sonar.host.url=https://sonarcloud.io

View file

@ -1,11 +1,11 @@
# Defines BitShares library target.
project( BitShares )
# Defines Peerplays library target.
project( Peerplays )
cmake_minimum_required( VERSION 2.8.12 )
set( BLOCKCHAIN_NAME "BitShares" )
set( BLOCKCHAIN_NAME "Peerplays" )
set( CLI_CLIENT_EXECUTABLE_NAME graphene_client )
set( GUI_CLIENT_EXECUTABLE_NAME BitShares )
set( GUI_CLIENT_EXECUTABLE_NAME Peerplays )
set( CUSTOM_URL_SCHEME "gcs" )
set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" )
@ -22,8 +22,76 @@ endif()
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
function(get_linux_lsb_release_information)
find_program(LSB_RELEASE_EXEC lsb_release)
if(NOT LSB_RELEASE_EXEC)
message(FATAL_ERROR "Could not detect lsb_release executable, can not gather required information")
endif()
execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --id OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --release OUTPUT_VARIABLE LSB_RELEASE_VERSION_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --codename OUTPUT_VARIABLE LSB_RELEASE_CODENAME_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LSB_RELEASE_ID_SHORT "${LSB_RELEASE_ID_SHORT}" PARENT_SCOPE)
set(LSB_RELEASE_VERSION_SHORT "${LSB_RELEASE_VERSION_SHORT}" PARENT_SCOPE)
set(LSB_RELEASE_CODENAME_SHORT "${LSB_RELEASE_CODENAME_SHORT}" PARENT_SCOPE)
endfunction()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
find_package(cppzmq)
target_link_libraries(cppzmq)
get_linux_lsb_release_information()
message(STATUS "Linux ${LSB_RELEASE_ID_SHORT} ${LSB_RELEASE_VERSION_SHORT} ${LSB_RELEASE_CODENAME_SHORT}")
string(REGEX MATCHALL "([0-9]+)" arg_list ${LSB_RELEASE_VERSION_SHORT})
list( LENGTH arg_list listlen )
if (NOT listlen)
message(FATAL_ERROR "Could not detect Ubuntu version")
endif()
list(GET arg_list 0 output)
message("Ubuntu version is: ${output}")
add_definitions(-DPEERPLAYS_UBUNTU_VERSION=${output})
endif()
# function to help with cUrl
macro(FIND_CURL)
if (NOT WIN32 AND NOT APPLE AND CURL_STATICLIB)
find_package(OpenSSL REQUIRED)
set (OLD_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set (CMAKE_FIND_LIBRARY_SUFFIXES .a)
find_package(CURL REQUIRED)
list(APPEND CURL_LIBRARIES ${OPENSSL_LIBRARIES} ${BOOST_THREAD_LIBRARY} ${CMAKE_DL_LIBS})
set (CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_SUFFIXES})
else (NOT WIN32 AND NOT APPLE AND CURL_STATICLIB)
find_package(CURL REQUIRED)
endif (NOT WIN32 AND NOT APPLE AND CURL_STATICLIB)
if( WIN32 )
if ( MSVC )
list( APPEND CURL_LIBRARIES Wldap32 )
endif( MSVC )
if( MINGW )
# MinGW requires a specific order of included libraries ( CURL before ZLib )
find_package( ZLIB REQUIRED )
list( APPEND CURL_LIBRARIES ${ZLIB_LIBRARY} pthread )
endif( MINGW )
list( APPEND CURL_LIBRARIES ${PLATFORM_SPECIFIC_LIBS} )
endif( WIN32 )
endmacro()
set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
set(GRAPHENE_EGENESIS_JSON "${CMAKE_CURRENT_SOURCE_DIR}/genesis.json" CACHE PATH "location of the genesis.json to embed in the executable" )
if (BUILD_PEERPLAYS_TESTNET)
set(GRAPHENE_EGENESIS_JSON "${CMAKE_CURRENT_SOURCE_DIR}/genesis-testnet.json" CACHE PATH "location of the genesis.json to embed in the executable" )
#add_compile_definitions(BUILD_PEERPLAYS_TESTNET=1)
add_definitions(-DBUILD_PEERPLAYS_TESTNET=1)
message ("\n====================\nBuilding for Testnet\n====================\n")
else (BUILD_PEERPLAYS_TESTNET)
set(GRAPHENE_EGENESIS_JSON "${CMAKE_CURRENT_SOURCE_DIR}/genesis-mainnet.json" CACHE PATH "location of the genesis.json to embed in the executable" )
message ("\n====================\nBuilding for Mainnet\n====================\n")
endif (BUILD_PEERPLAYS_TESTNET)
#set (ENABLE_INSTALLER 1)
#set (USE_PCH 1)
@ -46,7 +114,6 @@ LIST(APPEND BOOST_COMPONENTS thread
system
filesystem
program_options
signals
serialization
chrono
unit_test_framework
@ -71,7 +138,7 @@ ENDIF()
if( WIN32 )
message( STATUS "Configuring BitShares on WIN32")
message( STATUS "Configuring Peerplays on WIN32")
set( DB_VERSION 60 )
set( BDB_STATIC_LIBS 1 )
@ -103,20 +170,13 @@ if( WIN32 )
SET(TCL_LIBRARY ${TCL_LIBS})
else( WIN32 ) # Apple AND Linux
find_library(READLINE_LIBRARIES NAMES readline)
find_path(READLINE_INCLUDE_DIR readline/readline.h)
#if(NOT READLINE_INCLUDE_DIR OR NOT READLINE_LIBRARIES)
# MESSAGE(FATAL_ERROR "Could not find lib readline.")
#endif()
if( APPLE )
# Apple Specific Options Here
message( STATUS "Configuring BitShares on OS X" )
message( STATUS "Configuring Peerplays on OS X" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -stdlib=libc++ -Wall" )
else( APPLE )
# Linux Specific Options Here
message( STATUS "Configuring BitShares on Linux" )
message( STATUS "Configuring Peerplays on Linux" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -Wall" )
set( rt_library rt )
#set( pthread_library pthread)
@ -135,7 +195,7 @@ else( WIN32 ) # Apple AND Linux
endif( APPLE )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-memcmp -Wno-parentheses -Wno-invalid-offsetof -Wno-terminate -Wno-sign-compare" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
elseif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
if( CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.0.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0.0 )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-partial-specialization" )
@ -154,7 +214,7 @@ else( WIN32 ) # Apple AND Linux
endif( WIN32 )
set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build BitShares for code coverage analysis")
set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build Peerplays for code coverage analysis")
if(ENABLE_COVERAGE_TESTING)
SET(CMAKE_CXX_FLAGS "--coverage ${CMAKE_CXX_FLAGS}")
@ -163,13 +223,13 @@ endif()
add_subdirectory( libraries )
set(BUILD_BITSHARES_PROGRAMS TRUE CACHE BOOL "Build bitshares executables (witness node, cli wallet, etc)")
set(BUILD_PEERPLAYS_PROGRAMS TRUE CACHE BOOL "Build peerplays executables (witness node, cli wallet, etc)")
add_subdirectory( programs )
set(BUILD_BITSHARES_TESTS TRUE CACHE BOOL "Build bitshares unit tests")
if( BUILD_BITSHARES_TESTS )
set(BUILD_PEERPLAYS_TESTS TRUE CACHE BOOL "Build peerplays unit tests")
if( BUILD_PEERPLAYS_TESTS )
add_subdirectory( tests )
endif( BUILD_BITSHARES_TESTS )
endif( BUILD_PEERPLAYS_TESTS )
if (ENABLE_INSTALLER)
@ -191,18 +251,18 @@ set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_DESCRIPTION "A client for the BitShares network")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A client for the BitShares network")
set(CPACK_PACKAGE_DESCRIPTION "A client for the Peerplays network")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A client for the Peerplays network")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "BitShares ${CPACK_PACKAGE_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Peerplays ${CPACK_PACKAGE_VERSION}")
if(WIN32)
SET(CPACK_GENERATOR "ZIP;NSIS")
set(CPACK_PACKAGE_NAME "BitShares") # override above
set(CPACK_PACKAGE_NAME "Peerplays") # override above
set(CPACK_NSIS_EXECUTABLES_DIRECTORY .)
set(CPACK_NSIS_PACKAGE_NAME "BitShares v${CPACK_PACKAGE_VERSION}")
set(CPACK_NSIS_PACKAGE_NAME "Peerplays v${CPACK_PACKAGE_VERSION}")
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
set(CPACK_NSIS_DEFINES " !define MUI_STARTMENUPAGE_DEFAULTFOLDER \\\"BitShares\\\"")
set(CPACK_NSIS_DEFINES " !define MUI_STARTMENUPAGE_DEFAULTFOLDER \\\"Peerplays\\\"")
# it seems like windows zip files usually don't have a single directory inside them, unix tgz frequently do
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
@ -220,3 +280,8 @@ endif(LINUX)
include(CPack)
endif(ENABLE_INSTALLER)
unset(GRAPHENE_EGENESIS_JSON)
unset(GRAPHENE_EGENESIS_JSON CACHE)
unset(BUILD_PEERPLAYS_TESTNET)
unset(BUILD_PEERPLAYS_TESTNET CACHE)

View file

@ -1,94 +1,218 @@
FROM ubuntu:18.04
MAINTAINER PeerPlays Blockchain Standards Association
FROM ubuntu:20.04
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
#===============================================================================
# Ubuntu setup
#===============================================================================
RUN \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-utils \
autoconf \
bash \
bison \
build-essential \
ca-certificates \
cmake \
doxygen \
dnsutils \
expect \
flex \
git \
graphviz \
libbz2-dev \
libcurl4-openssl-dev \
libncurses-dev \
libreadline-dev \
libsnappy-dev \
libssl-dev \
libtool \
libzmq3-dev \
libzip-dev \
locales \
lsb-release \
mc \
nano \
net-tools \
ntp \
openssh-server \
pkg-config \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
python3 \
python3-jinja2 \
sudo \
systemd-coredump \
wget
ENV HOME /home/peerplays
RUN useradd -rm -d /home/peerplays -s /bin/bash -g root -G sudo -u 1000 peerplays
RUN echo "peerplays ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/peerplays
RUN chmod 440 /etc/sudoers.d/peerplays
RUN service ssh start
RUN echo 'peerplays:peerplays' | chpasswd
# SSH
EXPOSE 22
WORKDIR /home/peerplays/src
#===============================================================================
# Boost setup
#===============================================================================
RUN \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
# Compile Boost
RUN \
BOOST_ROOT=$HOME/boost_1_67_0 && \
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz/download' -O boost_1_67_0.tar.gz &&\
tar -zxvf boost_1_67_0.tar.gz && \
cd boost_1_67_0/ && \
./bootstrap.sh "--prefix=$BOOST_ROOT" && \
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.gz && \
tar -xzf boost_1_72_0.tar.gz && \
cd boost_1_72_0 && \
./bootstrap.sh && \
./b2 install && \
cd ..
ldconfig && \
rm -rf /home/peerplays/src/*
ADD . /peerplays-core
WORKDIR /peerplays-core
#===============================================================================
# cmake setup
#===============================================================================
# Compile Peerplays
RUN \
BOOST_ROOT=$HOME/boost_1_67_0 && \
git submodule update --init --recursive && \
wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh && \
chmod 755 ./cmake-3.24.2-linux-x86_64.sh && \
./cmake-3.24.2-linux-x86_64.sh --prefix=/usr --skip-license && \
cmake --version && \
rm -rf /home/peerplays/src/*
#===============================================================================
# libzmq setup
#===============================================================================
RUN \
wget https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.4.tar.gz && \
tar -xzvf v4.3.4.tar.gz && \
cd libzmq-4.3.4 && \
mkdir build && \
mkdir build/release && \
cd build/release && \
cmake \
-DBOOST_ROOT="$BOOST_ROOT" \
-DCMAKE_BUILD_TYPE=Release \
../.. && \
make witness_node cli_wallet && \
install -s programs/witness_node/witness_node programs/cli_wallet/cli_wallet /usr/local/bin && \
#
# Obtain version
mkdir /etc/peerplays && \
git rev-parse --short HEAD > /etc/peerplays/version && \
cd / && \
rm -rf /peerplays-core
cd build && \
cmake .. && \
make -j$(nproc) && \
make install && \
ldconfig && \
rm -rf /home/peerplays/src/*
# Home directory $HOME
WORKDIR /
RUN useradd -s /bin/bash -m -d /var/lib/peerplays peerplays
ENV HOME /var/lib/peerplays
RUN chown peerplays:peerplays -R /var/lib/peerplays
#===============================================================================
# cppzmq setup
#===============================================================================
# Volume
VOLUME ["/var/lib/peerplays", "/etc/peerplays"]
RUN \
wget https://github.com/zeromq/cppzmq/archive/refs/tags/v4.9.0.tar.gz && \
tar -xzvf v4.9.0.tar.gz && \
cd cppzmq-4.9.0 && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc) && \
make install && \
ldconfig && \
rm -rf /home/peerplays/src/*
# rpc service:
#===============================================================================
# gsl setup
#===============================================================================
RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libpcre3-dev
RUN \
wget https://github.com/imatix/gsl/archive/refs/tags/v4.1.4.tar.gz && \
tar -xzvf v4.1.4.tar.gz && \
cd gsl-4.1.4 && \
make -j$(nproc) && \
make install && \
rm -rf /home/peerplays/src/*
#===============================================================================
# libbitcoin-build setup
# libbitcoin-explorer setup
#===============================================================================
RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libsodium-dev
RUN \
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/*
#===============================================================================
# Doxygen setup
#===============================================================================
RUN \
sudo apt install -y bison flex && \
wget https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_8_17.tar.gz && \
tar -xvf Release_1_8_17.tar.gz && \
cd doxygen-Release_1_8_17 && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc) install && \
ldconfig
#===============================================================================
# Perl setup
#===============================================================================
RUN \
wget https://github.com/Perl/perl5/archive/refs/tags/v5.30.0.tar.gz && \
tar -xvf v5.30.0.tar.gz && \
cd perl5-5.30.0 && \
./Configure -des && \
make -j$(nproc) install && \
ldconfig
#===============================================================================
# Peerplays setup
#===============================================================================
## Clone Peerplays
#RUN \
# git clone https://gitlab.com/PBSA/peerplays.git && \
# cd peerplays && \
# git checkout develop && \
# git submodule update --init --recursive && \
# git branch --show-current && \
# git log --oneline -n 5
# Add local source
ADD . peerplays
# Configure Peerplays
RUN \
cd peerplays && \
git submodule update --init --recursive && \
git log --oneline -n 5 && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release ..
# Build Peerplays
RUN \
cd peerplays/build && \
make -j$(nproc) cli_wallet witness_node
WORKDIR /home/peerplays/peerplays-network
# Setup Peerplays runimage
RUN \
ln -s /home/peerplays/src/peerplays/build/programs/cli_wallet/cli_wallet ./ && \
ln -s /home/peerplays/src/peerplays/build/programs/witness_node/witness_node ./
RUN ./witness_node --create-genesis-json genesis.json && \
rm genesis.json
RUN chown peerplays:root -R /home/peerplays/peerplays-network
# Peerplays RPC
EXPOSE 8090
# p2p service:
EXPOSE 1776
# Peerplays P2P:
EXPOSE 9777
# default exec/config files
ADD docker/default_config.ini /etc/peerplays/config.ini
ADD docker/peerplaysentry.sh /usr/local/bin/peerplaysentry.sh
RUN chmod a+x /usr/local/bin/peerplaysentry.sh
# Make Docker send SIGINT instead of SIGTERM to the daemon
STOPSIGNAL SIGINT
# default execute entry
CMD ["/usr/local/bin/peerplaysentry.sh"]
# Peerplays
CMD ["./witness_node", "-d", "./witness_node_data_dir"]

219
Dockerfile.18.04 Normal file
View file

@ -0,0 +1,219 @@
FROM ubuntu:18.04
#===============================================================================
# Ubuntu setup
#===============================================================================
RUN \
apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-utils \
autoconf \
bash \
bison \
build-essential \
ca-certificates \
dnsutils \
expect \
flex \
git \
graphviz \
libbz2-dev \
libcurl4-openssl-dev \
libncurses-dev \
libsnappy-dev \
libssl-dev \
libtool \
libzip-dev \
locales \
lsb-release \
mc \
nano \
net-tools \
ntp \
openssh-server \
pkg-config \
python3 \
python3-jinja2 \
sudo \
systemd-coredump \
wget
ENV HOME /home/peerplays
RUN useradd -rm -d /home/peerplays -s /bin/bash -g root -G sudo -u 1000 peerplays
RUN echo "peerplays ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/peerplays
RUN chmod 440 /etc/sudoers.d/peerplays
RUN service ssh start
RUN echo 'peerplays:peerplays' | chpasswd
# SSH
EXPOSE 22
WORKDIR /home/peerplays/src
#===============================================================================
# Boost setup
#===============================================================================
RUN \
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.gz && \
tar -xzf boost_1_72_0.tar.gz && \
cd boost_1_72_0 && \
./bootstrap.sh && \
./b2 install && \
ldconfig && \
rm -rf /home/peerplays/src/*
#===============================================================================
# cmake setup
#===============================================================================
RUN \
wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh && \
chmod 755 ./cmake-3.24.2-linux-x86_64.sh && \
./cmake-3.24.2-linux-x86_64.sh --prefix=/usr --skip-license && \
cmake --version && \
rm -rf /home/peerplays/src/*
#===============================================================================
# libzmq setup
#===============================================================================
RUN \
wget https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.4.tar.gz && \
tar -xzvf v4.3.4.tar.gz && \
cd libzmq-4.3.4 && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc) && \
make install && \
ldconfig && \
rm -rf /home/peerplays/src/*
#===============================================================================
# cppzmq setup
#===============================================================================
RUN \
wget https://github.com/zeromq/cppzmq/archive/refs/tags/v4.9.0.tar.gz && \
tar -xzvf v4.9.0.tar.gz && \
cd cppzmq-4.9.0 && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc) && \
make install && \
ldconfig && \
rm -rf /home/peerplays/src/*
#===============================================================================
# gsl setup
#===============================================================================
RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libpcre3-dev
RUN \
wget https://github.com/imatix/gsl/archive/refs/tags/v4.1.4.tar.gz && \
tar -xzvf v4.1.4.tar.gz && \
cd gsl-4.1.4 && \
make -j$(nproc) && \
make install && \
rm -rf /home/peerplays/src/*
#===============================================================================
# libbitcoin-build setup
# libbitcoin-explorer setup
#===============================================================================
RUN \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libsodium-dev
RUN \
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/*
#===============================================================================
# Doxygen setup
#===============================================================================
RUN \
sudo apt install -y bison flex && \
wget https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_8_17.tar.gz && \
tar -xvf Release_1_8_17.tar.gz && \
cd doxygen-Release_1_8_17 && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc) install && \
ldconfig
#===============================================================================
# Perl setup
#===============================================================================
RUN \
wget https://github.com/Perl/perl5/archive/refs/tags/v5.30.0.tar.gz && \
tar -xvf v5.30.0.tar.gz && \
cd perl5-5.30.0 && \
./Configure -des && \
make -j$(nproc) install && \
ldconfig
#===============================================================================
# Peerplays setup
#===============================================================================
## Clone Peerplays
#RUN \
# git clone https://gitlab.com/PBSA/peerplays.git && \
# cd peerplays && \
# git checkout develop && \
# git submodule update --init --recursive && \
# git branch --show-current && \
# git log --oneline -n 5
# Add local source
ADD . peerplays
# Configure Peerplays
RUN \
cd peerplays && \
git submodule update --init --recursive && \
git symbolic-ref --short HEAD && \
git log --oneline -n 5 && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release ..
# Build Peerplays
RUN \
cd peerplays/build && \
make -j$(nproc) cli_wallet witness_node
WORKDIR /home/peerplays/peerplays-network
# Setup Peerplays runimage
RUN \
ln -s /home/peerplays/src/peerplays/build/programs/cli_wallet/cli_wallet ./ && \
ln -s /home/peerplays/src/peerplays/build/programs/witness_node/witness_node ./
RUN ./witness_node --create-genesis-json genesis.json && \
rm genesis.json
RUN chown peerplays:root -R /home/peerplays/peerplays-network
# Peerplays RPC
EXPOSE 8090
# Peerplays P2P:
EXPOSE 9777
# Peerplays
CMD ["./witness_node", "-d", "./witness_node_data_dir"]

343
Doxyfile
View file

@ -1,4 +1,4 @@
# Doxyfile 1.8.9.1
# Doxyfile 1.8.17
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@ -17,11 +17,11 @@
# Project related configuration options
#---------------------------------------------------------------------------
# This tag specifies the encoding used for all characters in the config file
# that follow. The default is UTF-8 which is also the encoding used for all text
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# This tag specifies the encoding used for all characters in the configuration
# file that follow. The default is UTF-8 which is also the encoding used for all
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
# iconv built into libc) for the transcoding. See
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
@ -93,6 +93,14 @@ ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all generated output in the proper direction.
# Possible values are: None, LTR, RTL and Context.
# The default value is: None.
OUTPUT_TEXT_DIRECTION = None
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
# descriptions after the members that are listed in the file and class
# documentation (similar to Javadoc). Set to NO to disable this.
@ -179,6 +187,16 @@ SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
# such as
# /***************
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
# Javadoc-style will behave just like regular comments and it will not be
# interpreted by doxygen.
# The default value is: NO.
JAVADOC_BANNER = NO
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
# line (until the first dot) of a Qt-style comment as the brief description. If
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
@ -226,7 +244,12 @@ TAB_SIZE = 4
# will allow you to put the command \sideeffect (or @sideeffect) in the
# documentation, which will result in a user-defined paragraph with heading
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
# newlines (in the resulting output). You can put ^^ in the value part of an
# alias to insert a newline as if a physical newline was in the original file.
# When you need a literal { or } or , in the value part of an alias you have to
# escape them by means of a backslash (\), this can lead to conflicts with the
# commands \{ and \} for these it is advised to use the version @{ and @} or use
# a double escape (\\{ and \\})
ALIASES =
@ -264,17 +287,26 @@ OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
# sources only. Doxygen will then generate output that is more tailored for that
# language. For instance, namespaces will be presented as modules, types will be
# separated into more groups, etc.
# The default value is: NO.
OPTIMIZE_OUTPUT_SLICE = NO
# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
# Fortran. In the later case the parser tries to guess whether the code is fixed
# or free formatted code, this is the default for Fortran type files), VHDL. For
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
# tries to guess whether the code is fixed or free formatted code, this is the
# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
# .inc files as Fortran files (default is PHP), and .f files as C (default is
# Fortran), use: inc=Fortran f=C.
#
# Note: For files without extension you can use no_extension as a placeholder.
#
@ -285,7 +317,7 @@ EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
# documentation. See http://daringfireball.net/projects/markdown/ for details.
# documentation. See https://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues.
@ -293,6 +325,15 @@ EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
# to that level are automatically included in the table of contents, even if
# they do not have an id attribute.
# Note: This feature currently applies only to Markdown headings.
# Minimum value: 0, maximum value: 99, default value: 5.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
TOC_INCLUDE_HEADINGS = 5
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by putting a % sign in front of the word or
@ -318,7 +359,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
# will parse them like normal C++ but will assume all classes use public instead
# of private inheritance when no explicit protection keyword is present.
# The default value is: NO.
@ -343,6 +384,13 @@ IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
# If one adds a struct or class to a group and this option is enabled, then also
# any nested class or struct is added to the same group. By default this option
# is disabled and one has to add nested compounds explicitly via \ingroup.
# The default value is: NO.
GROUP_NESTED_COMPOUNDS = NO
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
# (for instance a group of public functions) to be put as a subgroup of that
# type (e.g. under the Public Functions section). Set it to NO to prevent
@ -417,6 +465,12 @@ EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
# methods of a class will be included in the documentation.
# The default value is: NO.
EXTRACT_PRIV_VIRTUAL = NO
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
# The default value is: NO.
@ -471,8 +525,8 @@ HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# (class|struct|union) declarations. If set to NO, these declarations will be
# included in the documentation.
# declarations. If set to NO, these declarations will be included in the
# documentation.
# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = NO
@ -495,7 +549,7 @@ INTERNAL_DOCS = NO
# names in lower-case letters. If set to YES, upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
# (including Cygwin) ands Mac users are advised to set this option to NO.
# The default value is: system dependent.
CASE_SENSE_NAMES = NO
@ -682,7 +736,7 @@ LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references.
@ -727,11 +781,18 @@ WARN_IF_DOC_ERROR = YES
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
# value. If set to NO, doxygen will only warn about wrong or incomplete
# parameter documentation, but not about the absence of documentation.
# parameter documentation, but not about the absence of documentation. If
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
# The default value is: NO.
WARN_NO_PARAMDOC = NO
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
# a warning is encountered.
# The default value is: NO.
WARN_AS_ERROR = NO
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
# will be replaced by the file and line number from which the warning originated
@ -755,15 +816,19 @@ WARN_LOGFILE =
# The INPUT tag is used to specify the files and/or directories that contain
# documented source files. You may enter file names like myfile.cpp or
# directories like /usr/src/myproject. Separate the files or directories with
# spaces.
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = doc/main.dox libraries/chain libraries/chain/db libraries/app libraries/wallet
INPUT = doc/main.dox \
libraries/chain \
libraries/chain/db \
libraries/app \
libraries/wallet
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
# possible encodings.
# The default value is: UTF-8.
@ -771,12 +836,19 @@ INPUT_ENCODING = UTF-8
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
# *.h) to filter out the source-files in the directories. If left blank the
# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
# *.h) to filter out the source-files in the directories.
#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# read by doxygen.
#
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen
# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd,
# *.vhdl, *.ucf, *.qsf and *.ice.
FILE_PATTERNS =
@ -862,6 +934,10 @@ IMAGE_PATH =
# Note that the filter must not add or remove lines; it is applied before the
# code is scanned, but not when the output code is generated. If lines are added
# or removed, the anchors will not be placed correctly.
#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
INPUT_FILTER =
@ -871,6 +947,10 @@ INPUT_FILTER =
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
# patterns match the file name, INPUT_FILTER is applied.
#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
FILTER_PATTERNS =
@ -923,7 +1003,7 @@ INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
# function all documented functions referencing it will be listed.
# entity all documented functions referencing it will be listed.
# The default value is: NO.
REFERENCED_BY_RELATION = NO
@ -955,12 +1035,12 @@ SOURCE_TOOLTIPS = YES
# If the USE_HTAGS tag is set to YES then the references to source code will
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
# source browser. The htags tool is part of GNU's global source tagging system
# (see http://www.gnu.org/software/global/global.html). You will need version
# (see https://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
# - Install the latest version of global
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
# - Make sure the INPUT points to the root of the source tree
# - Run doxygen as normal
#
@ -982,6 +1062,35 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
# cost of reduced performance. This can be particularly helpful with template
# rich C++ code for which doxygen's built-in parser lacks the necessary type
# information.
# Note: The availability of this option depends on whether or not doxygen was
# generated with the -Duse_libclang=ON option for CMake.
# The default value is: NO.
CLANG_ASSISTED_PARSING = NO
# If clang assisted parsing is enabled you can provide the compiler with command
# line options that you would normally use when invoking the compiler. Note that
# the include paths will already be set by doxygen for the files and directories
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
CLANG_OPTIONS =
# If clang assisted parsing is enabled you can provide the clang parser with the
# path to the compilation database (see:
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
# were built. This is equivalent to specifying the "-p" option to a clang tool,
# such as clang-check. These options will then be passed to the parser.
# Note: The availability of this option depends on whether or not doxygen was
# generated with the -Duse_libclang=ON option for CMake.
CLANG_DATABASE_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
@ -1100,7 +1209,7 @@ HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
# purple, and 360 is red again.
# Minimum value: 0, maximum value: 359, default value: 220.
@ -1129,12 +1238,24 @@ HTML_COLORSTYLE_GAMMA = 80
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
# to NO can help when comparing the output of multiple runs.
# The default value is: YES.
# to YES can help to show when doxygen was last run and thus if the
# documentation is up to date.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_TIMESTAMP = YES
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
# are dynamically created via JavaScript. If disabled, the navigation index will
# consists of multiple levels of tabs that are statically embedded in every HTML
# page. Disable this option to support browsers that do not have JavaScript,
# like the Qt help browser.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_DYNAMIC_MENUS = YES
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded.
@ -1158,13 +1279,13 @@ HTML_INDEX_NUM_ENTRIES = 100
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
# environment (see: https://developer.apple.com/xcode/), introduced with OSX
# 10.5 (Leopard). To create a documentation set, doxygen will generate a
# Makefile in the HTML output directory. Running make will produce the docset in
# that directory and running make install will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
# genXcode/_index.html for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@ -1203,7 +1324,7 @@ DOCSET_PUBLISHER_NAME = Publisher
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
# Windows.
#
# The HTML Help Workshop contains a compiler that can convert all HTML output
@ -1279,7 +1400,7 @@ QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1287,7 +1408,7 @@ QHP_NAMESPACE = org.doxygen.Project
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1296,7 +1417,7 @@ QHP_VIRTUAL_FOLDER = doc
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
# filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1304,7 +1425,7 @@ QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
@ -1312,7 +1433,7 @@ QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
@ -1405,7 +1526,7 @@ EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
# supported properly for IE 6.0, but are supported on all modern browsers.
#
@ -1416,8 +1537,14 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
# to create new LaTeX commands to be used in formulas as building blocks. See
# the section "Including formulas" for details.
FORMULA_MACROFILE =
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# http://www.mathjax.org) which uses client side Javascript for the rendering
# https://www.mathjax.org) which uses client side JavaScript for the rendering
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
@ -1444,8 +1571,8 @@ MATHJAX_FORMAT = HTML-CSS
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
# Content Delivery Network so you can quickly see the result without installing
# MathJax. However, it is strongly recommended to install a local copy of
# MathJax from http://www.mathjax.org before deployment.
# The default value is: http://cdn.mathjax.org/mathjax/latest.
# MathJax from https://www.mathjax.org before deployment.
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
@ -1487,7 +1614,7 @@ MATHJAX_CODEFILE =
SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using Javascript. There
# implemented using a web server instead of a web client using JavaScript. There
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
# setting. When disabled, doxygen will generate a PHP script for searching and
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
@ -1506,7 +1633,7 @@ SERVER_BASED_SEARCH = NO
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/).
# Xapian (see: https://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@ -1519,7 +1646,7 @@ EXTERNAL_SEARCH = NO
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Xapian (see: https://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
@ -1571,21 +1698,35 @@ LATEX_OUTPUT = latex
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked.
#
# Note that when enabling USE_PDFLATEX this option is only used for generating
# bitmaps for formulas in the HTML output, but not in the Makefile that is
# written to the output directory.
# The default file is: latex.
# Note that when not enabling USE_PDFLATEX the default is latex when enabling
# USE_PDFLATEX the default is pdflatex and when in the later case latex is
# chosen this is overwritten by pdflatex. For specific output languages the
# default can have been set differently, this depends on the implementation of
# the output language.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_CMD_NAME = latex
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
# index for LaTeX.
# Note: This tag is used in the Makefile / make.bat.
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
# (.tex).
# The default file is: makeindex.
# This tag requires that the tag GENERATE_LATEX is set to YES.
MAKEINDEX_CMD_NAME = makeindex
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
# generate index for LaTeX. In case there is no backslash (\) as first character
# it will be automatically added in the LaTeX code.
# Note: This tag is used in the generated output file (.tex).
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
# The default value is: makeindex.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_MAKEINDEX_CMD = makeindex
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
# documents. This may be useful for small projects and may help to save some
# trees in general.
@ -1604,9 +1745,12 @@ COMPACT_LATEX = NO
PAPER_TYPE = a4
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. To get the times font for
# instance you can specify
# EXTRA_PACKAGES=times
# that should be included in the LaTeX output. The package can be specified just
# by its name or with the correct syntax as to be used with the LaTeX
# \usepackage command. To get the times font for instance you can specify :
# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
# To use the option intlimits with the amsmath package you can specify:
# EXTRA_PACKAGES=[intlimits]{amsmath}
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
@ -1703,12 +1847,28 @@ LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# The default value is: plain.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_BIB_STYLE = plain
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
# page will contain the date and time when the page was generated. Setting this
# to NO can help when comparing the output of multiple runs.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_TIMESTAMP = NO
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
# path from which the emoji images will be read. If a relative path is entered,
# it will be relative to the LATEX_OUTPUT directory. If left blank the
# LATEX_OUTPUT directory will be used.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_EMOJI_DIRECTORY =
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
@ -1748,9 +1908,9 @@ COMPACT_RTF = NO
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
# file, i.e. a series of assignments. You only have to provide replacements,
# missing definitions are set to their default value.
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# configuration file, i.e. a series of assignments. You only have to provide
# replacements, missing definitions are set to their default value.
#
# See also section "Doxygen usage" for information on how to generate the
# default style sheet that doxygen normally uses.
@ -1759,8 +1919,8 @@ RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config file. A template extensions file can be generated
# using doxygen -e rtf extensionFile.
# similar to doxygen's configuration file. A template extensions file can be
# generated using doxygen -e rtf extensionFile.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTENSIONS_FILE =
@ -1846,6 +2006,13 @@ XML_OUTPUT = xml
XML_PROGRAMLISTING = NO
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
# namespace members in file scope as well, matching the HTML output.
# The default value is: NO.
# This tag requires that the tag GENERATE_XML is set to YES.
XML_NS_MEMB_FILE_SCOPE = NO
#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
@ -1878,9 +2045,9 @@ DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
# structure of the code including all documentation. Note that this feature is
# still experimental and incomplete at the moment.
# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
# the structure of the code including all documentation. Note that this feature
# is still experimental and incomplete at the moment.
# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
@ -2047,12 +2214,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of 'which perl').
# The default file (with absolute path) is: /usr/bin/perl.
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@ -2066,15 +2227,6 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see:
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
MSCGEN_PATH =
# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
@ -2093,7 +2245,7 @@ HIDE_UNDOC_RELATIONS = YES
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is
# set to NO
# The default value is: NO.
# The default value is: YES.
HAVE_DOT = NO
@ -2207,7 +2359,8 @@ INCLUDED_BY_GRAPH = YES
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable call graphs for selected
# functions only using the \callgraph command.
# functions only using the \callgraph command. Disabling a call graph can be
# accomplished by means of the command \hidecallgraph.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
@ -2218,7 +2371,8 @@ CALL_GRAPH = NO
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable caller graphs for selected
# functions only using the \callergraph command.
# functions only using the \callergraph command. Disabling a caller graph can be
# accomplished by means of the command \hidecallergraph.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
@ -2241,11 +2395,17 @@ GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot.
# generated by dot. For an explanation of the image formats see the section
# output formats in the documentation of the dot tool (Graphviz (see:
# http://www.graphviz.org/)).
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
# to make the SVG files visible in IE 9+ (other browsers do not have this
# requirement).
# Possible values are: png, jpg, gif and svg.
# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
# png:gdiplus:gdiplus.
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.
@ -2296,6 +2456,11 @@ DIAFILE_DIRS =
PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
PLANTUML_CFG_FILE =
# When using plantuml, the specified paths are searched for files specified by
# the !include statement in a plantuml block.

225
README.md
View file

@ -2,100 +2,193 @@ Intro for new developers and witnesses
------------------------
This is a quick introduction to get new developers and witnesses up to speed on Peerplays blockchain. It is intended for witnesses plannig to join a live, already deployed blockchain.
# Building on Ubuntu 18.04 LTS and Installation Instructions
The following dependencies were necessary for a clean install of Ubuntu 18.04 LTS:
```
sudo apt-get install autoconf bash build-essential ca-certificates cmake \
doxygen git graphviz libbz2-dev libcurl4-openssl-dev libncurses-dev \
libreadline-dev libssl-dev libtool libzmq3-dev locales ntp pkg-config \
wget
# Building and Installation Instructions
Officially supported OS are Ubuntu 20.04 and Ubuntu 18.04.
## Ubuntu 20.04 and 18.04
Following dependencies are needed for a clean install of Ubuntu 20.04 and Ubuntu 18.04:
```
## Build Boost 1.67.0
```
mkdir $HOME/src
cd $HOME/src
export BOOST_ROOT=$HOME/src/boost_1_67_0
sudo apt-get update
sudo apt-get install -y autotools-dev build-essential libbz2-dev libicu-dev python-dev
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.bz2/download'\
-O boost_1_67_0.tar.bz2
tar xjf boost_1_67_0.tar.bz2
cd boost_1_67_0/
./bootstrap.sh "--prefix=$BOOST_ROOT"
./b2 install
sudo apt-get install \
autoconf bash bison build-essential ca-certificates dnsutils expect flex git \
graphviz libbz2-dev libcurl4-openssl-dev libncurses-dev libpcre3-dev \
libsnappy-dev libsodium-dev libssl-dev libtool libzip-dev locales lsb-release \
mc nano net-tools ntp openssh-server pkg-config python3 python3-jinja2 sudo \
systemd-coredump wget
```
## Building Peerplays
Boost libraries setup:
```
cd $HOME/src
export BOOST_ROOT=$HOME/src/boost_1_67_0
git clone https://github.com/peerplays-network/peerplays.git
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.gz
tar -xzf boost_1_72_0.tar.gz boost_1_72_0
cd boost_1_72_0
./bootstrap.sh
./b2
sudo ./b2 install
sudo ldconfig
```
cmake setup:
```
wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.sh
chmod 755 ./cmake-3.24.2-linux-x86_64.sh
sudo ./cmake-3.24.2-linux-x86_64.sh --prefix=/usr --skip-license
cmake --version
```
libzmq setup:
```
wget https://github.com/zeromq/libzmq/archive/refs/tags/v4.3.4.tar.gz
tar -xzvf v4.3.4.tar.gz
cd libzmq-4.3.4
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig
```
cppzmq setup:
```
wget https://github.com/zeromq/cppzmq/archive/refs/tags/v4.9.0.tar.gz
tar -xzvf v4.9.0.tar.gz
cd cppzmq-4.9.0
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig
```
gsl setup:
```
wget https://github.com/imatix/gsl/archive/refs/tags/v4.1.4.tar.gz
tar -xzvf v4.1.4.tar.gz
cd gsl-4.1.4
make -j$(nproc)
sudo make install
sudo ldconfig
```
libbitcoin-explorer setup:
```
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
```
Doxygen setup:
```
wget https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_8_17.tar.gz
tar -xvf Release_1_8_17.tar.gz
cd doxygen-Release_1_8_17
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
sudo ldconfig
```
Perl setup:
```
wget https://github.com/Perl/perl5/archive/refs/tags/v5.30.0.tar.gz
tar -xvf v5.30.0.tar.gz
cd perl5-5.30.0
./Configure -des
make -j$(nproc)
sudo make install
sudo ldconfig
```
Building Peerplays
```
git clone https://gitlab.com/PBSA/peerplays.git
cd peerplays
git submodule update --init --recursive
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release
# If you want to build Mainnet node
cmake -DCMAKE_BUILD_TYPE=Release
# If you want to build Testnet node
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1
# Update -j flag depending on your current system specs;
# Recommended 4GB of RAM per 1 CPU core
# make -j2 for 8GB RAM
# make -j4 for 16GB RAM
# make -j8 for 32GB RAM
make -j$(nproc)
make install # this can install the executable files under /usr/local
sudo make install # this can install the executable files under /usr/local
```
docker build -t peerplays .
## Docker image
## Docker images
Install docker, and add current user to docker group.
```
# Install docker
sudo apt install docker.io
# Add current user to docker group
sudo usermod -a -G docker $USER
# You need to restart your shell session, to apply group membership
# Type 'groups' to verify that you are a member of a docker group
# Build docker image (from the project root, must be a docker group member)
docker build -t peerplays .
# Start docker image
docker start peerplays
# Exposed ports
# # rpc service:
# EXPOSE 8090
# # p2p service:
# EXPOSE 1776
```
Rest of the instructions on starting the chain remains same.
### Official docker image for Peerplas Mainnet
```
docker pull datasecuritynode/peerplays:latest
```
### Building docker images manually
```
# Checkout the code
git clone https://gitlab.com/PBSA/peerplays.git
cd peerplays
# Checkout the branch you want
# E.g.
# git checkout beatrice
# git checkout develop
git checkout master
git submodule update --init --recursive
# Execute from the project root, must be a docker group member
# Build docker image, using Ubuntu 20.04 base
docker build --no-cache -f Dockerfile -t peerplays .
# Build docker image, using Ubuntu 18.04 base
docker build --no-cache -f Dockerfile.18.04 -t peerplays-18-04 .
```
### Start docker image
```
# Start docker image, using Ubuntu 20.04 base
docker run peerplays:latest
# Start docker image, using Ubuntu 18.04 base
docker run peerplays-18-04:latest
```
Rest of the instructions on starting the chain remains same.
Starting A Peerplays Node
-----------------
For Ubuntu 14.04 LTS and up users, see
[this](https://github.com/cryptonomex/graphene/wiki/build-ubuntu) and
then proceed with:
git clone https://github.com/peerplays-network/peerplays.git
cd peerplays
git submodule update --init --recursive
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release .
make
./programs/witness_node/witness_node
Launching the witness creates required directories. Next, **stop the witness** and continue.
$ vi witness_node_data_dir/config.ini
p2p-endpoint = 0.0.0.0:9777
rpc-endpoint = 127.0.0.1:8090
seed-node = 213.184.225.234:59500
Start the witness back up
./programs/witness_node/witness_node
@ -155,7 +248,7 @@ Create your witness (substitute the url for your witness information)
```
create_witness your_witness_username "url" true
```
**Be sure to take note of the block_signing_key**
**Be sure to take note of the block_signing_key**
IMPORTANT (issue below command using block_signing_key just obtained)
```

View file

@ -1,794 +0,0 @@
# This is the CMakeCache file.
# For build in directory: /home/pbattu/git/18.04/peerplays
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//No help, variable specified on the command line.
BOOST_ROOT:PATH=/home/pbattu/git/18.04/boost_1_67_0
//The threading library used by boost-thread
BOOST_THREAD_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpthread.so
//Build bitshares executables (witness node, cli wallet, etc)
BUILD_BITSHARES_PROGRAMS:BOOL=TRUE
//Build bitshares unit tests
BUILD_BITSHARES_TESTS:BOOL=TRUE
//Build websocketpp examples.
BUILD_EXAMPLES:BOOL=OFF
//Build websocketpp tests.
BUILD_TESTS:BOOL=OFF
//Value Computed by CMake
BitShares_BINARY_DIR:STATIC=/home/pbattu/git/18.04/peerplays
//Value Computed by CMake
BitShares_SOURCE_DIR:STATIC=/home/pbattu/git/18.04/peerplays
//Boost chrono library (debug)
Boost_CHRONO_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_chrono.a
//Boost chrono library (release)
Boost_CHRONO_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_chrono.a
//Boost context library (debug)
Boost_CONTEXT_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_context.a
//Boost context library (release)
Boost_CONTEXT_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_context.a
//Boost coroutine library (debug)
Boost_COROUTINE_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_coroutine.a
//Boost coroutine library (release)
Boost_COROUTINE_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_coroutine.a
//Boost date_time library (debug)
Boost_DATE_TIME_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_date_time.a
//Boost date_time library (release)
Boost_DATE_TIME_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_date_time.a
//The directory containing a CMake configuration file for Boost.
Boost_DIR:PATH=Boost_DIR-NOTFOUND
//Boost filesystem library (debug)
Boost_FILESYSTEM_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_filesystem.a
//Boost filesystem library (release)
Boost_FILESYSTEM_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_filesystem.a
//Path to a file.
Boost_INCLUDE_DIR:PATH=/home/pbattu/git/18.04/boost_1_67_0/include
//Boost iostreams library (debug)
Boost_IOSTREAMS_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_iostreams.a
//Boost iostreams library (release)
Boost_IOSTREAMS_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_iostreams.a
//Boost library directory
Boost_LIBRARY_DIR:PATH=/home/pbattu/git/18.04/boost_1_67_0/lib
//Boost library directory DEBUG
Boost_LIBRARY_DIR_DEBUG:PATH=/home/pbattu/git/18.04/boost_1_67_0/lib
//Boost library directory RELEASE
Boost_LIBRARY_DIR_RELEASE:PATH=/home/pbattu/git/18.04/boost_1_67_0/lib
//Boost locale library (debug)
Boost_LOCALE_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_locale.a
//Boost locale library (release)
Boost_LOCALE_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_locale.a
//Boost program_options library (debug)
Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_program_options.a
//Boost program_options library (release)
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_program_options.a
//Boost serialization library (debug)
Boost_SERIALIZATION_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_serialization.a
//Boost serialization library (release)
Boost_SERIALIZATION_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_serialization.a
//Boost signals library (debug)
Boost_SIGNALS_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_signals.a
//Boost signals library (release)
Boost_SIGNALS_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_signals.a
//Boost system library (debug)
Boost_SYSTEM_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_system.a
//Boost system library (release)
Boost_SYSTEM_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_system.a
//Boost thread library (debug)
Boost_THREAD_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_thread.a
//Boost thread library (release)
Boost_THREAD_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_thread.a
//Boost unit_test_framework library (debug)
Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_unit_test_framework.a
//Boost unit_test_framework library (release)
Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE:FILEPATH=/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_unit_test_framework.a
//ON or OFF
Boost_USE_STATIC_LIBS:STRING=ON
//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=Debug
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//Configurations
CMAKE_CONFIGURATION_TYPES:STRING=Release;RelWithDebInfo;Debug
//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-5
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-5
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-5
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release builds for minimum
// size.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during release builds with debug info.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//C compiler
CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-5
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-5
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-5
//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release builds for minimum
// size.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during release builds with debug info.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
//Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld
//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=BitShares
//Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Path to a library.
CURSES_CURSES_LIBRARY:FILEPATH=CURSES_CURSES_LIBRARY-NOTFOUND
//Path to a library.
CURSES_FORM_LIBRARY:FILEPATH=CURSES_FORM_LIBRARY-NOTFOUND
//Path to a file.
CURSES_INCLUDE_PATH:PATH=CURSES_INCLUDE_PATH-NOTFOUND
//Path to a library.
CURSES_NCURSES_LIBRARY:FILEPATH=CURSES_NCURSES_LIBRARY-NOTFOUND
//Dot tool for use with Doxygen
DOXYGEN_DOT_EXECUTABLE:FILEPATH=DOXYGEN_DOT_EXECUTABLE-NOTFOUND
//Doxygen documentation generation tool (http://www.doxygen.org)
DOXYGEN_EXECUTABLE:FILEPATH=DOXYGEN_EXECUTABLE-NOTFOUND
//secp256k1 or openssl or mixed
ECC_IMPL:STRING=secp256k1
//Build BitShares for code coverage analysis
ENABLE_COVERAGE_TESTING:BOOL=FALSE
//Build websocketpp with CPP11 features enabled.
ENABLE_CPP11:BOOL=ON
//TRUE to try to use full zlib for compression, FALSE to use miniz.c
FC_USE_FULL_ZLIB:BOOL=FALSE
//Git command line client
GIT_EXECUTABLE:FILEPATH=/usr/bin/git
//location of the genesis.json to embed in the executable
GRAPHENE_EGENESIS_JSON:PATH=/home/pbattu/git/18.04/peerplays/genesis.json
//The directory containing a CMake configuration file for Gperftools.
Gperftools_DIR:PATH=Gperftools_DIR-NOTFOUND
//Installation directory for CMake files
INSTALL_CMAKE_DIR:PATH=lib/cmake/websocketpp
//Installation directory for header files
INSTALL_INCLUDE_DIR:PATH=include
//Log long API calls over websocket (ON OR OFF)
LOG_LONG_API:BOOL=ON
//Max API execution time in ms
LOG_LONG_API_MAX_MS:STRING=1000
//API execution time in ms at which to warn
LOG_LONG_API_WARN_MS:STRING=750
//Path to a library.
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcrypto.a
//Path to a file.
OPENSSL_INCLUDE_DIR:PATH=/usr/include
//Path to a library.
OPENSSL_SSL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libssl.a
//Path to a program.
PERL_EXECUTABLE:FILEPATH=/usr/bin/perl
//pkg-config executable
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config
//Path to a file.
READLINE_INCLUDE_DIR:PATH=/usr/include
//Path to a library.
READLINE_LIBRARIES:FILEPATH=/usr/lib/x86_64-linux-gnu/libreadline.so
//Path to a file.
Readline_INCLUDE_DIR:PATH=/usr/include
//Path to a library.
Readline_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libreadline.so
//Path to a file.
Readline_ROOT_DIR:PATH=/usr
//OFF
UNITY_BUILD:BOOL=OFF
//Path to a file.
ZLIB_INCLUDE_DIR:PATH=/usr/include
//Path to a library.
ZLIB_LIBRARY_DEBUG:FILEPATH=ZLIB_LIBRARY_DEBUG-NOTFOUND
//Path to a library.
ZLIB_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libz.so
//Value Computed by CMake
fc_BINARY_DIR:STATIC=/home/pbattu/git/18.04/peerplays/libraries/fc
//Dependencies for the target
fc_LIB_DEPENDS:STATIC=general;-L/usr/local/lib;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_thread.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_date_time.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_filesystem.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_system.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_program_options.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_signals.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_serialization.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_chrono.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_unit_test_framework.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_context.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_locale.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_iostreams.a;general;/home/pbattu/git/18.04/boost_1_67_0/lib/libboost_coroutine.a;general;/usr/lib/x86_64-linux-gnu/libpthread.so;general;/usr/lib/x86_64-linux-gnu/libssl.a;general;/usr/lib/x86_64-linux-gnu/libcrypto.a;general;/usr/lib/x86_64-linux-gnu/libz.so;general;dl;general;rt;general;/usr/lib/x86_64-linux-gnu/libreadline.so;general;secp256k1;
//Value Computed by CMake
fc_SOURCE_DIR:STATIC=/home/pbattu/git/18.04/peerplays/libraries/fc
//Dependencies for the target
graphene_account_history_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_accounts_list_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_affiliate_stats_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_app_LIB_DEPENDS:STATIC=general;graphene_market_history;general;graphene_account_history;general;graphene_accounts_list;general;graphene_affiliate_stats;general;graphene_chain;general;fc;general;graphene_db;general;graphene_net;general;graphene_time;general;graphene_utilities;general;graphene_debug_witness;general;graphene_bookie;
//Dependencies for the target
graphene_bookie_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_chain_LIB_DEPENDS:STATIC=general;fc;general;graphene_db;
//Dependencies for the target
graphene_db_LIB_DEPENDS:STATIC=general;fc;
//Dependencies for the target
graphene_debug_witness_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_delayed_node_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_egenesis_brief_LIB_DEPENDS:STATIC=general;graphene_chain;general;fc;
//Dependencies for the target
graphene_egenesis_full_LIB_DEPENDS:STATIC=general;graphene_chain;general;fc;
//Dependencies for the target
graphene_egenesis_none_LIB_DEPENDS:STATIC=general;graphene_chain;general;fc;
//Dependencies for the target
graphene_generate_genesis_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;general;graphene_time;
//Dependencies for the target
graphene_generate_uia_sharedrop_genesis_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;general;graphene_time;
//Dependencies for the target
graphene_market_history_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_net_LIB_DEPENDS:STATIC=general;fc;general;graphene_db;
//Dependencies for the target
graphene_snapshot_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Dependencies for the target
graphene_time_LIB_DEPENDS:STATIC=general;fc;
//Dependencies for the target
graphene_utilities_LIB_DEPENDS:STATIC=general;fc;
//Dependencies for the target
graphene_wallet_LIB_DEPENDS:STATIC=general;graphene_app;general;graphene_net;general;graphene_chain;general;graphene_utilities;general;fc;general;dl;
//Dependencies for the target
graphene_witness_LIB_DEPENDS:STATIC=general;graphene_chain;general;graphene_app;
//Value Computed by CMake
websocketpp_BINARY_DIR:STATIC=/home/pbattu/git/18.04/peerplays/libraries/fc/vendor/websocketpp
//Value Computed by CMake
websocketpp_SOURCE_DIR:STATIC=/home/pbattu/git/18.04/peerplays/libraries/fc/vendor/websocketpp
########################
# INTERNAL cache entries
########################
//ADVANCED property for variable: BOOST_ROOT
BOOST_ROOT-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_CHRONO_LIBRARY_DEBUG
Boost_CHRONO_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_CHRONO_LIBRARY_RELEASE
Boost_CHRONO_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_CONTEXT_LIBRARY_DEBUG
Boost_CONTEXT_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_CONTEXT_LIBRARY_RELEASE
Boost_CONTEXT_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_COROUTINE_LIBRARY_DEBUG
Boost_COROUTINE_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_COROUTINE_LIBRARY_RELEASE
Boost_COROUTINE_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_DATE_TIME_LIBRARY_DEBUG
Boost_DATE_TIME_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_DATE_TIME_LIBRARY_RELEASE
Boost_DATE_TIME_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_DIR
Boost_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_FILESYSTEM_LIBRARY_DEBUG
Boost_FILESYSTEM_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_FILESYSTEM_LIBRARY_RELEASE
Boost_FILESYSTEM_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_INCLUDE_DIR
Boost_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_IOSTREAMS_LIBRARY_DEBUG
Boost_IOSTREAMS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_IOSTREAMS_LIBRARY_RELEASE
Boost_IOSTREAMS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_LIBRARY_DIR
Boost_LIBRARY_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_LIBRARY_DIR_DEBUG
Boost_LIBRARY_DIR_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_LIBRARY_DIR_RELEASE
Boost_LIBRARY_DIR_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_LOCALE_LIBRARY_DEBUG
Boost_LOCALE_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_LOCALE_LIBRARY_RELEASE
Boost_LOCALE_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG
Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_SERIALIZATION_LIBRARY_DEBUG
Boost_SERIALIZATION_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_SERIALIZATION_LIBRARY_RELEASE
Boost_SERIALIZATION_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_SIGNALS_LIBRARY_DEBUG
Boost_SIGNALS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_SIGNALS_LIBRARY_RELEASE
Boost_SIGNALS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_SYSTEM_LIBRARY_DEBUG
Boost_SYSTEM_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_SYSTEM_LIBRARY_RELEASE
Boost_SYSTEM_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_THREAD_LIBRARY_DEBUG
Boost_THREAD_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_THREAD_LIBRARY_RELEASE
Boost_THREAD_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG
Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE
Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/home/pbattu/git/18.04/peerplays
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=10
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Have symbol pthread_create
CMAKE_HAVE_LIBC_CREATE:INTERNAL=
//Have library pthreads
CMAKE_HAVE_PTHREADS_CREATE:INTERNAL=
//Have library pthread
CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1
//Have include pthread.h
CMAKE_HAVE_PTHREAD_H:INTERNAL=1
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/home/pbattu/git/18.04/peerplays
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=37
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.10
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/bin/uname
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CURSES_CURSES_LIBRARY
CURSES_CURSES_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CURSES_FORM_LIBRARY
CURSES_FORM_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CURSES_INCLUDE_PATH
CURSES_INCLUDE_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CURSES_NCURSES_LIBRARY
CURSES_NCURSES_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: DOXYGEN_DOT_EXECUTABLE
DOXYGEN_DOT_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: DOXYGEN_EXECUTABLE
DOXYGEN_EXECUTABLE-ADVANCED:INTERNAL=1
//Details about finding OpenSSL
FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL:INTERNAL=[/usr/lib/x86_64-linux-gnu/libcrypto.a][/usr/include][v1.1.0g()]
//Details about finding Perl
FIND_PACKAGE_MESSAGE_DETAILS_Perl:INTERNAL=[/usr/bin/perl][v5.26.1()]
//Details about finding Readline
FIND_PACKAGE_MESSAGE_DETAILS_Readline:INTERNAL=[/usr/include][/usr/lib/x86_64-linux-gnu/libreadline.so][v()]
//Details about finding Threads
FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()]
//Details about finding ZLIB
FIND_PACKAGE_MESSAGE_DETAILS_ZLIB:INTERNAL=[/usr/lib/x86_64-linux-gnu/libz.so][/usr/include][v1.2.11()]
//ADVANCED property for variable: GIT_EXECUTABLE
GIT_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENSSL_CRYPTO_LIBRARY
OPENSSL_CRYPTO_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OPENSSL_SSL_LIBRARY
OPENSSL_SSL_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PERL_EXECUTABLE
PERL_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PKG_CONFIG_EXECUTABLE
PKG_CONFIG_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Readline_INCLUDE_DIR
Readline_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Readline_LIBRARY
Readline_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Readline_ROOT_DIR
Readline_ROOT_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ZLIB_INCLUDE_DIR
ZLIB_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ZLIB_LIBRARY_DEBUG
ZLIB_LIBRARY_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: ZLIB_LIBRARY_RELEASE
ZLIB_LIBRARY_RELEASE-ADVANCED:INTERNAL=1
//Last used BOOST_ROOT value.
_BOOST_ROOT_LAST:INTERNAL=/home/pbattu/git/18.04/boost_1_67_0
//Components requested for this build tree.
_Boost_COMPONENTS_SEARCHED:INTERNAL=chrono;context;coroutine;date_time;filesystem;iostreams;locale;program_options;serialization;signals;system;thread;unit_test_framework
//Last used Boost_INCLUDE_DIR value.
_Boost_INCLUDE_DIR_LAST:INTERNAL=/home/pbattu/git/18.04/boost_1_67_0/include
//Last used Boost_LIBRARY_DIR_DEBUG value.
_Boost_LIBRARY_DIR_DEBUG_LAST:INTERNAL=/home/pbattu/git/18.04/boost_1_67_0/lib
//Last used Boost_LIBRARY_DIR value.
_Boost_LIBRARY_DIR_LAST:INTERNAL=/home/pbattu/git/18.04/boost_1_67_0/lib
//Last used Boost_LIBRARY_DIR_RELEASE value.
_Boost_LIBRARY_DIR_RELEASE_LAST:INTERNAL=/home/pbattu/git/18.04/boost_1_67_0/lib
//Last used Boost_NAMESPACE value.
_Boost_NAMESPACE_LAST:INTERNAL=boost
//Last used Boost_USE_MULTITHREADED value.
_Boost_USE_MULTITHREADED_LAST:INTERNAL=TRUE
//Last used Boost_USE_STATIC_LIBS value.
_Boost_USE_STATIC_LIBS_LAST:INTERNAL=ON
_OPENSSL_CFLAGS:INTERNAL=
_OPENSSL_CFLAGS_I:INTERNAL=
_OPENSSL_CFLAGS_OTHER:INTERNAL=
_OPENSSL_FOUND:INTERNAL=1
_OPENSSL_INCLUDEDIR:INTERNAL=/usr/include
_OPENSSL_INCLUDE_DIRS:INTERNAL=
_OPENSSL_LDFLAGS:INTERNAL=-lssl;-lcrypto
_OPENSSL_LDFLAGS_OTHER:INTERNAL=
_OPENSSL_LIBDIR:INTERNAL=/usr/lib/x86_64-linux-gnu
_OPENSSL_LIBRARIES:INTERNAL=ssl;crypto
_OPENSSL_LIBRARY_DIRS:INTERNAL=
_OPENSSL_LIBS:INTERNAL=
_OPENSSL_LIBS_L:INTERNAL=
_OPENSSL_LIBS_OTHER:INTERNAL=
_OPENSSL_LIBS_PATHS:INTERNAL=
_OPENSSL_PREFIX:INTERNAL=/usr
_OPENSSL_STATIC_CFLAGS:INTERNAL=
_OPENSSL_STATIC_CFLAGS_I:INTERNAL=
_OPENSSL_STATIC_CFLAGS_OTHER:INTERNAL=
_OPENSSL_STATIC_INCLUDE_DIRS:INTERNAL=
_OPENSSL_STATIC_LDFLAGS:INTERNAL=-lssl;-ldl;-lcrypto;-ldl
_OPENSSL_STATIC_LDFLAGS_OTHER:INTERNAL=
_OPENSSL_STATIC_LIBDIR:INTERNAL=
_OPENSSL_STATIC_LIBRARIES:INTERNAL=ssl;dl;crypto;dl
_OPENSSL_STATIC_LIBRARY_DIRS:INTERNAL=
_OPENSSL_STATIC_LIBS:INTERNAL=
_OPENSSL_STATIC_LIBS_L:INTERNAL=
_OPENSSL_STATIC_LIBS_OTHER:INTERNAL=
_OPENSSL_STATIC_LIBS_PATHS:INTERNAL=
_OPENSSL_VERSION:INTERNAL=1.1.0g
_OPENSSL_openssl_INCLUDEDIR:INTERNAL=
_OPENSSL_openssl_LIBDIR:INTERNAL=
_OPENSSL_openssl_PREFIX:INTERNAL=
_OPENSSL_openssl_VERSION:INTERNAL=
__pkg_config_arguments__OPENSSL:INTERNAL=QUIET;openssl
__pkg_config_checked__OPENSSL:INTERNAL=1
prefix_result:INTERNAL=/usr/lib/x86_64-linux-gnu

6
clang-format.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
find ./libraries/app -regex ".*[c|h]pp" | xargs clang-format -i
find ./libraries/chain/hardfork.d -regex ".*hf" | xargs clang-format -i
find ./libraries/plugins/peerplays_sidechain -regex ".*[c|h]pp" | xargs clang-format -i
find ./programs/cli_wallet -regex ".*[c|h]pp" | xargs clang-format -i

View file

@ -1,61 +0,0 @@
# Endpoint for P2P node to listen on
p2p-endpoint = 0.0.0.0:9090
# P2P nodes to connect to on startup (may specify multiple times)
# seed-node =
# JSON array of P2P nodes to connect to on startup
# seed-nodes =
# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =
# Endpoint for websocket RPC to listen on
rpc-endpoint = 0.0.0.0:8090
# Endpoint for TLS websocket RPC to listen on
# rpc-tls-endpoint =
# The TLS certificate file for this server
# server-pem =
# Password for this certificate
# server-pem-password =
# File to read Genesis State from
# genesis-json =
# Block signing key to use for init witnesses, overrides genesis file
# dbg-init-key =
# JSON file specifying API permissions
# api-access =
# Enable block production, even if the chain is stale.
enable-stale-production = false
# Percent of witnesses (0-99) that must be participating in order to produce blocks
required-participation = false
# ID of witness controlled by this node (e.g. "1.6.5", quotes are required, may specify multiple times)
# witness-id =
# Tuple of [PublicKey, WIF private key] (may specify multiple times)
# private-key = ["BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
# Account ID to track history for (may specify multiple times)
# track-account =
# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers
# bucket-size = [15,60,300,3600,86400]
bucket-size = [60,300,900,1800,3600,14400,86400]
# for 1 min, 5 mins, 30 mins, 1h, 4 hs and 1 day. i think this should be the default.
# How far back in time to track history for each bucket size, measured in the number of buckets (default: 1000)
history-per-size = 1000
# Max amount of operations to store in the database, per account (drastically reduces RAM requirements)
max-ops-per-account = 1000
# Remove old operation history # objects from RAM
partial-operations = true

View file

@ -1,82 +0,0 @@
#!/bin/bash
PEERPLAYSD="/usr/local/bin/witness_node"
# For blockchain download
VERSION=`cat /etc/peerplays/version`
## Supported Environmental Variables
#
# * $PEERPLAYSD_SEED_NODES
# * $PEERPLAYSD_RPC_ENDPOINT
# * $PEERPLAYSD_PLUGINS
# * $PEERPLAYSD_REPLAY
# * $PEERPLAYSD_RESYNC
# * $PEERPLAYSD_P2P_ENDPOINT
# * $PEERPLAYSD_WITNESS_ID
# * $PEERPLAYSD_PRIVATE_KEY
# * $PEERPLAYSD_TRACK_ACCOUNTS
# * $PEERPLAYSD_PARTIAL_OPERATIONS
# * $PEERPLAYSD_MAX_OPS_PER_ACCOUNT
# * $PEERPLAYSD_TRUSTED_NODE
#
ARGS=""
# Translate environmental variables
if [[ ! -z "$PEERPLAYSD_SEED_NODES" ]]; then
for NODE in $PEERPLAYSD_SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
done
fi
if [[ ! -z "$PEERPLAYSD_RPC_ENDPOINT" ]]; then
ARGS+=" --rpc-endpoint=${PEERPLAYSD_RPC_ENDPOINT}"
fi
if [[ ! -z "$PEERPLAYSD_REPLAY" ]]; then
ARGS+=" --replay-blockchain"
fi
if [[ ! -z "$PEERPLAYSD_RESYNC" ]]; then
ARGS+=" --resync-blockchain"
fi
if [[ ! -z "$PEERPLAYSD_P2P_ENDPOINT" ]]; then
ARGS+=" --p2p-endpoint=${PEERPLAYSD_P2P_ENDPOINT}"
fi
if [[ ! -z "$PEERPLAYSD_WITNESS_ID" ]]; then
ARGS+=" --witness-id=$PEERPLAYSD_WITNESS_ID"
fi
if [[ ! -z "$PEERPLAYSD_PRIVATE_KEY" ]]; then
ARGS+=" --private-key=$PEERPLAYSD_PRIVATE_KEY"
fi
if [[ ! -z "$PEERPLAYSD_TRACK_ACCOUNTS" ]]; then
for ACCOUNT in $PEERPLAYSD_TRACK_ACCOUNTS ; do
ARGS+=" --track-account=$ACCOUNT"
done
fi
if [[ ! -z "$PEERPLAYSD_PARTIAL_OPERATIONS" ]]; then
ARGS+=" --partial-operations=${PEERPLAYSD_PARTIAL_OPERATIONS}"
fi
if [[ ! -z "$PEERPLAYSD_MAX_OPS_PER_ACCOUNT" ]]; then
ARGS+=" --max-ops-per-account=${PEERPLAYSD_MAX_OPS_PER_ACCOUNT}"
fi
if [[ ! -z "$PEERPLAYSD_TRUSTED_NODE" ]]; then
ARGS+=" --trusted-node=${PEERPLAYSD_TRUSTED_NODE}"
fi
## Link the peerplays config file into home
## This link has been created in Dockerfile, already
ln -f -s /etc/peerplays/config.ini /var/lib/peerplays
# Plugins need to be provided in a space-separated list, which
# makes it necessary to write it like this
if [[ ! -z "$PEERPLAYSD_PLUGINS" ]]; then
$PEERPLAYSD --data-dir ${HOME} ${ARGS} ${PEERPLAYSD_ARGS} --plugins "${PEERPLAYSD_PLUGINS}"
else
$PEERPLAYSD --data-dir ${HOME} ${ARGS} ${PEERPLAYSD_ARGS}
fi

2
docs

@ -1 +1 @@
Subproject commit 8d8b69d82482101279460fa02f814d0e4030966f
Subproject commit 1e924950c2f92b166c34ceb294e8b8c4997a6c4e

216158
genesis-mainnet.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,11 @@
add_subdirectory( fc )
add_subdirectory( db )
#add_subdirectory( deterministic_openssl_rand )
add_subdirectory( app )
add_subdirectory( chain )
add_subdirectory( db )
add_subdirectory( egenesis )
add_subdirectory( fc )
add_subdirectory( net )
#add_subdirectory( p2p )
add_subdirectory( plugins )
add_subdirectory( sha3 )
add_subdirectory( time )
add_subdirectory( utilities )
add_subdirectory( app )
add_subdirectory( plugins )
add_subdirectory( wallet )

View file

@ -4,16 +4,18 @@ file(GLOB EGENESIS_HEADERS "../egenesis/include/graphene/app/*.hpp")
add_library( graphene_app
api.cpp
application.cpp
config_util.cpp
database_api.cpp
plugin.cpp
config_util.cpp
${HEADERS}
${EGENESIS_HEADERS}
)
# need to link graphene_debug_witness because plugins aren't sufficiently isolated #246
#target_link_libraries( graphene_app graphene_market_history graphene_account_history graphene_chain fc graphene_db graphene_net graphene_utilities graphene_debug_witness )
target_link_libraries( graphene_app graphene_market_history graphene_account_history graphene_accounts_list graphene_affiliate_stats graphene_chain fc graphene_db graphene_net graphene_time graphene_utilities graphene_debug_witness graphene_bookie peerplays_sidechain graphene_elasticsearch)
target_link_libraries( graphene_app
PUBLIC graphene_net graphene_utilities
graphene_account_history graphene_accounts_list graphene_affiliate_stats graphene_bookie graphene_debug_witness graphene_elasticsearch graphene_es_objects graphene_generate_genesis graphene_market_history peerplays_sidechain )
target_include_directories( graphene_app
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
@ -31,3 +33,25 @@ INSTALL( TARGETS
ARCHIVE DESTINATION lib
)
INSTALL( FILES ${HEADERS} DESTINATION "include/graphene/app" )
add_library( graphene_plugin
plugin.cpp
include/graphene/app/plugin.hpp
)
target_link_libraries( graphene_plugin
PUBLIC graphene_net graphene_utilities )
target_include_directories( graphene_plugin
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
INSTALL( TARGETS
graphene_app
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -25,36 +25,36 @@
#include <graphene/app/config_util.hpp>
#include <graphene/chain/config.hpp>
#include <fc/reflect/variant.hpp>
#include <fc/string.hpp>
#include <fc/exception/exception.hpp>
#include <fc/log/console_appender.hpp>
#include <fc/log/file_appender.hpp>
#include <fc/log/logger_config.hpp>
#include <fc/reflect/variant.hpp>
#include <fc/string.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <fstream>
namespace bpo = boost::program_options;
class deduplicator
{
class deduplicator {
public:
deduplicator() : modifier(nullptr) {}
deduplicator() :
modifier(nullptr) {
}
deduplicator(const boost::shared_ptr<bpo::option_description> (*mod_fn)(const boost::shared_ptr<bpo::option_description>&))
: modifier(mod_fn) {}
deduplicator(const boost::shared_ptr<bpo::option_description> (*mod_fn)(const boost::shared_ptr<bpo::option_description> &)) :
modifier(mod_fn) {
}
const boost::shared_ptr<bpo::option_description> next(const boost::shared_ptr<bpo::option_description>& o)
{
const boost::shared_ptr<bpo::option_description> next(const boost::shared_ptr<bpo::option_description> &o) {
const std::string name = o->long_name();
if( seen.find( name ) != seen.end() )
if (seen.find(name) != seen.end())
return nullptr;
seen.insert(name);
return modifier ? modifier(o) : o;
@ -62,15 +62,14 @@ public:
private:
boost::container::flat_set<std::string> seen;
const boost::shared_ptr<bpo::option_description> (*modifier)(const boost::shared_ptr<bpo::option_description>&);
const boost::shared_ptr<bpo::option_description> (*modifier)(const boost::shared_ptr<bpo::option_description> &);
};
// Currently, you can only specify the filenames and logging levels, which
// are all most users would want to change. At a later time, options can
// be added to control rotation intervals, compression, and other seldom-
// used features
static void write_default_logging_config_to_stream(std::ostream& out)
{
static void write_default_logging_config_to_stream(std::ostream &out) {
out << "# declare an appender named \"stderr\" that writes messages to the console\n"
"[log.console_appender.stderr]\n"
"stream=std_error\n\n"
@ -115,26 +114,22 @@ static void write_default_logging_config_to_stream(std::ostream& out)
// logging config is too complicated to be parsed by boost::program_options,
// so we do it by hand
static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const fc::path& config_ini_filename)
{
try
{
static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const fc::path &config_ini_filename) {
try {
fc::logging_config logging_config;
bool found_logging_config = false;
boost::property_tree::ptree config_ini_tree;
boost::property_tree::ini_parser::read_ini(config_ini_filename.preferred_string().c_str(), config_ini_tree);
for (const auto& section : config_ini_tree)
{
const std::string& section_name = section.first;
const boost::property_tree::ptree& section_tree = section.second;
for (const auto &section : config_ini_tree) {
const std::string &section_name = section.first;
const boost::property_tree::ptree &section_tree = section.second;
const std::string console_appender_section_prefix = "log.console_appender.";
const std::string file_appender_section_prefix = "log.file_appender.";
const std::string logger_section_prefix = "logger.";
if (boost::starts_with(section_name, console_appender_section_prefix))
{
if (boost::starts_with(section_name, console_appender_section_prefix)) {
std::string console_appender_name = section_name.substr(console_appender_section_prefix.length());
std::string stream_name = section_tree.get<std::string>("stream");
@ -142,20 +137,18 @@ static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const
// stdout/stderr will be taken from ini file, everything else hard-coded here
fc::console_appender::config console_appender_config;
console_appender_config.level_colors.emplace_back(
fc::console_appender::level_color(fc::log_level::debug,
fc::console_appender::color::green));
fc::console_appender::level_color(fc::log_level::debug,
fc::console_appender::color::green));
console_appender_config.level_colors.emplace_back(
fc::console_appender::level_color(fc::log_level::warn,
fc::console_appender::color::brown));
fc::console_appender::level_color(fc::log_level::warn,
fc::console_appender::color::brown));
console_appender_config.level_colors.emplace_back(
fc::console_appender::level_color(fc::log_level::error,
fc::console_appender::color::cyan));
fc::console_appender::level_color(fc::log_level::error,
fc::console_appender::color::cyan));
console_appender_config.stream = fc::variant(stream_name).as<fc::console_appender::stream::type>(GRAPHENE_MAX_NESTED_OBJECTS);
logging_config.appenders.push_back(fc::appender_config(console_appender_name, "console", fc::variant(console_appender_config, GRAPHENE_MAX_NESTED_OBJECTS)));
found_logging_config = true;
}
else if (boost::starts_with(section_name, file_appender_section_prefix))
{
} else if (boost::starts_with(section_name, file_appender_section_prefix)) {
std::string file_appender_name = section_name.substr(file_appender_section_prefix.length());
fc::path file_name = section_tree.get<std::string>("filename");
if (file_name.is_relative())
@ -174,9 +167,7 @@ static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const
file_appender_config.rotation_limit = fc::days(limit);
logging_config.appenders.push_back(fc::appender_config(file_appender_name, "file", fc::variant(file_appender_config, GRAPHENE_MAX_NESTED_OBJECTS)));
found_logging_config = true;
}
else if (boost::starts_with(section_name, logger_section_prefix))
{
} else if (boost::starts_with(section_name, logger_section_prefix)) {
std::string logger_name = section_name.substr(logger_section_prefix.length());
std::string level_string = section_tree.get<std::string>("level");
std::string appenders_string = section_tree.get<std::string>("appenders");
@ -197,74 +188,66 @@ static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const
FC_RETHROW_EXCEPTIONS(warn, "")
}
static const boost::shared_ptr<bpo::option_description> new_option_description( const std::string& name, const bpo::value_semantic* value, const std::string& description )
{
static const boost::shared_ptr<bpo::option_description> new_option_description(const std::string &name, const bpo::value_semantic *value, const std::string &description) {
bpo::options_description helper("");
helper.add_options()( name.c_str(), value, description.c_str() );
helper.add_options()(name.c_str(), value, description.c_str());
return helper.options()[0];
}
static void load_config_file(const fc::path& config_ini_path, const bpo::options_description& cfg_options,
bpo::variables_map& options )
{
static void load_config_file(const fc::path &config_ini_path, const bpo::options_description &cfg_options,
bpo::variables_map &options) {
deduplicator dedup;
bpo::options_description unique_options("Graphene Witness Node");
for( const boost::shared_ptr<bpo::option_description> opt : cfg_options.options() )
{
for (const boost::shared_ptr<bpo::option_description> opt : cfg_options.options()) {
const boost::shared_ptr<bpo::option_description> od = dedup.next(opt);
if( !od ) continue;
unique_options.add( od );
if (!od)
continue;
unique_options.add(od);
}
// get the basic options
bpo::store(bpo::parse_config_file<char>(config_ini_path.preferred_string().c_str(),
unique_options, true), options);
unique_options, true),
options);
}
static bool load_logging_config_file(const fc::path& config_ini_path)
{
static bool load_logging_config_file(const fc::path &config_ini_path) {
// try to get logging options from the config file.
try
{
try {
fc::optional<fc::logging_config> logging_config = load_logging_config_from_ini_file(config_ini_path);
if (logging_config)
{
if (logging_config) {
fc::configure_logging(*logging_config);
return true;
}
}
catch (const fc::exception& ex)
{
} catch (const fc::exception &ex) {
wlog("Error parsing logging config from logging config file ${config}, using default config", ("config", config_ini_path.preferred_string()));
}
return false;
}
static void create_new_config_file(const fc::path& config_ini_path, const fc::path& data_dir,
const bpo::options_description& cfg_options )
{
static void create_new_config_file(const fc::path &config_ini_path, const fc::path &data_dir,
const bpo::options_description &cfg_options) {
ilog("Writing new config file at ${path}", ("path", config_ini_path));
if( !fc::exists(data_dir) )
if (!fc::exists(data_dir))
fc::create_directories(data_dir);
auto modify_option_defaults = [](const boost::shared_ptr<bpo::option_description>& o) -> const boost::shared_ptr<bpo::option_description> {
const std::string& name = o->long_name();
if( name == "partial-operations" )
return new_option_description(name, bpo::value<bool>()->default_value(true), o->description() );
if( name == "max-ops-per-account" )
return new_option_description(name, bpo::value<int>()->default_value(100), o->description() );
return o;
auto modify_option_defaults = [](const boost::shared_ptr<bpo::option_description> &o) -> const boost::shared_ptr<bpo::option_description> {
const std::string &name = o->long_name();
if (name == "partial-operations")
return new_option_description(name, bpo::value<bool>()->default_value(true), o->description());
if (name == "max-ops-per-account")
return new_option_description(name, bpo::value<int>()->default_value(100), o->description());
return o;
};
deduplicator dedup(modify_option_defaults);
std::ofstream out_cfg(config_ini_path.preferred_string());
std::string plugin_header_surrounding( 78, '=' );
for( const boost::shared_ptr<bpo::option_description> opt : cfg_options.options() )
{
std::string plugin_header_surrounding(78, '=');
for (const boost::shared_ptr<bpo::option_description> opt : cfg_options.options()) {
const boost::shared_ptr<bpo::option_description> od = dedup.next(opt);
if( !od ) continue;
if (!od)
continue;
if( od->long_name().find("plugin-cfg-header-") == 0 ) // it's a plugin header
if (od->long_name().find("plugin-cfg-header-") == 0) // it's a plugin header
{
out_cfg << "\n";
out_cfg << "# " << plugin_header_surrounding << "\n";
@ -274,20 +257,21 @@ static void create_new_config_file(const fc::path& config_ini_path, const fc::pa
continue;
}
if( !od->description().empty() )
if (!od->description().empty())
out_cfg << "# " << od->description() << "\n";
boost::any store;
if( !od->semantic()->apply_default(store) )
if (!od->semantic()->apply_default(store))
out_cfg << "# " << od->long_name() << " = \n";
else {
auto example = od->format_parameter();
if( example.empty() )
if (example.empty())
// This is a boolean switch
out_cfg << od->long_name() << " = " << "false\n";
out_cfg << od->long_name() << " = "
<< "false\n";
else {
// The string is formatted "arg (=<interesting part>)"
example.erase(0, 6);
example.erase(example.length()-1);
example.erase(example.length() - 1);
out_cfg << od->long_name() << " = " << example << "\n";
}
}
@ -304,11 +288,9 @@ static void create_new_config_file(const fc::path& config_ini_path, const fc::pa
out_cfg.close();
}
static void create_logging_config_file(const fc::path& config_ini_path, const fc::path& data_dir)
{
static void create_logging_config_file(const fc::path &config_ini_path, const fc::path &data_dir) {
ilog("Writing new config file at ${path}", ("path", config_ini_path));
if (!exists(data_dir))
{
if (!exists(data_dir)) {
create_directories(data_dir);
}
@ -319,36 +301,29 @@ static void create_logging_config_file(const fc::path& config_ini_path, const fc
namespace graphene { namespace app {
void load_configuration_options(const fc::path& data_dir, const bpo::options_description& cfg_options, bpo::variables_map& options)
{
const auto config_ini_path = data_dir / "config.ini";
const auto logging_ini_path = data_dir / "logging.ini";
void load_configuration_options(const fc::path &data_dir, const bpo::options_description &cfg_options, bpo::variables_map &options) {
const auto config_ini_path = data_dir / "config.ini";
const auto logging_ini_path = data_dir / "logging.ini";
if(!exists(config_ini_path) && fc::exists(logging_ini_path))
{
// this is an uncommon case
create_new_config_file(config_ini_path, data_dir, cfg_options);
}
else if(!exists(config_ini_path))
{
// create default config.ini and logging.ini
create_new_config_file(config_ini_path, data_dir, cfg_options);
create_logging_config_file(logging_ini_path, data_dir);
}
// load witness node configuration
load_config_file(config_ini_path, cfg_options, options);
// load logging configuration
if (fc::exists(logging_ini_path))
{
load_logging_config_file(logging_ini_path);
}
else
{
// this is the legacy config.ini case
load_logging_config_file(config_ini_path);
}
if (!exists(config_ini_path) && fc::exists(logging_ini_path)) {
// this is an uncommon case
create_new_config_file(config_ini_path, data_dir, cfg_options);
} else if (!exists(config_ini_path)) {
// create default config.ini and logging.ini
create_new_config_file(config_ini_path, data_dir, cfg_options);
create_logging_config_file(logging_ini_path, data_dir);
}
} } // graphene::app
// load witness node configuration
load_config_file(config_ini_path, cfg_options, options);
// load logging configuration
if (fc::exists(logging_ini_path)) {
load_logging_config_file(logging_ini_path);
} else {
// this is the legacy config.ini case
load_logging_config_file(config_ini_path);
}
}
}} // namespace graphene::app

File diff suppressed because it is too large Load diff

View file

@ -25,24 +25,23 @@
#include <graphene/app/database_api.hpp>
#include <graphene/chain/protocol/types.hpp>
#include <graphene/chain/protocol/confidential.hpp>
#include <graphene/market_history/market_history_plugin.hpp>
#include <graphene/accounts_list/accounts_list_plugin.hpp>
#include <graphene/elasticsearch/elasticsearch_plugin.hpp>
#include <graphene/debug_witness/debug_api.hpp>
#include <graphene/affiliate_stats/affiliate_stats_api.hpp>
#include <graphene/bookie/bookie_api.hpp>
#include <graphene/chain/protocol/types.hpp>
#include <graphene/net/node.hpp>
#include <graphene/accounts_list/accounts_list_plugin.hpp>
#include <graphene/affiliate_stats/affiliate_stats_api.hpp>
#include <graphene/bookie/bookie_api.hpp>
#include <graphene/debug_witness/debug_api.hpp>
#include <graphene/elasticsearch/elasticsearch_plugin.hpp>
#include <graphene/market_history/market_history_plugin.hpp>
#include <graphene/peerplays_sidechain/sidechain_api.hpp>
#include <fc/api.hpp>
#include <fc/optional.hpp>
#include <fc/crypto/elliptic.hpp>
#include <fc/network/ip.hpp>
#include <fc/optional.hpp>
#include <boost/container/flat_set.hpp>
@ -52,452 +51,415 @@
#include <vector>
namespace graphene { namespace app {
using namespace graphene::chain;
using namespace graphene::market_history;
using namespace graphene::accounts_list;
using namespace fc::ecc;
using namespace std;
using namespace graphene::chain;
using namespace graphene::market_history;
using namespace graphene::accounts_list;
using namespace fc::ecc;
using namespace std;
class application;
class application;
struct verify_range_result
{
bool success;
uint64_t min_val;
uint64_t max_val;
};
struct verify_range_proof_rewind_result
{
bool success;
uint64_t min_val;
uint64_t max_val;
uint64_t value_out;
fc::ecc::blind_factor_type blind_out;
string message_out;
};
struct verify_range_result {
bool success;
uint64_t min_val;
uint64_t max_val;
};
struct verify_range_proof_rewind_result {
bool success;
uint64_t min_val;
uint64_t max_val;
uint64_t value_out;
fc::ecc::blind_factor_type blind_out;
string message_out;
};
struct account_asset_balance {
string name;
account_id_type account_id;
share_type amount;
};
struct asset_holders {
asset_id_type asset_id;
int count;
};
/**
* @brief The history_api class implements the RPC API for account history
*
* This API contains methods to access account histories
*/
class history_api {
public:
history_api(application &app) :
_app(app),
database_api(std::ref(*app.chain_database())) {
}
struct account_asset_balance
{
string name;
account_id_type account_id;
share_type amount;
};
struct asset_holders
{
asset_id_type asset_id;
int count;
};
/**
* @brief The history_api class implements the RPC API for account history
* @brief Get operations relevant to the specificed account
* @param account_id_or_name The account ID or name whose history should be queried
* @param stop ID of the earliest operation to retrieve
* @param limit Maximum number of operations to retrieve (must not exceed 100)
* @param start ID of the most recent operation to retrieve
* @return A list of operations performed by account, ordered from most recent to oldest.
*/
vector<operation_history_object> get_account_history(const std::string account_id_or_name,
operation_history_id_type stop = operation_history_id_type(),
unsigned limit = 100,
operation_history_id_type start = operation_history_id_type()) const;
/**
* @brief Get only asked operations relevant to the specified account
* @param account_id_or_name The account ID or name whose history should be queried
* @param operation_id The ID of the operation we want to get operations in the account( 0 = transfer , 1 = limit order create, ...)
* @param stop ID of the earliest operation to retrieve
* @param limit Maximum number of operations to retrieve (must not exceed 100)
* @param start ID of the most recent operation to retrieve
* @return A list of operations performed by account, ordered from most recent to oldest.
*/
vector<operation_history_object> get_account_history_operations(const std::string account_id_or_name,
int operation_id,
operation_history_id_type start = operation_history_id_type(),
operation_history_id_type stop = operation_history_id_type(),
unsigned limit = 100) const;
/**
* @breif Get operations relevant to the specified account referenced
* by an event numbering specific to the account. The current number of operations
* for the account can be found in the account statistics (or use 0 for start).
* @param account_id_or_name The account ID or name whose history should be queried
* @param stop Sequence number of earliest operation. 0 is default and will
* query 'limit' number of operations.
* @param limit Maximum number of operations to retrieve (must not exceed 100)
* @param start Sequence number of the most recent operation to retrieve.
* 0 is default, which will start querying from the most recent operation.
* @return A list of operations performed by account, ordered from most recent to oldest.
*/
vector<operation_history_object> get_relative_account_history(const std::string account_id_or_name,
uint32_t stop = 0,
unsigned limit = 100,
uint32_t start = 0) const;
vector<order_history_object> get_fill_order_history(std::string asset_a, std::string asset_b, uint32_t limit) const;
vector<bucket_object> get_market_history(std::string asset_a, std::string asset_b, uint32_t bucket_seconds,
fc::time_point_sec start, fc::time_point_sec end) const;
vector<account_balance_object> list_core_accounts() const;
flat_set<uint32_t> get_market_history_buckets() const;
uint32_t api_limit_get_account_history_operations = 100;
uint32_t api_limit_get_account_history = 100;
uint32_t api_limit_get_relative_account_history = 100;
private:
application &_app;
graphene::app::database_api database_api;
};
/**
* @brief Block api
*/
class block_api {
public:
block_api(graphene::chain::database &db);
~block_api();
vector<optional<signed_block>> get_blocks(uint32_t block_num_from, uint32_t block_num_to) const;
private:
graphene::chain::database &_db;
};
/**
* @brief The network_broadcast_api class allows broadcasting of transactions.
*/
class network_broadcast_api : public std::enable_shared_from_this<network_broadcast_api> {
public:
network_broadcast_api(application &a);
struct transaction_confirmation {
transaction_id_type id;
uint32_t block_num;
uint32_t trx_num;
processed_transaction trx;
};
typedef std::function<void(variant /*transaction_confirmation*/)> confirmation_callback;
/**
* @brief Broadcast a transaction to the network
* @param trx The transaction to broadcast
*
* This API contains methods to access account histories
* The transaction will be checked for validity in the local database prior to broadcasting. If it fails to
* apply locally, an error will be thrown and the transaction will not be broadcast.
*/
class history_api
{
public:
history_api(application& app)
:_app(app), database_api( std::ref(*app.chain_database())) {}
void broadcast_transaction(const signed_transaction &trx);
/**
* @brief Get operations relevant to the specificed account
* @param account_id_or_name The account ID or name whose history should be queried
* @param stop ID of the earliest operation to retrieve
* @param limit Maximum number of operations to retrieve (must not exceed 100)
* @param start ID of the most recent operation to retrieve
* @return A list of operations performed by account, ordered from most recent to oldest.
*/
vector<operation_history_object> get_account_history(const std::string account_id_or_name,
operation_history_id_type stop = operation_history_id_type(),
unsigned limit = 100,
operation_history_id_type start = operation_history_id_type())const;
/** this version of broadcast transaction registers a callback method that will be called when the transaction is
* included into a block. The callback method includes the transaction id, block number, and transaction number in the
* block.
*/
void broadcast_transaction_with_callback(confirmation_callback cb, const signed_transaction &trx);
/**
* @brief Get only asked operations relevant to the specified account
* @param account_id_or_name The account ID or name whose history should be queried
* @param operation_id The ID of the operation we want to get operations in the account( 0 = transfer , 1 = limit order create, ...)
* @param stop ID of the earliest operation to retrieve
* @param limit Maximum number of operations to retrieve (must not exceed 100)
* @param start ID of the most recent operation to retrieve
* @return A list of operations performed by account, ordered from most recent to oldest.
*/
vector<operation_history_object> get_account_history_operations(const std::string account_id_or_name,
int operation_id,
operation_history_id_type start = operation_history_id_type(),
operation_history_id_type stop = operation_history_id_type(),
unsigned limit = 100)const;
/** this version of broadcast transaction registers a callback method that will be called when the transaction is
* included into a block. The callback method includes the transaction id, block number, and transaction number in the
* block.
*/
fc::variant broadcast_transaction_synchronous(const signed_transaction &trx);
/**
* @breif Get operations relevant to the specified account referenced
* by an event numbering specific to the account. The current number of operations
* for the account can be found in the account statistics (or use 0 for start).
* @param account_id_or_name The account ID or name whose history should be queried
* @param stop Sequence number of earliest operation. 0 is default and will
* query 'limit' number of operations.
* @param limit Maximum number of operations to retrieve (must not exceed 100)
* @param start Sequence number of the most recent operation to retrieve.
* 0 is default, which will start querying from the most recent operation.
* @return A list of operations performed by account, ordered from most recent to oldest.
*/
vector<operation_history_object> get_relative_account_history( const std::string account_id_or_name,
uint32_t stop = 0,
unsigned limit = 100,
uint32_t start = 0) const;
vector<order_history_object> get_fill_order_history( std::string asset_a, std::string asset_b, uint32_t limit )const;
vector<bucket_object> get_market_history( std::string asset_a, std::string asset_b, uint32_t bucket_seconds,
fc::time_point_sec start, fc::time_point_sec end )const;
vector<account_balance_object> list_core_accounts()const;
flat_set<uint32_t> get_market_history_buckets()const;
private:
application& _app;
graphene::app::database_api database_api;
};
void broadcast_block(const signed_block &block);
/**
* @brief Block api
* @brief Not reflected, thus not accessible to API clients.
*
* This function is registered to receive the applied_block
* signal from the chain database when a block is received.
* It then dispatches callbacks to clients who have requested
* to be notified when a particular txid is included in a block.
*/
class block_api
{
public:
block_api(graphene::chain::database& db);
~block_api();
void on_applied_block(const signed_block &b);
vector<optional<signed_block>> get_blocks(uint32_t block_num_from, uint32_t block_num_to)const;
private:
graphene::chain::database& _db;
};
private:
boost::signals2::scoped_connection _applied_block_connection;
map<transaction_id_type, confirmation_callback> _callbacks;
application &_app;
};
/**
* @brief The network_node_api class allows maintenance of p2p connections.
*/
class network_node_api {
public:
network_node_api(application &a);
/**
* @brief The network_broadcast_api class allows broadcasting of transactions.
* @brief Return general network information, such as p2p port
*/
class network_broadcast_api : public std::enable_shared_from_this<network_broadcast_api>
{
public:
network_broadcast_api(application& a);
struct transaction_confirmation
{
transaction_id_type id;
uint32_t block_num;
uint32_t trx_num;
processed_transaction trx;
};
typedef std::function<void(variant/*transaction_confirmation*/)> confirmation_callback;
/**
* @brief Broadcast a transaction to the network
* @param trx The transaction to broadcast
*
* The transaction will be checked for validity in the local database prior to broadcasting. If it fails to
* apply locally, an error will be thrown and the transaction will not be broadcast.
*/
void broadcast_transaction(const signed_transaction& trx);
/** this version of broadcast transaction registers a callback method that will be called when the transaction is
* included into a block. The callback method includes the transaction id, block number, and transaction number in the
* block.
*/
void broadcast_transaction_with_callback( confirmation_callback cb, const signed_transaction& trx);
/** this version of broadcast transaction registers a callback method that will be called when the transaction is
* included into a block. The callback method includes the transaction id, block number, and transaction number in the
* block.
*/
fc::variant broadcast_transaction_synchronous(const signed_transaction& trx);
void broadcast_block( const signed_block& block );
/**
* @brief Not reflected, thus not accessible to API clients.
*
* This function is registered to receive the applied_block
* signal from the chain database when a block is received.
* It then dispatches callbacks to clients who have requested
* to be notified when a particular txid is included in a block.
*/
void on_applied_block( const signed_block& b );
private:
boost::signals2::scoped_connection _applied_block_connection;
map<transaction_id_type,confirmation_callback> _callbacks;
application& _app;
};
fc::variant_object get_info() const;
/**
* @brief The network_node_api class allows maintenance of p2p connections.
* @brief add_node Connect to a new peer
* @param ep The IP/Port of the peer to connect to
*/
class network_node_api
{
public:
network_node_api(application& a);
/**
* @brief Return general network information, such as p2p port
*/
fc::variant_object get_info() const;
/**
* @brief add_node Connect to a new peer
* @param ep The IP/Port of the peer to connect to
*/
void add_node(const fc::ip::endpoint& ep);
/**
* @brief Get status of all current connections to peers
*/
std::vector<net::peer_status> get_connected_peers() const;
/**
* @brief Get advanced node parameters, such as desired and max
* number of connections
*/
fc::variant_object get_advanced_node_parameters() const;
/**
* @brief Set advanced node parameters, such as desired and max
* number of connections
* @param params a JSON object containing the name/value pairs for the parameters to set
*/
void set_advanced_node_parameters(const fc::variant_object& params);
/**
* @brief Return list of potential peers
*/
std::vector<net::potential_peer_record> get_potential_peers() const;
/**
* @brief Return list of pending transactions.
*/
map<transaction_id_type, signed_transaction> list_pending_transactions() const;
/**
* @brief Subscribes caller for notifications about pending transactions.
* @param callback a functional object which will be called when new transaction is created.
*/
void subscribe_to_pending_transactions(std::function<void(const variant&)> callback);
/**
* @brief Unsubscribes caller from notifications about pending transactions.
*/
void unsubscribe_from_pending_transactions();
private:
application& _app;
map<transaction_id_type, signed_transaction> _pending_transactions;
boost::signals2::scoped_connection _pending_trx_connection;
boost::signals2::scoped_connection _applied_block_connection;
std::function<void(const variant&)> _on_pending_transaction;
};
class crypto_api
{
public:
crypto_api();
fc::ecc::commitment_type blind( const fc::ecc::blind_factor_type& blind, uint64_t value );
fc::ecc::blind_factor_type blind_sum( const std::vector<blind_factor_type>& blinds_in, uint32_t non_neg );
bool verify_sum( const std::vector<commitment_type>& commits_in, const std::vector<commitment_type>& neg_commits_in, int64_t excess );
verify_range_result verify_range( const fc::ecc::commitment_type& commit, const std::vector<char>& proof );
std::vector<char> range_proof_sign( uint64_t min_value,
const commitment_type& commit,
const blind_factor_type& commit_blind,
const blind_factor_type& nonce,
int8_t base10_exp,
uint8_t min_bits,
uint64_t actual_value );
verify_range_proof_rewind_result verify_range_proof_rewind( const blind_factor_type& nonce,
const fc::ecc::commitment_type& commit,
const std::vector<char>& proof );
range_proof_info range_get_info( const std::vector<char>& proof );
};
void add_node(const fc::ip::endpoint &ep);
/**
* @brief
* @brief Get status of all current connections to peers
*/
class asset_api
{
public:
asset_api(graphene::app::application& app);
~asset_api();
std::vector<net::peer_status> get_connected_peers() const;
/**
* @brief Get asset holders for a specific asset
* @param asset The specific asset id or symbol
* @param start The start index
* @param limit Maximum limit must not exceed 100
* @return A list of asset holders for the specified asset
*/
vector<account_asset_balance> get_asset_holders( std::string asset, uint32_t start, uint32_t limit )const;
/**
* @brief Get advanced node parameters, such as desired and max
* number of connections
*/
fc::variant_object get_advanced_node_parameters() const;
/**
* @brief Get asset holders count for a specific asset
* @param asset The specific asset id or symbol
* @return Holders count for the specified asset
*/
int get_asset_holders_count( std::string asset )const;
/**
* @brief Set advanced node parameters, such as desired and max
* number of connections
* @param params a JSON object containing the name/value pairs for the parameters to set
*/
void set_advanced_node_parameters(const fc::variant_object &params);
/**
* @brief Get all asset holders
* @return A list of all asset holders
*/
vector<asset_holders> get_all_asset_holders() const;
/**
* @brief Return list of potential peers
*/
std::vector<net::potential_peer_record> get_potential_peers() const;
private:
graphene::app::application& _app;
graphene::chain::database& _db;
graphene::app::database_api database_api;
};
} } // graphene::app
/**
* @brief Return list of pending transactions.
*/
map<transaction_id_type, signed_transaction> list_pending_transactions() const;
/**
* @brief Subscribes caller for notifications about pending transactions.
* @param callback a functional object which will be called when new transaction is created.
*/
void subscribe_to_pending_transactions(std::function<void(const variant &)> callback);
/**
* @brief Unsubscribes caller from notifications about pending transactions.
*/
void unsubscribe_from_pending_transactions();
private:
application &_app;
map<transaction_id_type, signed_transaction> _pending_transactions;
boost::signals2::scoped_connection _pending_trx_connection;
boost::signals2::scoped_connection _applied_block_connection;
std::function<void(const variant &)> _on_pending_transaction;
};
/**
* @brief
*/
class asset_api {
public:
asset_api(graphene::app::application &app);
~asset_api();
/**
* @brief Get asset holders for a specific asset
* @param asset The specific asset id or symbol
* @param start The start index
* @param limit Maximum limit must not exceed 100
* @return A list of asset holders for the specified asset
*/
vector<account_asset_balance> get_asset_holders(std::string asset, uint32_t start, uint32_t limit) const;
/**
* @brief Get asset holders count for a specific asset
* @param asset The specific asset id or symbol
* @return Holders count for the specified asset
*/
int get_asset_holders_count(std::string asset) const;
/**
* @brief Get all asset holders
* @return A list of all asset holders
*/
vector<asset_holders> get_all_asset_holders() const;
uint32_t api_limit_get_asset_holders = 100;
private:
graphene::app::application &_app;
graphene::chain::database &_db;
graphene::app::database_api database_api;
};
}} // namespace graphene::app
extern template class fc::api<graphene::app::block_api>;
extern template class fc::api<graphene::app::network_broadcast_api>;
extern template class fc::api<graphene::app::network_node_api>;
extern template class fc::api<graphene::app::history_api>;
extern template class fc::api<graphene::app::crypto_api>;
extern template class fc::api<graphene::app::asset_api>;
extern template class fc::api<graphene::debug_witness::debug_api>;
namespace graphene { namespace app {
/**
* @brief The login_api class implements the bottom layer of the RPC API
*
* All other APIs must be requested from this API.
*/
class login_api {
public:
login_api(application &a);
~login_api();
/**
* @brief The login_api class implements the bottom layer of the RPC API
* @brief Authenticate to the RPC server
* @param user Username to login with
* @param password Password to login with
* @return True if logged in successfully; false otherwise
*
* All other APIs must be requested from this API.
* @note This must be called prior to requesting other APIs. Other APIs may not be accessible until the client
* has sucessfully authenticated.
*/
class login_api
{
public:
login_api(application& a);
~login_api();
bool login(const string &user, const string &password);
/// @brief Retrieve the network block API
fc::api<block_api> block() const;
/// @brief Retrieve the network broadcast API
fc::api<network_broadcast_api> network_broadcast() const;
/// @brief Retrieve the database API
fc::api<database_api> database() const;
/// @brief Retrieve the history API
fc::api<history_api> history() const;
/// @brief Retrieve the network node API
fc::api<network_node_api> network_node() const;
/// @brief Retrieve the asset API
fc::api<asset_api> asset() const;
/// @brief Retrieve the debug API (if available)
fc::api<graphene::debug_witness::debug_api> debug() const;
/// @brief Retrieve the bookie API (if available)
fc::api<graphene::bookie::bookie_api> bookie() const;
/// @brief Retrieve the affiliate_stats API (if available)
fc::api<graphene::affiliate_stats::affiliate_stats_api> affiliate_stats() const;
/// @brief Retrieve the sidechain_api API (if available)
fc::api<graphene::peerplays_sidechain::sidechain_api> sidechain() const;
/**
* @brief Authenticate to the RPC server
* @param user Username to login with
* @param password Password to login with
* @return True if logged in successfully; false otherwise
*
* @note This must be called prior to requesting other APIs. Other APIs may not be accessible until the client
* has sucessfully authenticated.
*/
bool login(const string& user, const string& password);
/// @brief Retrieve the network block API
fc::api<block_api> block()const;
/// @brief Retrieve the network broadcast API
fc::api<network_broadcast_api> network_broadcast()const;
/// @brief Retrieve the database API
fc::api<database_api> database()const;
/// @brief Retrieve the history API
fc::api<history_api> history()const;
/// @brief Retrieve the network node API
fc::api<network_node_api> network_node()const;
/// @brief Retrieve the cryptography API
fc::api<crypto_api> crypto()const;
/// @brief Retrieve the asset API
fc::api<asset_api> asset()const;
/// @brief Retrieve the debug API (if available)
fc::api<graphene::debug_witness::debug_api> debug()const;
/// @brief Retrieve the bookie API (if available)
fc::api<graphene::bookie::bookie_api> bookie()const;
/// @brief Retrieve the affiliate_stats API (if available)
fc::api<graphene::affiliate_stats::affiliate_stats_api> affiliate_stats()const;
/// @brief Called to enable an API, not reflected.
void enable_api(const string &api_name);
/// @brief Called to enable an API, not reflected.
void enable_api( const string& api_name );
private:
private:
application &_app;
optional<fc::api<block_api>> _block_api;
optional<fc::api<database_api>> _database_api;
optional<fc::api<network_broadcast_api>> _network_broadcast_api;
optional<fc::api<network_node_api>> _network_node_api;
optional<fc::api<history_api>> _history_api;
optional<fc::api<asset_api>> _asset_api;
optional<fc::api<graphene::debug_witness::debug_api>> _debug_api;
optional<fc::api<graphene::bookie::bookie_api>> _bookie_api;
optional<fc::api<graphene::affiliate_stats::affiliate_stats_api>> _affiliate_stats_api;
optional<fc::api<graphene::peerplays_sidechain::sidechain_api>> _sidechain_api;
};
application& _app;
optional< fc::api<block_api> > _block_api;
optional< fc::api<database_api> > _database_api;
optional< fc::api<network_broadcast_api> > _network_broadcast_api;
optional< fc::api<network_node_api> > _network_node_api;
optional< fc::api<history_api> > _history_api;
optional< fc::api<crypto_api> > _crypto_api;
optional< fc::api<asset_api> > _asset_api;
optional< fc::api<graphene::debug_witness::debug_api> > _debug_api;
optional< fc::api<graphene::bookie::bookie_api> > _bookie_api;
optional< fc::api<graphene::affiliate_stats::affiliate_stats_api> > _affiliate_stats_api;
};
}} // graphene::app
}} // namespace graphene::app
extern template class fc::api<graphene::app::login_api>;
FC_REFLECT( graphene::app::network_broadcast_api::transaction_confirmation,
(id)(block_num)(trx_num)(trx) )
FC_REFLECT( graphene::app::verify_range_result,
(success)(min_val)(max_val) )
FC_REFLECT( graphene::app::verify_range_proof_rewind_result,
(success)(min_val)(max_val)(value_out)(blind_out)(message_out) )
//FC_REFLECT_TYPENAME( fc::ecc::compact_signature );
//FC_REFLECT_TYPENAME( fc::ecc::commitment_type );
// clang-format off
FC_REFLECT( graphene::app::account_asset_balance, (name)(account_id)(amount) );
FC_REFLECT( graphene::app::asset_holders, (asset_id)(count) );
FC_REFLECT(graphene::app::network_broadcast_api::transaction_confirmation,
(id)(block_num)(trx_num)(trx))
FC_REFLECT(graphene::app::verify_range_result,
(success)(min_val)(max_val))
FC_REFLECT(graphene::app::verify_range_proof_rewind_result,
(success)(min_val)(max_val)(value_out)(blind_out)(message_out))
FC_REFLECT(graphene::app::account_asset_balance,
(name)(account_id)(amount));
FC_REFLECT(graphene::app::asset_holders,
(asset_id)(count));
FC_API(graphene::app::history_api,
(get_account_history)
(get_account_history_operations)
(get_relative_account_history)
(get_fill_order_history)
(get_market_history)
(get_market_history_buckets)
(list_core_accounts)
)
(get_account_history)
(get_account_history_operations)
(get_relative_account_history)
(get_fill_order_history)
(get_market_history)
(get_market_history_buckets)
(list_core_accounts))
FC_API(graphene::app::block_api,
(get_blocks)
)
(get_blocks))
FC_API(graphene::app::network_broadcast_api,
(broadcast_transaction)
(broadcast_transaction_with_callback)
(broadcast_transaction_synchronous)
(broadcast_block)
)
(broadcast_transaction)
(broadcast_transaction_with_callback)
(broadcast_transaction_synchronous)
(broadcast_block))
FC_API(graphene::app::network_node_api,
(get_info)
(add_node)
(get_connected_peers)
(get_potential_peers)
(get_advanced_node_parameters)
(set_advanced_node_parameters)
(list_pending_transactions)
(subscribe_to_pending_transactions)
(unsubscribe_from_pending_transactions)
)
FC_API(graphene::app::crypto_api,
(blind)
(blind_sum)
(verify_sum)
(verify_range)
(range_proof_sign)
(verify_range_proof_rewind)
(range_get_info)
)
(get_info)
(add_node)
(get_connected_peers)
(get_potential_peers)
(get_advanced_node_parameters)
(set_advanced_node_parameters)
(list_pending_transactions)
(subscribe_to_pending_transactions)
(unsubscribe_from_pending_transactions))
FC_API(graphene::app::asset_api,
(get_asset_holders)
(get_asset_holders_count)
(get_all_asset_holders)
)
(get_asset_holders)
(get_asset_holders_count)
(get_all_asset_holders))
FC_API(graphene::app::login_api,
(login)
(block)
(network_broadcast)
(database)
(history)
(network_node)
(crypto)
(asset)
(debug)
(bookie)
(affiliate_stats)
)
(login)
(block)
(network_broadcast)
(database)
(history)
(network_node)
(asset)
(debug)
(bookie)
(affiliate_stats)
(sidechain))
// clang-format on

View file

@ -31,26 +31,26 @@
namespace graphene { namespace app {
struct api_access_info
{
struct api_access_info {
std::string password_hash_b64;
std::string password_salt_b64;
std::vector< std::string > allowed_apis;
std::vector<std::string> allowed_apis;
};
struct api_access
{
std::map< std::string, api_access_info > permission_map;
struct api_access {
std::map<std::string, api_access_info> permission_map;
};
} } // graphene::app
}} // namespace graphene::app
// clang-format off
FC_REFLECT( graphene::app::api_access_info,
(password_hash_b64)
(password_salt_b64)
(allowed_apis)
)
(password_hash_b64)
(password_salt_b64)
(allowed_apis))
FC_REFLECT( graphene::app::api_access,
(permission_map)
)
(permission_map))
// clang-format on

View file

@ -24,89 +24,86 @@
#pragma once
#include <graphene/app/api_access.hpp>
#include <graphene/net/node.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/net/node.hpp>
#include <boost/program_options.hpp>
namespace graphene { namespace app {
namespace detail { class application_impl; }
using std::string;
namespace detail {
class application_impl;
}
using std::string;
class abstract_plugin;
class abstract_plugin;
class application
{
public:
application();
~application();
class application {
public:
application();
~application();
void set_program_options( boost::program_options::options_description& command_line_options,
boost::program_options::options_description& configuration_file_options )const;
void initialize(const fc::path& data_dir, const boost::program_options::variables_map&options);
void initialize_plugins( const boost::program_options::variables_map& options );
void startup();
void shutdown();
void startup_plugins();
void shutdown_plugins();
void set_program_options(boost::program_options::options_description &cli,
boost::program_options::options_description &cfg) const;
void initialize(const fc::path &data_dir, const boost::program_options::variables_map &options);
void initialize_plugins(const boost::program_options::variables_map &options);
void startup();
void shutdown();
void startup_plugins();
void shutdown_plugins();
template<typename PluginType>
std::shared_ptr<PluginType> register_plugin()
{
auto plug = std::make_shared<PluginType>();
plug->plugin_set_app(this);
template <typename PluginType>
std::shared_ptr<PluginType> register_plugin() {
auto plug = std::make_shared<PluginType>();
plug->plugin_set_app(this);
boost::program_options::options_description plugin_cli_options(plug->plugin_name() + " plugin. " + plug->plugin_description() + "\nOptions"), plugin_cfg_options;
//boost::program_options::options_description plugin_cli_options("Options for plugin " + plug->plugin_name()), plugin_cfg_options;
plug->plugin_set_program_options(plugin_cli_options, plugin_cfg_options);
if( !plugin_cli_options.options().empty() )
_cli_options.add(plugin_cli_options);
boost::program_options::options_description plugin_cli_options(plug->plugin_name() + " plugin. " + plug->plugin_description() + "\nOptions"), plugin_cfg_options;
plug->plugin_set_program_options(plugin_cli_options, plugin_cfg_options);
if (!plugin_cli_options.options().empty())
_cli_options.add(plugin_cli_options);
if( !plugin_cfg_options.options().empty() )
{
std::string header_name = "plugin-cfg-header-" + plug->plugin_name();
std::string header_desc = plug->plugin_name() + " plugin options";
_cfg_options.add_options()(header_name.c_str(), header_desc.c_str());
_cfg_options.add(plugin_cfg_options);
}
if (!plugin_cfg_options.options().empty()) {
std::string header_name = "plugin-cfg-header-" + plug->plugin_name();
std::string header_desc = plug->plugin_name() + " plugin options";
_cfg_options.add_options()(header_name.c_str(), header_desc.c_str());
_cfg_options.add(plugin_cfg_options);
}
add_available_plugin( plug );
return plug;
}
std::shared_ptr<abstract_plugin> get_plugin( const string& name )const;
add_available_plugin(plug);
return plug;
}
std::shared_ptr<abstract_plugin> get_plugin(const string &name) const;
template<typename PluginType>
std::shared_ptr<PluginType> get_plugin( const string& name ) const
{
std::shared_ptr<abstract_plugin> abs_plugin = get_plugin( name );
std::shared_ptr<PluginType> result = std::dynamic_pointer_cast<PluginType>( abs_plugin );
FC_ASSERT( result != std::shared_ptr<PluginType>() );
return result;
}
template <typename PluginType>
std::shared_ptr<PluginType> get_plugin(const string &name) const {
std::shared_ptr<abstract_plugin> abs_plugin = get_plugin(name);
std::shared_ptr<PluginType> result = std::dynamic_pointer_cast<PluginType>(abs_plugin);
FC_ASSERT(result != std::shared_ptr<PluginType>());
return result;
}
net::node_ptr p2p_node();
std::shared_ptr<chain::database> chain_database()const;
net::node_ptr p2p_node();
std::shared_ptr<chain::database> chain_database() const;
void set_block_production(bool producing_blocks);
fc::optional< api_access_info > get_api_access_info( const string& username )const;
void set_api_access_info(const string& username, api_access_info&& permissions);
void set_block_production(bool producing_blocks);
fc::optional<api_access_info> get_api_access_info(const string &username) const;
void set_api_access_info(const string &username, api_access_info &&permissions);
bool is_finished_syncing()const;
/// Emitted when syncing finishes (is_finished_syncing will return true)
boost::signals2::signal<void()> syncing_finished;
bool is_finished_syncing() const;
/// Emitted when syncing finishes (is_finished_syncing will return true)
boost::signals2::signal<void()> syncing_finished;
void enable_plugin( const string& name );
void enable_plugin(const string &name);
bool is_plugin_enabled(const string& name) const;
bool is_plugin_enabled(const string &name) const;
std::shared_ptr<fc::thread> elasticsearch_thread;
std::shared_ptr<fc::thread> elasticsearch_thread;
private:
void add_available_plugin( std::shared_ptr<abstract_plugin> p );
std::shared_ptr<detail::application_impl> my;
private:
void add_available_plugin(std::shared_ptr<abstract_plugin> p);
std::shared_ptr<detail::application_impl> my;
boost::program_options::options_description _cli_options;
boost::program_options::options_description _cfg_options;
};
boost::program_options::options_description _cli_options;
boost::program_options::options_description _cfg_options;
};
} }
}} // namespace graphene::app

View file

@ -23,12 +23,12 @@
*/
#pragma once
#include <fc/filesystem.hpp>
#include <boost/program_options.hpp>
#include <fc/filesystem.hpp>
namespace graphene { namespace app {
void load_configuration_options(const fc::path &data_dir, const boost::program_options::options_description &cfg_options,
boost::program_options::variables_map &options);
void load_configuration_options(const fc::path &data_dir, const boost::program_options::options_description &cfg_options,
boost::program_options::variables_map &options);
} } // graphene::app
}} // namespace graphene::app

File diff suppressed because it is too large Load diff

View file

@ -24,52 +24,53 @@
#pragma once
#include <graphene/chain/account_object.hpp>
#include <graphene/chain/vesting_balance_object.hpp>
#include <graphene/chain/market_evaluator.hpp>
#include <graphene/chain/vesting_balance_object.hpp>
#include <graphene/chain/withdraw_permission_object.hpp>
namespace graphene { namespace app {
using namespace graphene::chain;
using namespace graphene::chain;
struct full_account
{
account_object account;
account_statistics_object statistics;
string registrar_name;
string referrer_name;
string lifetime_referrer_name;
vector<variant> votes;
optional<vesting_balance_object> cashback_balance;
vector<account_balance_object> balances;
vector<vesting_balance_object> vesting_balances;
vector<limit_order_object> limit_orders;
vector<call_order_object> call_orders;
vector<force_settlement_object> settle_orders;
vector<proposal_object> proposals;
vector<asset_id_type> assets;
vector<withdraw_permission_object> withdraws;
// vector<pending_dividend_payout_balance_object> pending_dividend_payments;
vector<pending_dividend_payout_balance_for_holder_object> pending_dividend_payments;
};
struct full_account {
account_object account;
account_statistics_object statistics;
string registrar_name;
string referrer_name;
string lifetime_referrer_name;
vector<variant> votes;
optional<vesting_balance_object> cashback_balance;
vector<account_balance_object> balances;
vector<vesting_balance_object> vesting_balances;
vector<limit_order_object> limit_orders;
vector<call_order_object> call_orders;
vector<force_settlement_object> settle_orders;
vector<proposal_object> proposals;
vector<asset_id_type> assets;
vector<withdraw_permission_object> withdraws;
// vector<pending_dividend_payout_balance_object> pending_dividend_payments;
vector<pending_dividend_payout_balance_for_holder_object> pending_dividend_payments;
};
} }
}} // namespace graphene::app
FC_REFLECT( graphene::app::full_account,
(account)
(statistics)
(registrar_name)
(referrer_name)
(lifetime_referrer_name)
(votes)
(cashback_balance)
(balances)
(vesting_balances)
(limit_orders)
(call_orders)
(settle_orders)
(proposals)
(assets)
(withdraws)
(proposals)
(pending_dividend_payments)
)
// clang-format off
FC_REFLECT(graphene::app::full_account,
(account)
(statistics)
(registrar_name)
(referrer_name)
(lifetime_referrer_name)
(votes)
(cashback_balance)
(balances)
(vesting_balances)
(limit_orders)
(call_orders)
(settle_orders)
(proposals)
(assets)
(withdraws)
(pending_dividend_payments))
// clang-format on

View file

@ -30,118 +30,119 @@
namespace graphene { namespace app {
class abstract_plugin
{
public:
virtual ~abstract_plugin(){}
virtual std::string plugin_name()const = 0;
virtual std::string plugin_description()const = 0;
class abstract_plugin {
public:
virtual ~abstract_plugin() {
}
virtual std::string plugin_name() const = 0;
virtual std::string plugin_description() const = 0;
/**
* @brief Perform early startup routines and register plugin indexes, callbacks, etc.
*
* Plugins MUST supply a method initialize() which will be called early in the application startup. This method
* should contain early setup code such as initializing variables, adding indexes to the database, registering
* callback methods from the database, adding APIs, etc., as well as applying any options in the @ref options map
*
* This method is called BEFORE the database is open, therefore any routines which require any chain state MUST
* NOT be called by this method. These routines should be performed in startup() instead.
*
* @param options The options passed to the application, via configuration files or command line
*/
virtual void plugin_initialize( const boost::program_options::variables_map& options ) = 0;
/**
* @brief Perform early startup routines and register plugin indexes, callbacks, etc.
*
* Plugins MUST supply a method initialize() which will be called early in the application startup. This method
* should contain early setup code such as initializing variables, adding indexes to the database, registering
* callback methods from the database, adding APIs, etc., as well as applying any options in the @ref options map
*
* This method is called BEFORE the database is open, therefore any routines which require any chain state MUST
* NOT be called by this method. These routines should be performed in startup() instead.
*
* @param options The options passed to the application, via configuration files or command line
*/
virtual void plugin_initialize(const boost::program_options::variables_map &options) = 0;
/**
* @brief Begin normal runtime operations
*
* Plugins MUST supply a method startup() which will be called at the end of application startup. This method
* should contain code which schedules any tasks, or requires chain state.
*/
virtual void plugin_startup() = 0;
/**
* @brief Begin normal runtime operations
*
* Plugins MUST supply a method startup() which will be called at the end of application startup. This method
* should contain code which schedules any tasks, or requires chain state.
*/
virtual void plugin_startup() = 0;
/**
* @brief Cleanly shut down the plugin.
*
* This is called to request a clean shutdown (e.g. due to SIGINT or SIGTERM).
*/
virtual void plugin_shutdown() = 0;
/**
* @brief Cleanly shut down the plugin.
*
* This is called to request a clean shutdown (e.g. due to SIGINT or SIGTERM).
*/
virtual void plugin_shutdown() = 0;
/**
* @brief Register the application instance with the plugin.
*
* This is called by the framework to set the application.
*/
virtual void plugin_set_app( application* a ) = 0;
/**
* @brief Register the application instance with the plugin.
*
* This is called by the framework to set the application.
*/
virtual void plugin_set_app(application *a) = 0;
/**
* @brief Fill in command line parameters used by the plugin.
*
* @param command_line_options All options this plugin supports taking on the command-line
* @param config_file_options All options this plugin supports storing in a configuration file
*
* This method populates its arguments with any
* command-line and configuration file options the plugin supports.
* If a plugin does not need these options, it
* may simply provide an empty implementation of this method.
*/
virtual void plugin_set_program_options(
boost::program_options::options_description& command_line_options,
boost::program_options::options_description& config_file_options
) = 0;
/**
* @brief Fill in command line parameters used by the plugin.
*
* @param command_line_options All options this plugin supports taking on the command-line
* @param config_file_options All options this plugin supports storing in a configuration file
*
* This method populates its arguments with any
* command-line and configuration file options the plugin supports.
* If a plugin does not need these options, it
* may simply provide an empty implementation of this method.
*/
virtual void plugin_set_program_options(boost::program_options::options_description &command_line_options,
boost::program_options::options_description &config_file_options) = 0;
};
/**
* Provides basic default implementations of abstract_plugin functions.
*/
class plugin : public abstract_plugin
{
public:
plugin();
virtual ~plugin() override;
class plugin : public abstract_plugin {
public:
plugin();
virtual ~plugin() override;
virtual std::string plugin_name()const override;
virtual std::string plugin_description()const override;
virtual void plugin_initialize( const boost::program_options::variables_map& options ) override;
virtual void plugin_startup() override;
virtual void plugin_shutdown() override;
virtual void plugin_set_app( application* app ) override;
virtual void plugin_set_program_options(
boost::program_options::options_description& command_line_options,
boost::program_options::options_description& config_file_options
) override;
virtual std::string plugin_name() const override;
virtual std::string plugin_description() const override;
virtual void plugin_initialize(const boost::program_options::variables_map &options) override;
virtual void plugin_startup() override;
virtual void plugin_shutdown() override;
virtual void plugin_set_app(application *app) override;
virtual void plugin_set_program_options(boost::program_options::options_description &command_line_options,
boost::program_options::options_description &config_file_options) override;
chain::database& database() { return *app().chain_database(); }
application& app()const { assert(_app); return *_app; }
protected:
net::node& p2p_node() { return *app().p2p_node(); }
chain::database &database() {
return *app().chain_database();
}
application &app() const {
assert(_app);
return *_app;
}
private:
application* _app = nullptr;
protected:
net::node &p2p_node() {
return *app().p2p_node();
}
private:
application *_app = nullptr;
};
/// @group Some useful tools for boost::program_options arguments using vectors of JSON strings
/// @{
template<typename T>
T dejsonify(const string& s, uint32_t max_depth)
{
template <typename T>
T dejsonify(const string &s, uint32_t max_depth) {
return fc::json::from_string(s).as<T>(max_depth);
}
namespace impl {
template<typename T>
T dejsonify( const string& s )
{
return graphene::app::dejsonify<T>( s, GRAPHENE_MAX_NESTED_OBJECTS );
}
template <typename T>
T dejsonify(const string &s) {
return graphene::app::dejsonify<T>(s, GRAPHENE_MAX_NESTED_OBJECTS);
}
} // namespace impl
#define DEFAULT_VALUE_VECTOR(value) default_value({fc::json::to_string(value)}, fc::json::to_string(value))
#define LOAD_VALUE_SET(options, name, container, type) \
if( options.count(name) ) { \
const std::vector<std::string>& ops = options[name].as<std::vector<std::string>>(); \
#define LOAD_VALUE_SET(options, name, container, type) \
if (options.count(name)) { \
const std::vector<std::string> &ops = options[name].as<std::vector<std::string>>(); \
std::transform(ops.begin(), ops.end(), std::inserter(container, container.end()), &graphene::app::impl::dejsonify<type>); \
}
}
/// @}
} } //graphene::app
}} // namespace graphene::app

View file

@ -27,54 +27,44 @@
namespace graphene { namespace app {
plugin::plugin()
{
plugin::plugin() {
_app = nullptr;
return;
}
plugin::~plugin()
{
plugin::~plugin() {
return;
}
std::string plugin::plugin_name()const
{
std::string plugin::plugin_name() const {
return "<unknown plugin>";
}
std::string plugin::plugin_description()const
{
std::string plugin::plugin_description() const {
return "<no description>";
}
void plugin::plugin_initialize( const boost::program_options::variables_map& options )
{
void plugin::plugin_initialize(const boost::program_options::variables_map &options) {
return;
}
void plugin::plugin_startup()
{
void plugin::plugin_startup() {
return;
}
void plugin::plugin_shutdown()
{
void plugin::plugin_shutdown() {
return;
}
void plugin::plugin_set_app( application* app )
{
void plugin::plugin_set_app(application *app) {
_app = app;
return;
}
void plugin::plugin_set_program_options(
boost::program_options::options_description& command_line_options,
boost::program_options::options_description& config_file_options
)
{
boost::program_options::options_description &cli,
boost::program_options::options_description &cfg) {
return;
}
} } // graphene::app
}} // namespace graphene::app

View file

@ -8,131 +8,29 @@ add_dependencies( build_hardfork_hpp cat-parts )
file(GLOB HEADERS "include/graphene/chain/*.hpp")
file(GLOB PROTOCOL_HEADERS "include/graphene/chain/protocol/*.hpp")
if( GRAPHENE_DISABLE_UNITY_BUILD )
set( GRAPHENE_DB_FILES
db_balance.cpp
db_bet.cpp
db_block.cpp
db_debug.cpp
db_getter.cpp
db_init.cpp
db_maint.cpp
db_management.cpp
db_market.cpp
db_sidechain.cpp
db_update.cpp
db_witness_schedule.cpp
)
file(GLOB CPP_FILES "*.cpp")
file(GLOB PROTOCOL_CPP_FILES "protocol/*.cpp")
#if( GRAPHENE_DISABLE_UNITY_BUILD )
list(FILTER CPP_FILES EXCLUDE REGEX "[/]database[.]cpp$")
#message ("--- ${CPP_FILES}")
message( STATUS "Graphene database unity build disabled" )
else( GRAPHENE_DISABLE_UNITY_BUILD )
set( GRAPHENE_DB_FILES
database.cpp )
message( STATUS "Graphene database unity build enabled" )
endif( GRAPHENE_DISABLE_UNITY_BUILD )
#else( GRAPHENE_DISABLE_UNITY_BUILD )
# list(FILTER CPP_FILES EXCLUDE REGEX ".*db_.*[.]cpp$")
# #message ("--- ${CPP_FILES}")
# message( STATUS "Graphene database unity build enabled" )
#endif( GRAPHENE_DISABLE_UNITY_BUILD )
## SORT .cpp by most likely to change / break compile
add_library( graphene_chain
# As database takes the longest to compile, start it first
${GRAPHENE_DB_FILES}
fork_database.cpp
protocol/types.cpp
protocol/address.cpp
protocol/authority.cpp
protocol/asset.cpp
protocol/assert.cpp
protocol/account.cpp
protocol/transfer.cpp
protocol/committee_member.cpp
protocol/witness.cpp
protocol/market.cpp
protocol/proposal.cpp
protocol/withdraw_permission.cpp
protocol/asset_ops.cpp
protocol/lottery_ops.cpp
protocol/memo.cpp
protocol/worker.cpp
protocol/custom.cpp
protocol/operations.cpp
protocol/transaction.cpp
protocol/block.cpp
protocol/fee_schedule.cpp
protocol/confidential.cpp
protocol/vote.cpp
protocol/tournament.cpp
protocol/small_ops.cpp
genesis_state.cpp
get_config.cpp
pts_address.cpp
evaluator.cpp
balance_evaluator.cpp
account_evaluator.cpp
assert_evaluator.cpp
witness_evaluator.cpp
committee_member_evaluator.cpp
asset_evaluator.cpp
lottery_evaluator.cpp
transfer_evaluator.cpp
proposal_evaluator.cpp
market_evaluator.cpp
vesting_balance_evaluator.cpp
tournament_evaluator.cpp
tournament_object.cpp
match_object.cpp
game_object.cpp
withdraw_permission_evaluator.cpp
worker_evaluator.cpp
confidential_evaluator.cpp
special_authority.cpp
buyback.cpp
account_object.cpp
asset_object.cpp
fba_object.cpp
proposal_object.cpp
vesting_balance_object.cpp
small_objects.cpp
block_database.cpp
is_authorized_asset.cpp
protocol/sport.cpp
sport_evaluator.cpp
protocol/event_group.cpp
event_group_evaluator.cpp
event_group_object.cpp
protocol/event.cpp
event_evaluator.cpp
event_object.cpp
protocol/betting_market.cpp
betting_market_evaluator.cpp
betting_market_object.cpp
betting_market_group_object.cpp
affiliate_payout.cpp
son_evaluator.cpp
son_object.cpp
son_wallet_evaluator.cpp
son_wallet_deposit_evaluator.cpp
son_wallet_withdraw_evaluator.cpp
sidechain_address_evaluator.cpp
sidechain_transaction_evaluator.cpp
${CPP_FILES}
${PROTOCOL_CPP_FILES}
${HEADERS}
${PROTOCOL_HEADERS}
"${CMAKE_CURRENT_BINARY_DIR}/include/graphene/chain/hardfork.hpp"
)
add_dependencies( graphene_chain build_hardfork_hpp )
target_link_libraries( graphene_chain fc graphene_db )
target_link_libraries( graphene_chain graphene_db )
target_include_directories( graphene_chain
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" )

View file

@ -22,8 +22,6 @@
* THE SOFTWARE.
*/
#include <fc/smart_ref_impl.hpp>
#include <graphene/chain/account_evaluator.hpp>
#include <graphene/chain/buyback.hpp>
#include <graphene/chain/buyback_object.hpp>
@ -55,7 +53,54 @@ void verify_authority_accounts( const database& db, const authority& a )
}
}
void verify_account_votes( const database& db, const account_options& options )
// Overwrites the num_son values from the origin to the destination for those sidechains which are found in the origin.
// Keeps the values of num_son for the sidechains which are found in the destination, but not in the origin.
// Returns false if an error is detected.
bool merge_num_sons( flat_map<sidechain_type, uint16_t>& destination,
const flat_map<sidechain_type, uint16_t>& origin,
fc::optional<time_point_sec> head_block_time = {})
{
const auto active_sidechains = head_block_time.valid() ? active_sidechain_types(*head_block_time) : all_sidechain_types;
bool success = true;
for (const auto &ns : origin)
{
destination[ns.first] = ns.second;
if (active_sidechains.find(ns.first) == active_sidechains.end())
{
success = false;
}
}
return success;
}
flat_map<sidechain_type, uint16_t> count_SON_votes_per_sidechain( const flat_set<vote_id_type>& votes )
{
flat_map<sidechain_type, uint16_t> SON_votes_per_sidechain = account_options::ext::empty_num_son();
for (const auto &vote : votes)
{
switch (vote.type())
{
case vote_id_type::son_bitcoin:
SON_votes_per_sidechain[sidechain_type::bitcoin]++;
break;
case vote_id_type::son_hive:
SON_votes_per_sidechain[sidechain_type::hive]++;
break;
case vote_id_type::son_ethereum:
SON_votes_per_sidechain[sidechain_type::ethereum]++;
break;
default:
break;
}
}
return SON_votes_per_sidechain;
}
void verify_account_votes( const database& db, const account_options& options, fc::optional<account_object> account = {} )
{
// ensure account's votes satisfy requirements
// NB only the part of vote checking that requires chain state is here,
@ -64,10 +109,47 @@ void verify_account_votes( const database& db, const account_options& options )
const auto& gpo = db.get_global_properties();
const auto& chain_params = gpo.parameters;
FC_ASSERT( db.find_object(options.voting_account), "Invalid proxy account specified." );
FC_ASSERT( options.num_witness <= chain_params.maximum_witness_count,
"Voted for more witnesses than currently allowed (${c})", ("c", chain_params.maximum_witness_count) );
FC_ASSERT( options.num_committee <= chain_params.maximum_committee_count,
"Voted for more committee members than currently allowed (${c})", ("c", chain_params.maximum_committee_count) );
FC_ASSERT( chain_params.extensions.value.maximum_son_count.valid() , "Invalid maximum son count" );
flat_map<sidechain_type, uint16_t> merged_num_sons = account_options::ext::empty_num_son();
// Merge with existing account if exists
if ( account.valid() && account->options.extensions.value.num_son.valid())
{
merge_num_sons( merged_num_sons, *account->options.extensions.value.num_son, db.head_block_time() );
}
// Apply update operation on top
if ( options.extensions.value.num_son.valid() )
{
merge_num_sons( merged_num_sons, *options.extensions.value.num_son, db.head_block_time() );
}
for(const auto& num_sons : merged_num_sons)
{
FC_ASSERT( num_sons.second <= *chain_params.extensions.value.maximum_son_count,
"Voted for more sons than currently allowed (${c})", ("c", *chain_params.extensions.value.maximum_son_count) );
}
// Count the votes for SONs and confirm that the account did not vote for less SONs than num_son
flat_map<sidechain_type, uint16_t> SON_votes_per_sidechain = count_SON_votes_per_sidechain(options.votes);
for (const auto& number_of_votes : SON_votes_per_sidechain)
{
// Number of votes of account_options are also checked in account_options::do_evaluate,
// but there we are checking the value before merging num_sons, so the values should be checked again
const auto sidechain = number_of_votes.first;
FC_ASSERT( number_of_votes.second >= merged_num_sons[sidechain],
"Voted for less sons than specified in num_son (votes ${v} < num_son ${ns}) for sidechain ${s}",
("v", number_of_votes.second) ("ns", merged_num_sons[sidechain]) ("s", sidechain) );
}
FC_ASSERT( db.find_object(options.voting_account), "Invalid proxy account specified." );
uint32_t max_vote_id = gpo.next_available_vote_id;
@ -181,6 +263,13 @@ object_id_type account_create_evaluator::do_apply( const account_create_operatio
obj.owner = o.owner;
obj.active = o.active;
obj.options = o.options;
obj.options.extensions.value.num_son = account_options::ext::empty_num_son();
if ( o.options.extensions.value.num_son.valid() )
{
merge_num_sons( *obj.options.extensions.value.num_son, *o.options.extensions.value.num_son );
}
obj.statistics = d.create<account_statistics_object>([&obj](account_statistics_object& s){
s.owner = obj.id;
s.name = obj.name;
@ -280,7 +369,7 @@ void_result account_update_evaluator::do_evaluate( const account_update_operatio
acnt = &o.account(d);
if( o.new_options.valid() )
verify_account_votes( d, *o.new_options );
verify_account_votes( d, *o.new_options, *acnt );
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
@ -319,7 +408,31 @@ void_result account_update_evaluator::do_apply( const account_update_operation&
a.active = *o.active;
a.top_n_control_flags = 0;
}
if( o.new_options ) a.options = *o.new_options;
// New num_son structure initialized to 0
flat_map<sidechain_type, uint16_t> new_num_son = account_options::ext::empty_num_son();
// If num_son of existing object is valid, we should merge the existing data
if ( a.options.extensions.value.num_son.valid() )
{
merge_num_sons( new_num_son, *a.options.extensions.value.num_son );
}
// If num_son of the operation are valid, they should merge the existing data
if ( o.new_options )
{
const auto new_options = *o.new_options;
if ( new_options.extensions.value.num_son.valid() )
{
merge_num_sons( new_num_son, *new_options.extensions.value.num_son );
}
a.options = *o.new_options;
}
a.options.extensions.value.num_son = new_num_son;
if( o.extensions.value.owner_special_authority.valid() )
{
a.owner_special_authority = *(o.extensions.value.owner_special_authority);

View file

@ -0,0 +1,162 @@
#include <graphene/chain/account_role_evaluator.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/chain/account_role_object.hpp>
#include <graphene/chain/hardfork.hpp>
#include <graphene/chain/rbac_hardfork_visitor.hpp>
namespace graphene
{
namespace chain
{
void_result account_role_create_evaluator::do_evaluate(const account_role_create_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner(d);
rbac_operation_hardfork_visitor arvtor(now);
for (const auto &op_type : op.allowed_operations)
{
arvtor(op_type);
}
for (const auto &acc : op.whitelisted_accounts)
{
acc(d);
}
FC_ASSERT(op.valid_to > now, "valid_to expiry should be in future");
FC_ASSERT((op.valid_to - now) <= fc::seconds(d.get_global_properties().parameters.account_roles_max_lifetime()), "Validity of the account role beyond max expiry");
const auto &ar_idx = d.get_index_type<account_role_index>().indices().get<by_owner>();
auto aro_range = ar_idx.equal_range(op.owner);
FC_ASSERT(std::distance(aro_range.first, aro_range.second) < d.get_global_properties().parameters.account_roles_max_per_account(), "Max account roles that can be created by one owner is reached");
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
object_id_type account_role_create_evaluator::do_apply(const account_role_create_operation &op)
{
try
{
database &d = db();
return d.create<account_role_object>([&op](account_role_object &obj) mutable {
obj.owner = op.owner;
obj.name = op.name;
obj.metadata = op.metadata;
obj.allowed_operations = op.allowed_operations;
obj.whitelisted_accounts = op.whitelisted_accounts;
obj.valid_to = op.valid_to;
})
.id;
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result account_role_update_evaluator::do_evaluate(const account_role_update_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner(d);
const account_role_object &aobj = op.account_role_id(d);
FC_ASSERT(aobj.owner == op.owner, "Only owner account can update account role object");
for (const auto &op_type : op.allowed_operations_to_remove)
{
FC_ASSERT(aobj.allowed_operations.find(op_type) != aobj.allowed_operations.end(),
"Cannot remove non existent operation");
}
for (const auto &acc : op.accounts_to_remove)
{
FC_ASSERT(aobj.whitelisted_accounts.find(acc) != aobj.whitelisted_accounts.end(),
"Cannot remove non existent account");
}
rbac_operation_hardfork_visitor arvtor(now);
for (const auto &op_type : op.allowed_operations_to_add)
{
arvtor(op_type);
}
FC_ASSERT((aobj.allowed_operations.size() + op.allowed_operations_to_add.size() - op.allowed_operations_to_remove.size()) > 0, "Allowed operations should be positive");
for (const auto &acc : op.accounts_to_add)
{
acc(d);
}
FC_ASSERT((aobj.whitelisted_accounts.size() + op.accounts_to_add.size() - op.accounts_to_remove.size()) > 0, "Accounts should be positive");
if (op.valid_to)
{
FC_ASSERT(*op.valid_to > now, "valid_to expiry should be in future");
FC_ASSERT((*op.valid_to - now) <= fc::seconds(d.get_global_properties().parameters.account_roles_max_lifetime()), "Validity of the account role beyond max expiry");
}
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result account_role_update_evaluator::do_apply(const account_role_update_operation &op)
{
try
{
database &d = db();
const account_role_object &aobj = op.account_role_id(d);
d.modify(aobj, [&op](account_role_object &obj) {
if (op.name)
obj.name = *op.name;
if (op.metadata)
obj.metadata = *op.metadata;
obj.allowed_operations.insert(op.allowed_operations_to_add.begin(), op.allowed_operations_to_add.end());
obj.whitelisted_accounts.insert(op.accounts_to_add.begin(), op.accounts_to_add.end());
for (const auto &op_type : op.allowed_operations_to_remove)
obj.allowed_operations.erase(op_type);
for (const auto &acc : op.accounts_to_remove)
obj.whitelisted_accounts.erase(acc);
if (op.valid_to)
obj.valid_to = *op.valid_to;
});
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result account_role_delete_evaluator::do_evaluate(const account_role_delete_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner(d);
const account_role_object &aobj = op.account_role_id(d);
FC_ASSERT(aobj.owner == op.owner, "Only owner account can delete account role object");
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result account_role_delete_evaluator::do_apply(const account_role_delete_operation &op)
{
try
{
database &d = db();
const account_role_object &aobj = op.account_role_id(d);
d.remove(aobj);
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
} // namespace chain
} // namespace graphene

View file

@ -42,8 +42,7 @@ void_result asset_create_evaluator::do_evaluate( const asset_create_operation& o
database& d = db();
if (d.head_block_time() < HARDFORK_SON_TIME)
FC_ASSERT(op.symbol != "BTC", "BTC asset creation before SON hardfork");
FC_ASSERT(d.is_asset_creation_allowed(op.symbol), "Asset creation not allowed at current time");
const auto& chain_parameters = d.get_global_properties().parameters;
FC_ASSERT( op.common_options.whitelist_authorities.size() <= chain_parameters.maximum_asset_whitelist_authorities );
@ -79,7 +78,7 @@ void_result asset_create_evaluator::do_evaluate( const asset_create_operation& o
{
auto dotpos = op.symbol.rfind( '.' );
if( dotpos != std::string::npos )
{
auto prefix = op.symbol.substr( 0, dotpos );
auto asset_symbol_itr = asset_indx.find( prefix );
@ -122,7 +121,7 @@ void_result asset_create_evaluator::do_evaluate( const asset_create_operation& o
FC_ASSERT( op.bitasset_opts );
FC_ASSERT( op.precision == op.bitasset_opts->short_backing_asset(d).precision );
}
return void_result();
} FC_CAPTURE_AND_RETHROW( (op) ) }
@ -177,7 +176,7 @@ object_id_type asset_create_evaluator::do_apply( const asset_create_operation& o
a.options.core_exchange_rate.base.asset_id = next_asset_id;
a.dynamic_asset_data_id = dyn_asset.id;
if( op.bitasset_opts.valid() )
a.bitasset_data_id = bit_asset_id;
});
@ -191,6 +190,8 @@ void_result lottery_asset_create_evaluator::do_evaluate( const lottery_asset_cre
database& d = db();
FC_ASSERT(d.is_asset_creation_allowed(op.symbol), "Lottery asset creation not allowed at current time");
const auto& chain_parameters = d.get_global_properties().parameters;
FC_ASSERT( op.common_options.whitelist_authorities.size() <= chain_parameters.maximum_asset_whitelist_authorities );
FC_ASSERT( op.common_options.blacklist_authorities.size() <= chain_parameters.maximum_asset_whitelist_authorities );
@ -225,7 +226,7 @@ void_result lottery_asset_create_evaluator::do_evaluate( const lottery_asset_cre
{
auto dotpos = op.symbol.rfind( '.' );
if( dotpos != std::string::npos )
{
auto prefix = op.symbol.substr( 0, dotpos );
auto asset_symbol_itr = asset_indx.find( prefix );
@ -578,7 +579,7 @@ void_result asset_update_dividend_evaluator::do_evaluate(const asset_update_divi
auto& params = db().get_global_properties().parameters;
if (o.new_options.payout_interval &&
*o.new_options.payout_interval < params.maintenance_interval)
FC_THROW("New payout interval may not be less than the maintenance interval",
FC_THROW("New payout interval may not be less than the maintenance interval",
("new_payout_interval", o.new_options.payout_interval)("maintenance_interval", params.maintenance_interval));
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
@ -596,7 +597,6 @@ void_result asset_update_dividend_evaluator::do_apply( const asset_update_divide
obj.referrer = op.issuer;
obj.lifetime_referrer = op.issuer(db()).lifetime_referrer;
auto& params = db().get_global_properties().parameters;
obj.network_fee_percentage = GRAPHENE_DEFAULT_NETWORK_PERCENT_OF_FEE;
obj.lifetime_referrer_fee_percentage = GRAPHENE_DEFAULT_LIFETIME_REFERRER_PERCENT_OF_FEE;
obj.referrer_rewards_percentage = GRAPHENE_DEFAULT_LIFETIME_REFERRER_PERCENT_OF_FEE;

View file

@ -23,6 +23,8 @@
*/
#include <graphene/chain/asset_object.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/chain/operation_history_object.hpp>
#include <graphene/chain/hardfork.hpp>
#include <fc/io/raw.hpp>
#include <fc/uint128.hpp>
@ -185,6 +187,41 @@ vector<account_id_type> asset_object::get_holders( database& db ) const
return holders;
}
vector<uint64_t> asset_object::get_ticket_ids( database& db ) const
{
auto& asset_bal_idx = db.get_index_type< account_balance_index >().indices().get< by_asset_balance >();
vector<uint64_t> ids;
const auto range = asset_bal_idx.equal_range( boost::make_tuple( get_id() ) );
for( const account_balance_object& bal : boost::make_iterator_range( range.first, range.second ) )
{
const auto& stats = bal.owner(db).statistics(db);
const account_transaction_history_object* ath = static_cast<const account_transaction_history_object*>(&stats.most_recent_op(db));
for( uint64_t balance = bal.balance.value; balance > 0;)
{
if(ath != nullptr)
{
const operation_history_object& oho = db.get<operation_history_object>( ath->operation_id );
if( oho.op.which() == operation::tag<ticket_purchase_operation>::value && get_id() == oho.op.get<ticket_purchase_operation>().lottery)
{
uint64_t tickets_count = oho.op.get<ticket_purchase_operation>().tickets_to_buy;
ids.insert(ids.end(), tickets_count, oho.id.instance());
balance -= tickets_count;
assert(balance >= 0);
}
if( ath->next == account_transaction_history_id_type() )
{
ath = nullptr;
break;
}
else ath = db.find(ath->next);
}
}
}
return ids;
}
void asset_object::distribute_benefactors_part( database& db )
{
transaction_evaluation_state eval( &db );
@ -206,6 +243,7 @@ map< account_id_type, vector< uint16_t > > asset_object::distribute_winners_part
transaction_evaluation_state eval( &db );
auto holders = get_holders( db );
vector<uint64_t> ticket_ids = get_ticket_ids(db);
FC_ASSERT( dynamic_data( db ).current_supply == holders.size() );
map<account_id_type, vector<uint16_t> > structurized_participants;
for( account_id_type holder : holders )
@ -228,12 +266,17 @@ map< account_id_type, vector< uint16_t > > asset_object::distribute_winners_part
*t += percents_to_distribute / holders.size();
}
auto sweeps_distribution_percentage = db.get_global_properties().parameters.sweeps_distribution_percentage();
for( int c = 0; c < winner_numbers.size(); ++c ) {
for( size_t c = 0; c < winner_numbers.size(); ++c ) {
auto winner_num = winner_numbers[c];
lottery_reward_operation reward_op;
reward_op.lottery = get_id();
reward_op.is_benefactor_reward = false;
reward_op.winner = holders[winner_num];
if(db.head_block_time() > HARDFORK_5050_1_TIME && ticket_ids.size() > winner_num)
{
const static_variant<uint64_t, void_t> tkt_id = ticket_ids[winner_num];
reward_op.winner_ticket_id = tkt_id;
}
reward_op.win_percentage = tickets[c];
reward_op.amount = asset( jackpot * tickets[c] * ( 1. - sweeps_distribution_percentage / (double)GRAPHENE_100_PERCENT ) / GRAPHENE_100_PERCENT , db.get_balance(id).asset_id );
db.apply_operation(eval, reward_op);

View file

@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#define DEFAULT_LOGGER "betting"
#include <fc/smart_ref_impl.hpp>
#include <graphene/chain/betting_market_evaluator.hpp>
#include <graphene/chain/betting_market_object.hpp>

View file

@ -541,7 +541,7 @@ void betting_market_group_object::dispatch_new_status(database& db, betting_mark
} } // graphene::chain
namespace fc {
namespace fc {
// Manually reflect betting_market_group_object to variant to properly reflect "state"
void to_variant(const graphene::chain::betting_market_group_object& betting_market_group_obj, fc::variant& v, uint32_t max_depth)
{

View file

@ -466,7 +466,7 @@ void betting_market_object::on_canceled_event(database& db)
} } // graphene::chain
namespace fc {
namespace fc {
// Manually reflect betting_market_object to variant to properly reflect "state"
void to_variant(const graphene::chain::betting_market_object& event_obj, fc::variant& v, uint32_t max_depth)
{
@ -493,4 +493,3 @@ namespace fc {
const_cast<int*>(event_obj.my->state_machine.current_state())[0] = (int)status;
}
} //end namespace fc

View file

@ -24,7 +24,6 @@
#include <graphene/chain/block_database.hpp>
#include <graphene/chain/protocol/fee_schedule.hpp>
#include <fc/io/raw.hpp>
#include <fc/smart_ref_impl.hpp>
namespace graphene { namespace chain {
@ -77,6 +76,10 @@ void block_database::flush()
void block_database::store( const block_id_type& _id, const signed_block& b )
{
if (true == replay_mode){
return;
}
block_id_type id = _id;
if( id == block_id_type() )
{
@ -100,8 +103,15 @@ void block_database::remove( const block_id_type& id )
index_entry e;
auto index_pos = sizeof(e)*block_header::num_from_id(id);
_block_num_to_pos.seekg( 0, _block_num_to_pos.end );
if ( _block_num_to_pos.tellg() <= index_pos )
std::streampos s_pos = _block_num_to_pos.tellg();
if (-1 == s_pos){
FC_THROW_EXCEPTION(fc::key_not_found_exception, "Block ${id} not contained in block database, _block_num_to_pos.tellg failed", ("id", id));
}
if ( static_cast<uint32_t>(s_pos) <= index_pos ){
FC_THROW_EXCEPTION(fc::key_not_found_exception, "Block ${id} not contained in block database", ("id", id));
}
_block_num_to_pos.seekg( index_pos );
_block_num_to_pos.read( (char*)&e, sizeof(e) );
@ -115,20 +125,27 @@ void block_database::remove( const block_id_type& id )
} FC_CAPTURE_AND_RETHROW( (id) ) }
bool block_database::contains( const block_id_type& id )const
{
{ try {
if( id == block_id_type() )
return false;
index_entry e;
auto index_pos = sizeof(e)*block_header::num_from_id(id);
_block_num_to_pos.seekg( 0, _block_num_to_pos.end );
if ( _block_num_to_pos.tellg() < index_pos + sizeof(e) )
std::streampos s_pos = _block_num_to_pos.tellg();
if (-1 == s_pos){
FC_THROW_EXCEPTION(fc::key_not_found_exception, "Block ${id} not contained in block database, _block_num_to_pos.tellg failed", ("id", id));
}
if ( static_cast<uint32_t>(s_pos) < index_pos + sizeof(e) )
return false;
_block_num_to_pos.seekg( index_pos );
_block_num_to_pos.read( (char*)&e, sizeof(e) );
return e.block_id == id && e.block_size > 0;
}
} FC_CAPTURE_AND_RETHROW( (id) ) }
block_id_type block_database::fetch_block_id( uint32_t block_num )const
{
@ -153,7 +170,13 @@ optional<signed_block> block_database::fetch_optional( const block_id_type& id )
index_entry e;
auto index_pos = sizeof(e)*block_header::num_from_id(id);
_block_num_to_pos.seekg( 0, _block_num_to_pos.end );
if ( _block_num_to_pos.tellg() <= index_pos )
std::streampos s_pos = _block_num_to_pos.tellg();
if (-1 == s_pos){
FC_THROW_EXCEPTION(fc::key_not_found_exception, "Block ${id} not contained in block database, _block_num_to_pos.tellg failed", ("id", id));
}
if ( static_cast<uint32_t>(s_pos) <= index_pos )
return {};
_block_num_to_pos.seekg( index_pos );
@ -185,7 +208,12 @@ optional<signed_block> block_database::fetch_by_number( uint32_t block_num )cons
index_entry e;
auto index_pos = sizeof(e)*block_num;
_block_num_to_pos.seekg( 0, _block_num_to_pos.end );
if ( _block_num_to_pos.tellg() <= index_pos )
std::streampos s_pos = _block_num_to_pos.tellg();
if (-1 == s_pos){
FC_THROW_EXCEPTION(fc::key_not_found_exception, "Block ${block_num} not contained in block database, _block_num_to_pos.tellg failed", ("block_num", block_num));
}
if ( static_cast<uint32_t>(s_pos) <= index_pos )
return {};
_block_num_to_pos.seekg( index_pos, _block_num_to_pos.beg );
@ -214,7 +242,11 @@ optional<index_entry> block_database::last_index_entry()const {
_block_num_to_pos.seekg( 0, _block_num_to_pos.end );
std::streampos pos = _block_num_to_pos.tellg();
if( pos < sizeof(index_entry) )
if (-1 == pos){
FC_THROW_EXCEPTION(fc::key_not_found_exception, "last_index_entry tellg failed");
}
if( static_cast<size_t>(pos) < sizeof(index_entry) )
return optional<index_entry>();
pos -= pos % sizeof(index_entry);
@ -227,7 +259,7 @@ optional<index_entry> block_database::last_index_entry()const {
_block_num_to_pos.seekg( pos );
_block_num_to_pos.read( (char*)&e, sizeof(e) );
if( _block_num_to_pos.gcount() == sizeof(e) && e.block_size > 0
&& e.block_pos + e.block_size <= blocks_size )
&& e.block_pos + static_cast<uint64_t>(e.block_size) <= static_cast<uint64_t>(blocks_size) )
try
{
vector<char> data( e.block_size );
@ -272,4 +304,9 @@ optional<block_id_type> block_database::last_id()const
return optional<block_id_type>();
}
void block_database::set_replay_mode(bool mode)
{
replay_mode = mode;
}
} }

View file

@ -30,8 +30,6 @@
#include <graphene/chain/protocol/vote.hpp>
#include <graphene/chain/transaction_evaluation_state.hpp>
#include <fc/smart_ref_impl.hpp>
namespace graphene { namespace chain {
void_result committee_member_create_evaluator::do_evaluate( const committee_member_create_operation& op )

View file

@ -29,155 +29,167 @@
#include <graphene/chain/fba_accumulator_id.hpp>
#include <graphene/chain/hardfork.hpp>
#include <fc/smart_ref_impl.hpp>
namespace graphene { namespace chain {
void_result transfer_to_blind_evaluator::do_evaluate( const transfer_to_blind_operation& o )
{ try {
const auto& d = db();
const auto& d = db();
if( d.head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME )
{
const auto& atype = o.amount.asset_id(d);
FC_ASSERT( atype.allow_confidential() );
FC_ASSERT( !atype.is_transfer_restricted() );
FC_ASSERT( !(atype.options.flags & white_list) );
const auto& atype = o.amount.asset_id(db());
FC_ASSERT( atype.allow_confidential() );
FC_ASSERT( !atype.is_transfer_restricted() );
FC_ASSERT( !(atype.options.flags & white_list) );
for( const auto& out : o.outputs )
{
for( const auto& a : out.owner.account_auths )
a.first(d); // verify all accounts exist and are valid
}
}
for( const auto& out : o.outputs )
{
for( const auto& a : out.owner.account_auths )
a.first(d); // verify all accounts exist and are valid
}
return void_result();
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
void_result transfer_to_blind_evaluator::do_apply( const transfer_to_blind_operation& o )
void_result transfer_to_blind_evaluator::do_apply( const transfer_to_blind_operation& o )
{ try {
db().adjust_balance( o.from, -o.amount );
if( db().head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
db().adjust_balance(o.from, -o.amount);
const auto& add = o.amount.asset_id(db()).dynamic_asset_data_id(db()); // verify fee is a legit asset
db().modify( add, [&]( asset_dynamic_data_object& obj ){
obj.confidential_supply += o.amount.amount;
FC_ASSERT( obj.confidential_supply >= 0 );
});
for( const auto& out : o.outputs )
{
db().create<blinded_balance_object>( [&]( blinded_balance_object& obj ){
obj.asset_id = o.amount.asset_id;
obj.owner = out.owner;
obj.commitment = out.commitment;
});
}
return void_result();
const auto &add = o.amount.asset_id(db()).dynamic_asset_data_id(db()); // verify fee is a legit asset
db().modify(add, [&](asset_dynamic_data_object &obj) {
obj.confidential_supply += o.amount.amount;
FC_ASSERT(obj.confidential_supply >= 0);
});
for (const auto &out : o.outputs) {
db().create<blinded_balance_object>([&](blinded_balance_object &obj) {
obj.asset_id = o.amount.asset_id;
obj.owner = out.owner;
obj.commitment = out.commitment;
});
}
}
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
void transfer_to_blind_evaluator::pay_fee()
{
if( db().head_block_time() >= HARDFORK_563_TIME )
pay_fba_fee( fba_accumulator_id_transfer_to_blind );
else
generic_evaluator::pay_fee();
const auto& d = db();
if( d.head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
if (d.head_block_time() >= HARDFORK_563_TIME)
pay_fba_fee(fba_accumulator_id_transfer_to_blind);
else
generic_evaluator::pay_fee();
}
}
void_result transfer_from_blind_evaluator::do_evaluate( const transfer_from_blind_operation& o )
{ try {
const auto& d = db();
o.fee.asset_id(d); // verify fee is a legit asset
const auto& bbi = d.get_index_type<blinded_balance_index>();
const auto& cidx = bbi.indices().get<by_commitment>();
for( const auto& in : o.inputs )
{
auto itr = cidx.find( in.commitment );
FC_ASSERT( itr != cidx.end() );
FC_ASSERT( itr->asset_id == o.fee.asset_id );
FC_ASSERT( itr->owner == in.owner );
}
return void_result();
const auto& d = db();
if( d.head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
o.fee.asset_id(d); // verify fee is a legit asset
const auto &bbi = d.get_index_type<blinded_balance_index>();
const auto &cidx = bbi.indices().get<by_commitment>();
for (const auto &in : o.inputs) {
auto itr = cidx.find(in.commitment);
FC_ASSERT(itr != cidx.end());
FC_ASSERT(itr->asset_id == o.fee.asset_id);
FC_ASSERT(itr->owner == in.owner);
}
}
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
void_result transfer_from_blind_evaluator::do_apply( const transfer_from_blind_operation& o )
void_result transfer_from_blind_evaluator::do_apply( const transfer_from_blind_operation& o )
{ try {
db().adjust_balance( o.fee_payer(), o.fee );
db().adjust_balance( o.to, o.amount );
const auto& bbi = db().get_index_type<blinded_balance_index>();
const auto& cidx = bbi.indices().get<by_commitment>();
for( const auto& in : o.inputs )
{
auto itr = cidx.find( in.commitment );
FC_ASSERT( itr != cidx.end() );
db().remove( *itr );
}
const auto& add = o.amount.asset_id(db()).dynamic_asset_data_id(db()); // verify fee is a legit asset
db().modify( add, [&]( asset_dynamic_data_object& obj ){
obj.confidential_supply -= o.amount.amount + o.fee.amount;
FC_ASSERT( obj.confidential_supply >= 0 );
});
return void_result();
if( db().head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
db().adjust_balance(o.fee_payer(), o.fee);
db().adjust_balance(o.to, o.amount);
const auto &bbi = db().get_index_type<blinded_balance_index>();
const auto &cidx = bbi.indices().get<by_commitment>();
for (const auto &in : o.inputs) {
auto itr = cidx.find(in.commitment);
FC_ASSERT(itr != cidx.end());
db().remove(*itr);
}
const auto &add = o.amount.asset_id(db()).dynamic_asset_data_id(db()); // verify fee is a legit asset
db().modify(add, [&](asset_dynamic_data_object &obj) {
obj.confidential_supply -= o.amount.amount + o.fee.amount;
FC_ASSERT(obj.confidential_supply >= 0);
});
}
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
void transfer_from_blind_evaluator::pay_fee()
{
if( db().head_block_time() >= HARDFORK_563_TIME )
pay_fba_fee( fba_accumulator_id_transfer_from_blind );
else
generic_evaluator::pay_fee();
const auto& d = db();
if( d.head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
if (d.head_block_time() >= HARDFORK_563_TIME)
pay_fba_fee(fba_accumulator_id_transfer_from_blind);
else
generic_evaluator::pay_fee();
}
}
void_result blind_transfer_evaluator::do_evaluate( const blind_transfer_operation& o )
{ try {
const auto& d = db();
o.fee.asset_id(db()); // verify fee is a legit asset
const auto& bbi = db().get_index_type<blinded_balance_index>();
const auto& cidx = bbi.indices().get<by_commitment>();
for( const auto& out : o.outputs )
{
for( const auto& a : out.owner.account_auths )
a.first(d); // verify all accounts exist and are valid
}
for( const auto& in : o.inputs )
{
auto itr = cidx.find( in.commitment );
GRAPHENE_ASSERT( itr != cidx.end(), blind_transfer_unknown_commitment, "", ("commitment",in.commitment) );
FC_ASSERT( itr->asset_id == o.fee.asset_id );
FC_ASSERT( itr->owner == in.owner );
}
return void_result();
const auto& d = db();
if( d.head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
o.fee.asset_id(d); // verify fee is a legit asset
const auto &bbi = d.get_index_type<blinded_balance_index>();
const auto &cidx = bbi.indices().get<by_commitment>();
for (const auto &out : o.outputs) {
for (const auto &a : out.owner.account_auths)
a.first(d); // verify all accounts exist and are valid
}
for (const auto &in : o.inputs) {
auto itr = cidx.find(in.commitment);
GRAPHENE_ASSERT(itr != cidx.end(), blind_transfer_unknown_commitment, "", ("commitment", in.commitment));
FC_ASSERT(itr->asset_id == o.fee.asset_id);
FC_ASSERT(itr->owner == in.owner);
}
}
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
void_result blind_transfer_evaluator::do_apply( const blind_transfer_operation& o )
void_result blind_transfer_evaluator::do_apply( const blind_transfer_operation& o )
{ try {
db().adjust_balance( o.fee_payer(), o.fee ); // deposit the fee to the temp account
const auto& bbi = db().get_index_type<blinded_balance_index>();
const auto& cidx = bbi.indices().get<by_commitment>();
for( const auto& in : o.inputs )
{
auto itr = cidx.find( in.commitment );
GRAPHENE_ASSERT( itr != cidx.end(), blind_transfer_unknown_commitment, "", ("commitment",in.commitment) );
db().remove( *itr );
}
for( const auto& out : o.outputs )
{
db().create<blinded_balance_object>( [&]( blinded_balance_object& obj ){
obj.asset_id = o.fee.asset_id;
obj.owner = out.owner;
obj.commitment = out.commitment;
});
}
const auto& add = o.fee.asset_id(db()).dynamic_asset_data_id(db());
db().modify( add, [&]( asset_dynamic_data_object& obj ){
obj.confidential_supply -= o.fee.amount;
FC_ASSERT( obj.confidential_supply >= 0 );
});
return void_result();
if( db().head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
db().adjust_balance(o.fee_payer(), o.fee); // deposit the fee to the temp account
const auto &bbi = db().get_index_type<blinded_balance_index>();
const auto &cidx = bbi.indices().get<by_commitment>();
for (const auto &in : o.inputs) {
auto itr = cidx.find(in.commitment);
GRAPHENE_ASSERT(itr != cidx.end(), blind_transfer_unknown_commitment, "", ("commitment", in.commitment));
db().remove(*itr);
}
for (const auto &out : o.outputs) {
db().create<blinded_balance_object>([&](blinded_balance_object &obj) {
obj.asset_id = o.fee.asset_id;
obj.owner = out.owner;
obj.commitment = out.commitment;
});
}
const auto &add = o.fee.asset_id(db()).dynamic_asset_data_id(db());
db().modify(add, [&](asset_dynamic_data_object &obj) {
obj.confidential_supply -= o.fee.amount;
FC_ASSERT(obj.confidential_supply >= 0);
});
}
return void_result();
} FC_CAPTURE_AND_RETHROW( (o) ) }
void blind_transfer_evaluator::pay_fee()
{
if( db().head_block_time() >= HARDFORK_563_TIME )
pay_fba_fee( fba_accumulator_id_blind_transfer );
else
generic_evaluator::pay_fee();
const auto& d = db();
if( d.head_block_time() < HARDFORK_SON_FOR_ETHEREUM_TIME ) {
if (d.head_block_time() >= HARDFORK_563_TIME)
pay_fba_fee(fba_accumulator_id_blind_transfer);
else
generic_evaluator::pay_fee();
}
}
} } // graphene::chain

View file

@ -0,0 +1,128 @@
#include <graphene/chain/custom_account_authority_evaluator.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/chain/custom_account_authority_object.hpp>
#include <graphene/chain/custom_permission_object.hpp>
#include <graphene/chain/hardfork.hpp>
#include <graphene/chain/rbac_hardfork_visitor.hpp>
namespace graphene
{
namespace chain
{
void_result create_custom_account_authority_evaluator::do_evaluate(const custom_account_authority_create_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner_account(d);
const custom_permission_object &pobj = op.permission_id(d);
FC_ASSERT(pobj.account == op.owner_account, "Only owner account can update account authority object");
FC_ASSERT(op.valid_to > now, "valid_to expiry should be in future");
FC_ASSERT((op.valid_to - op.valid_from) <= fc::seconds(d.get_global_properties().parameters.rbac_max_account_authority_lifetime()), "Validity of the auth beyond max expiry");
rbac_operation_hardfork_visitor rvtor(now);
rvtor(op.operation_type);
const auto& cindex = d.get_index_type<custom_account_authority_index>().indices().get<by_permission_and_op>();
auto count = cindex.count(boost::make_tuple(op.permission_id));
FC_ASSERT(count < d.get_global_properties().parameters.rbac_max_authorities_per_permission(), "Max operations that can be linked to a permission reached");
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
object_id_type create_custom_account_authority_evaluator::do_apply(const custom_account_authority_create_operation &op)
{
try
{
database &d = db();
return d.create<custom_account_authority_object>([&op](custom_account_authority_object &obj) mutable {
obj.permission_id = op.permission_id;
obj.operation_type = op.operation_type;
obj.valid_from = op.valid_from;
obj.valid_to = op.valid_to;
})
.id;
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result update_custom_account_authority_evaluator::do_evaluate(const custom_account_authority_update_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner_account(d);
const custom_account_authority_object &aobj = op.auth_id(d);
const custom_permission_object &pobj = aobj.permission_id(d);
FC_ASSERT(pobj.account == op.owner_account, "Only owner account can update account authority object");
auto valid_from = aobj.valid_from;
auto valid_to = aobj.valid_to;
if (op.new_valid_from)
{
valid_from = *op.new_valid_from;
}
if (op.new_valid_to)
{
FC_ASSERT(*op.new_valid_to > now, "New valid_to expiry should be in the future");
valid_to = *op.new_valid_to;
}
FC_ASSERT(valid_from < valid_to, "valid_from should be before valid_to");
FC_ASSERT((valid_to - valid_from) <= fc::seconds(d.get_global_properties().parameters.rbac_max_account_authority_lifetime()), "Validity of the auth beyond max expiry");
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
object_id_type update_custom_account_authority_evaluator::do_apply(const custom_account_authority_update_operation &op)
{
try
{
database &d = db();
const custom_account_authority_object &aobj = op.auth_id(d);
d.modify(aobj, [&op](custom_account_authority_object &obj) {
if (op.new_valid_from)
obj.valid_from = *op.new_valid_from;
if (op.new_valid_to)
obj.valid_to = *op.new_valid_to;
});
return op.auth_id;
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result delete_custom_account_authority_evaluator::do_evaluate(const custom_account_authority_delete_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner_account(d);
const custom_account_authority_object &aobj = op.auth_id(d);
const custom_permission_object &pobj = aobj.permission_id(d);
FC_ASSERT(pobj.account == op.owner_account, "Only owner account can delete account authority object");
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result delete_custom_account_authority_evaluator::do_apply(const custom_account_authority_delete_operation &op)
{
try
{
database &d = db();
const custom_account_authority_object &aobj = op.auth_id(d);
d.remove(aobj);
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
} // namespace chain
} // namespace graphene

View file

@ -0,0 +1,133 @@
#include <graphene/chain/custom_permission_evaluator.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/chain/custom_permission_object.hpp>
#include <graphene/chain/custom_account_authority_object.hpp>
#include <graphene/chain/hardfork.hpp>
namespace graphene
{
namespace chain
{
void_result create_custom_permission_evaluator::do_evaluate(const custom_permission_create_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner_account(d);
for (const auto &account_weight_pair : op.auth.account_auths)
{
account_weight_pair.first(d);
}
const auto &pindex = d.get_index_type<custom_permission_index>().indices().get<by_account_and_permission>();
auto pitr = pindex.find(boost::make_tuple(op.owner_account, op.permission_name));
FC_ASSERT(pitr == pindex.end(), "Permission name already exists for the given account");
auto count = pindex.count(boost::make_tuple(op.owner_account));
FC_ASSERT(count < d.get_global_properties().parameters.rbac_max_permissions_per_account(), "Max permissions per account reached");
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
object_id_type create_custom_permission_evaluator::do_apply(const custom_permission_create_operation &op)
{
try
{
database &d = db();
return d.create<custom_permission_object>([&op](custom_permission_object &obj) mutable {
obj.account = op.owner_account;
obj.permission_name = op.permission_name;
obj.auth = op.auth;
})
.id;
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result update_custom_permission_evaluator::do_evaluate(const custom_permission_update_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner_account(d);
const custom_permission_object &pobj = op.permission_id(d);
FC_ASSERT(pobj.account == op.owner_account, "Only owner account can update permission object");
if (op.new_auth)
{
FC_ASSERT(!(*op.new_auth == pobj.auth), "New authority provided is not different from old authority");
for (const auto &account_weight_pair : op.new_auth->account_auths)
{
account_weight_pair.first(d);
}
}
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
object_id_type update_custom_permission_evaluator::do_apply(const custom_permission_update_operation &op)
{
try
{
database &d = db();
const custom_permission_object &pobj = op.permission_id(d);
d.modify(pobj, [&op](custom_permission_object &obj) {
if (op.new_auth)
obj.auth = *op.new_auth;
});
return op.permission_id;
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result delete_custom_permission_evaluator::do_evaluate(const custom_permission_delete_operation &op)
{
try
{
const database &d = db();
auto now = d.head_block_time();
FC_ASSERT(now >= HARDFORK_NFT_TIME, "Not allowed until NFT HF");
op.owner_account(d);
const custom_permission_object &pobj = op.permission_id(d);
FC_ASSERT(pobj.account == op.owner_account, "Only owner account can delete permission object");
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
void_result delete_custom_permission_evaluator::do_apply(const custom_permission_delete_operation &op)
{
try
{
database &d = db();
const custom_permission_object &pobj = op.permission_id(d);
// Remove the account authority objects linked to this permission
const auto& cindex = d.get_index_type<custom_account_authority_index>().indices().get<by_permission_and_op>();
vector<std::reference_wrapper<const custom_account_authority_object>> custom_auths;
auto crange = cindex.equal_range(boost::make_tuple(pobj.id));
// Store the references to the account authorities
for(const custom_account_authority_object& cobj : boost::make_iterator_range(crange.first, crange.second))
{
custom_auths.push_back(cobj);
}
// Now remove the account authorities
for(const auto& cauth : custom_auths)
{
d.remove(cauth);
}
// Now finally remove the permission
d.remove(pobj);
return void_result();
}
FC_CAPTURE_AND_RETHROW((op))
}
} // namespace chain
} // namespace graphene

View file

@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <fc/smart_ref_impl.hpp>
#include "db_balance.cpp"
#include "db_bet.cpp"
#include "db_block.cpp"
@ -31,7 +30,6 @@
#include "db_maint.cpp"
#include "db_management.cpp"
#include "db_market.cpp"
#include "db_sidechain.cpp"
#include "db_notify.cpp"
#include "db_update.cpp"
#include "db_witness_schedule.cpp"
#include "db_notify.cpp"

View file

@ -140,8 +140,10 @@ void database::adjust_sweeps_vesting_balance(account_id_type account, int64_t de
b.balance = delta;
});
} else {
if( delta < 0 )
FC_ASSERT( itr->get_balance() >= -delta, "Insufficient Balance: ${a}'s balance of ${b} is less than required ${r}", ("a",account)("b",itr->get_balance())("r",-delta));
if( delta < 0 ) {
uint64_t delta_uint64 = -delta;
FC_ASSERT( itr->get_balance() >= delta_uint64, "Insufficient Balance: ${a}'s balance of ${b} is less than required ${r}", ("a",account)("b",itr->get_balance())("r",-delta));
}
modify(*itr, [&delta,&asset_id,this](sweeps_vesting_balance_object& b) {
b.adjust_balance( asset( delta, asset_id ) );
b.last_claim_date = head_block_time();

View file

@ -303,8 +303,6 @@ void database::settle_betting_market_group(const betting_market_group_object& be
remove(betting_market);
}
const event_object& event = betting_market_group.event_id(*this);
fc_dlog(fc::logger::get("betting"), "removing betting market group ${id}", ("id", betting_market_group.id));
remove(betting_market_group);
@ -537,11 +535,9 @@ int match_bet(database& db, const bet_object& taker_bet, const bet_object& maker
// because we matched at the maker's odds and not the taker's odds, the remaining amount to match
// may not be an even multiple of the taker's odds; round it down.
share_type taker_remaining_factor = unrounded_taker_remaining_amount_to_match / takers_odds_maker_odds_ratio;
share_type taker_remaining_maker_amount_to_match = taker_remaining_factor * takers_odds_maker_odds_ratio;
share_type taker_remaining_bet_amount = taker_remaining_factor * takers_odds_taker_odds_ratio;
taker_refund_amount = taker_bet.amount_to_bet.amount - taker_amount_to_match - taker_remaining_bet_amount;
//idump((taker_remaining_factor)(taker_remaining_maker_amount_to_match)(taker_remaining_bet_amount)(taker_refund_amount));
}
if (taker_refund_amount > share_type())

View file

@ -40,16 +40,17 @@
#include <graphene/chain/exceptions.hpp>
#include <graphene/chain/evaluator.hpp>
#include <graphene/chain/witness_schedule_object.hpp>
#include <graphene/db/object_database.hpp>
#include <fc/crypto/digest.hpp>
#include <fc/smart_ref_impl.hpp>
#include <boost/filesystem.hpp>
namespace {
struct proposed_operations_digest_accumulator
{
typedef void result_type;
void operator()(const graphene::chain::proposal_create_operation& proposal)
{
for (auto& operation: proposal.proposed_ops)
@ -57,20 +58,20 @@ namespace {
proposed_operations_digests.push_back(fc::digest(operation.op));
}
}
//empty template method is needed for all other operation types
//we can ignore them, we are interested in only proposal_create_operation
template<class T>
void operator()(const T&)
void operator()(const T&)
{}
std::vector<fc::sha256> proposed_operations_digests;
};
std::vector<fc::sha256> gather_proposed_operations_digests(const graphene::chain::transaction& trx)
{
proposed_operations_digest_accumulator digest_accumulator;
for (auto& operation: trx.operations)
{
if( operation.which() != graphene::chain::operation::tag<graphene::chain::betting_market_group_create_operation>::value
@ -79,7 +80,7 @@ namespace {
else
edump( ("Found dup"));
}
return digest_accumulator.proposed_operations_digests;
}
}
@ -149,24 +150,27 @@ std::vector<block_id_type> database::get_block_ids_on_fork(block_id_type head_of
result.emplace_back(branches.first.back()->previous_id());
return result;
}
void database::check_tansaction_for_duplicated_operations(const signed_transaction& trx)
void database::check_transaction_for_duplicated_operations(const signed_transaction& trx)
{
const auto& proposal_index = get_index<proposal_object>();
std::set<fc::sha256> existed_operations_digests;
proposal_index.inspect_all_objects( [&](const object& obj){
const proposal_object& proposal = static_cast<const proposal_object&>(obj);
auto proposed_operations_digests = gather_proposed_operations_digests( proposal.proposed_transaction );
existed_operations_digests.insert( proposed_operations_digests.begin(), proposed_operations_digests.end() );
});
for (auto& pending_transaction: _pending_tx)
{
auto proposed_operations_digests = gather_proposed_operations_digests(pending_transaction);
existed_operations_digests.insert(proposed_operations_digests.begin(), proposed_operations_digests.end());
const std::lock_guard<std::mutex> pending_tx_lock{_pending_tx_mutex};
for (auto &pending_transaction : _pending_tx)
{
auto proposed_operations_digests = gather_proposed_operations_digests(pending_transaction);
existed_operations_digests.insert(proposed_operations_digests.begin(), proposed_operations_digests.end());
}
}
auto proposed_operations_digests = gather_proposed_operations_digests(trx);
for (auto& digest: proposed_operations_digests)
{
@ -186,7 +190,12 @@ bool database::push_block(const signed_block& new_block, uint32_t skip)
bool result;
detail::with_skip_flags( *this, skip, [&]()
{
detail::without_pending_transactions( *this, std::move(_pending_tx),
std::vector<processed_transaction> pending_tx = [this] {
const std::lock_guard<std::mutex> pending_tx_lock{_pending_tx_mutex};
return std::move(_pending_tx);
}();
detail::without_pending_transactions( *this, std::move(pending_tx),
[&]()
{
result = _push_block(new_block);
@ -197,6 +206,9 @@ bool database::push_block(const signed_block& new_block, uint32_t skip)
bool database::_push_block(const signed_block& new_block)
{ try {
boost::filesystem::space_info si = boost::filesystem::space(get_data_dir());
FC_ASSERT((si.available) > 104857600, "Rejecting block due to low disk space"); // 104857600 bytes = 100 MB
uint32_t skip = get_node_properties().skip_flags;
const auto now = fc::time_point::now().sec_since_epoch();
@ -338,7 +350,7 @@ void database::verify_signing_witness( const signed_block& new_block, const fork
FC_ASSERT( new_block.witness == wid, "Witness produced block at wrong time",
("block witness",new_block.witness)("scheduled",wid)("slot_num",slot_num) );
FC_ASSERT( new_block.validate_signee( wid(*this).signing_key ) );
}
}
}
void database::update_witnesses( fork_item& fork_entry )const
@ -352,7 +364,7 @@ void database::update_witnesses( fork_item& fork_entry )const
const witness_schedule_object& wso = get_witness_schedule_object();
fork_entry.scheduled_witnesses = std::make_shared< vector< pair< witness_id_type, public_key_type > > >();
fork_entry.scheduled_witnesses->reserve( wso.current_shuffled_witnesses.size() );
for( size_t i = 0; i < wso.current_shuffled_witnesses.size(); ++i )
{
const auto& witness = wso.current_shuffled_witnesses[i](*this);
@ -383,17 +395,26 @@ processed_transaction database::_push_transaction( const signed_transaction& trx
{
// If this is the first transaction pushed after applying a block, start a new undo session.
// This allows us to quickly rewind to the clean state of the head block, in case a new block arrives.
if( !_pending_tx_session.valid() )
_pending_tx_session = _undo_db.start_undo_session();
{
const std::lock_guard<std::mutex> pending_tx_session_lock{_pending_tx_session_mutex};
if (!_pending_tx_session.valid()) {
const std::lock_guard<std::mutex> undo_db_lock{_undo_db_mutex};
_pending_tx_session = _undo_db.start_undo_session();
}
}
// Create a temporary undo session as a child of _pending_tx_session.
// The temporary session will be discarded by the destructor if
// _apply_transaction fails. If we make it to merge(), we
// apply the changes.
const std::lock_guard<std::mutex> undo_db_lock{_undo_db_mutex};
auto temp_session = _undo_db.start_undo_session();
auto processed_trx = _apply_transaction( trx );
_pending_tx.push_back(processed_trx);
auto processed_trx = _apply_transaction(trx);
{
const std::lock_guard<std::mutex> pending_tx_lock{_pending_tx_mutex};
_pending_tx.push_back(processed_trx);
}
// notify_changed_objects();
// The transaction applied successfully. Merge its changes into the pending block session.
@ -406,6 +427,7 @@ processed_transaction database::_push_transaction( const signed_transaction& trx
processed_transaction database::validate_transaction( const signed_transaction& trx )
{
const std::lock_guard<std::mutex> undo_db_lock{_undo_db_mutex};
auto session = _undo_db.start_undo_session();
return _apply_transaction( trx );
}
@ -434,7 +456,12 @@ processed_transaction database::push_proposal(const proposal_object& proposal)
{
for( size_t i=old_applied_ops_size,n=_applied_ops.size(); i<n; i++ )
{
ilog( "removing failed operation from applied_ops: ${op}", ("op", *(_applied_ops[i])) );
if(_applied_ops[i].valid()) {
ilog("removing failed operation from applied_ops: ${op}", ("op", *(_applied_ops[i])));
}
else{
ilog("Can't remove failed operation from applied_ops (operation is not valid), op_id : ${op_id}", ("op_id", i));
}
_applied_ops[i].reset();
}
}
@ -500,47 +527,52 @@ signed_block database::_generate_block(
// the value of the "when" variable is known, which means we need to
// re-apply pending transactions in this method.
//
_pending_tx_session.reset();
_pending_tx_session = _undo_db.start_undo_session();
{
const std::lock_guard<std::mutex> pending_tx_session_lock{_pending_tx_session_mutex};
_pending_tx_session.reset();
_pending_tx_session = _undo_db.start_undo_session();
}
uint64_t postponed_tx_count = 0;
// pop pending state (reset to head block state)
for( const processed_transaction& tx : _pending_tx )
{
size_t new_total_size = total_block_size + fc::raw::pack_size( tx );
const std::lock_guard<std::mutex> pending_tx_lock{_pending_tx_mutex};
for (const processed_transaction &tx : _pending_tx) {
size_t new_total_size = total_block_size + fc::raw::pack_size(tx);
// postpone transaction if it would make block too big
if( new_total_size >= maximum_block_size )
{
postponed_tx_count++;
continue;
}
// postpone transaction if it would make block too big
if (new_total_size >= maximum_block_size) {
postponed_tx_count++;
continue;
}
try
{
auto temp_session = _undo_db.start_undo_session();
processed_transaction ptx = _apply_transaction( tx );
temp_session.merge();
try {
auto temp_session = _undo_db.start_undo_session();
processed_transaction ptx = _apply_transaction(tx);
temp_session.merge();
// We have to recompute pack_size(ptx) because it may be different
// than pack_size(tx) (i.e. if one or more results increased
// their size)
total_block_size += fc::raw::pack_size( ptx );
pending_block.transactions.push_back( ptx );
}
catch ( const fc::exception& e )
{
// Do nothing, transaction will not be re-applied
wlog( "Transaction was not processed while generating block due to ${e}", ("e", e) );
wlog( "The transaction was ${t}", ("t", tx) );
// We have to recompute pack_size(ptx) because it may be different
// than pack_size(tx) (i.e. if one or more results increased
// their size)
total_block_size += fc::raw::pack_size(ptx);
pending_block.transactions.push_back(ptx);
} catch (const fc::exception &e) {
// Do nothing, transaction will not be re-applied
wlog("Transaction was not processed while generating block due to ${e}", ("e", e));
wlog("The transaction was ${t}", ("t", tx));
}
}
}
if( postponed_tx_count > 0 )
{
wlog( "Postponed ${n} transactions due to block size limit", ("n", postponed_tx_count) );
}
_pending_tx_session.reset();
{
const std::lock_guard<std::mutex> pending_tx_session_lock{_pending_tx_session_mutex};
_pending_tx_session.reset();
}
// We have temporarily broken the invariant that
// _pending_tx_session is the result of applying _pending_tx, as
@ -552,7 +584,7 @@ signed_block database::_generate_block(
pending_block.timestamp = when;
pending_block.transaction_merkle_root = pending_block.calculate_merkle_root();
pending_block.witness = witness_id;
// Genesis witnesses start with a default initial secret
if( witness_obj.next_secret_hash == secret_hash_type::hash( secret_hash_type() ) ) {
pending_block.previous_secret = secret_hash_type();
@ -562,7 +594,7 @@ signed_block database::_generate_block(
fc::raw::pack( last_enc, witness_obj.previous_secret );
pending_block.previous_secret = last_enc.result();
}
secret_hash_type::encoder next_enc;
fc::raw::pack( next_enc, block_signing_private_key );
fc::raw::pack( next_enc, pending_block.previous_secret );
@ -588,7 +620,11 @@ signed_block database::_generate_block(
*/
void database::pop_block()
{ try {
_pending_tx_session.reset();
{
const std::lock_guard<std::mutex> pending_tx_session_lock{_pending_tx_session_mutex};
_pending_tx_session.reset();
}
auto head_id = head_block_id();
optional<signed_block> head_block = fetch_block_by_id( head_id );
GRAPHENE_ASSERT( head_block.valid(), pop_empty_chain, "there are no blocks to pop" );
@ -602,6 +638,8 @@ void database::pop_block()
void database::clear_pending()
{ try {
const std::lock_guard<std::mutex> pending_tx_lock{_pending_tx_mutex};
const std::lock_guard<std::mutex> pending_tx_session_lock{_pending_tx_session_mutex};
assert( (_pending_tx.size() == 0) || _pending_tx_session.valid() );
_pending_tx.clear();
_pending_tx_session.reset();
@ -620,7 +658,7 @@ uint32_t database::push_applied_operation( const operation& op )
void database::set_applied_operation_result( uint32_t op_id, const operation_result& result )
{
assert( op_id < _applied_ops.size() );
if( _applied_ops[op_id] )
if( _applied_ops[op_id].valid() )
_applied_ops[op_id]->result = result;
else
{
@ -693,16 +731,19 @@ void database::_apply_block( const signed_block& next_block )
// For VOPs derived directly from a real op,
// use the real op's (block_num,trx_in_block,op_in_trx), virtual_op starts from 1.
// For VOPs created after processed all transactions,
// trx_in_block = the_block.trsanctions.size(), virtual_op starts from 0.
// trx_in_block = the_block.trsanctions.size(), virtual_op starts from 0.
++_current_trx_in_block;
_current_op_in_trx = 0;
_current_virtual_op = 0;
_current_virtual_op = 0;
}
if (global_props.parameters.witness_schedule_algorithm == GRAPHENE_WITNESS_SCHEDULED_ALGORITHM) {
update_witness_schedule(next_block);
if(global_props.active_sons.size() > 0) {
update_son_schedule(next_block);
for(const auto& active_sons : global_props.active_sons) {
if(!active_sons.second.empty()) {
update_son_schedule(active_sons.first, next_block);
}
}
}
@ -714,9 +755,10 @@ void database::_apply_block( const signed_block& next_block )
// Are we at the maintenance interval?
if( maint_needed )
perform_chain_maintenance(next_block, global_props);
check_ending_lotteries();
check_ending_nft_lotteries();
create_block_summary(next_block);
place_delayed_bets(); // must happen after update_global_dynamic_data() updates the time
clear_expired_transactions();
@ -727,17 +769,22 @@ void database::_apply_block( const signed_block& next_block )
update_withdraw_permissions();
update_tournaments();
update_betting_markets(next_block.timestamp);
finalize_expired_offers();
// n.b., update_maintenance_flag() happens this late
// because get_slot_time() / get_slot_at_time() is needed above
// TODO: figure out if we could collapse this function into
// update_global_dynamic_data() as perhaps these methods only need
// to be called for header validation?
update_maintenance_flag( maint_needed );
if (global_props.parameters.witness_schedule_algorithm == GRAPHENE_WITNESS_SHUFFLED_ALGORITHM) {
update_witness_schedule();
if(global_props.active_sons.size() > 0) {
update_son_schedule();
for(const auto& active_sidechain_type : active_sidechain_types(dynamic_global_props.time)) {
if(global_props.active_sons.at(active_sidechain_type).size() > 0) {
update_son_schedule(active_sidechain_type);
}
}
}
@ -786,7 +833,7 @@ processed_transaction database::_apply_transaction(const signed_transaction& trx
auto& trx_idx = get_mutable_index_type<transaction_index>();
const chain_id_type& chain_id = get_chain_id();
transaction_id_type trx_id;
if( !(skip & skip_transaction_dupe_check) )
{
trx_id = trx.id();
@ -799,9 +846,14 @@ processed_transaction database::_apply_transaction(const signed_transaction& trx
if( !(skip & (skip_transaction_signatures | skip_authority_check) ) )
{
auto get_active = [&]( account_id_type id ) { return &id(*this).active; };
auto get_owner = [&]( account_id_type id ) { return &id(*this).owner; };
trx.verify_authority( chain_id, get_active, get_owner, get_global_properties().parameters.max_authority_depth );
auto get_active = [this]( account_id_type id ) { return &id(*this).active; };
auto get_owner = [this]( account_id_type id ) { return &id(*this).owner; };
auto get_custom = [this]( account_id_type id, const operation& op ) {
return get_account_custom_authorities(id, op);
};
trx.verify_authority( chain_id, get_active, get_owner, get_custom,
true,
get_global_properties().parameters.max_authority_depth );
}
//Skip all manner of expiration and TaPoS checking if we're on block 1; It's impossible that the transaction is
@ -879,7 +931,7 @@ const witness_object& database::validate_block_header( uint32_t skip, const sign
FC_ASSERT( secret_hash_type::hash( next_block.previous_secret ) == witness.next_secret_hash, "",
( "previous_secret", next_block.previous_secret )( "next_secret_hash", witness.next_secret_hash ) );
if( !(skip&skip_witness_signature) )
if( !(skip&skip_witness_signature) )
FC_ASSERT( next_block.validate_signee( witness.signing_key ) );
if( !(skip&skip_witness_schedule_check) )

View file

@ -27,9 +27,12 @@
#include <graphene/chain/asset_object.hpp>
#include <graphene/chain/chain_property_object.hpp>
#include <graphene/chain/global_property_object.hpp>
#include <graphene/chain/custom_permission_object.hpp>
#include <graphene/chain/custom_account_authority_object.hpp>
#include <graphene/chain/offer_object.hpp>
#include <graphene/chain/account_role_object.hpp>
#include <graphene/chain/son_object.hpp>
#include <graphene/chain/son_proposal_object.hpp>
#include <fc/smart_ref_impl.hpp>
#include <ctime>
#include <algorithm>
@ -63,7 +66,7 @@ const dynamic_global_property_object& database::get_dynamic_global_properties()
const fee_schedule& database::current_fee_schedule()const
{
return get_global_properties().parameters.current_fees;
return std::ref( *get_global_properties().parameters.current_fees );
}
time_point_sec database::head_block_time()const
@ -106,7 +109,7 @@ uint32_t database::last_non_undoable_block_num() const
return head_block_num() - _undo_db.size();
}
std::vector<uint32_t> database::get_seeds(asset_id_type for_asset, uint8_t count_winners) const
std::vector<uint32_t> database::get_seeds( asset_id_type for_asset, uint8_t count_winners ) const
{
FC_ASSERT( count_winners <= 64 );
std::string salted_string = std::string(_random_number_generator._seed) + std::to_string(for_asset.instance.value);
@ -147,6 +150,56 @@ const std::vector<uint32_t> database::get_winner_numbers( asset_id_type for_asse
return result;
}
const account_statistics_object& database::get_account_stats_by_owner( account_id_type owner )const
{
auto& idx = get_index_type<account_stats_index>().indices().get<by_owner>();
auto itr = idx.find( owner );
FC_ASSERT( itr != idx.end(), "Can not find account statistics object for owner ${a}", ("a",owner) );
return *itr;
}
const witness_schedule_object& database::get_witness_schedule_object()const
{
return *_p_witness_schedule_obj;
}
vector<authority> database::get_account_custom_authorities(account_id_type account, const operation& op)const
{
const auto& pindex = get_index_type<custom_permission_index>().indices().get<by_account_and_permission>();
const auto& cindex = get_index_type<custom_account_authority_index>().indices().get<by_permission_and_op>();
auto prange = pindex.equal_range(boost::make_tuple(account));
time_point_sec now = head_block_time();
vector<authority> custom_auths;
for(const custom_permission_object& pobj : boost::make_iterator_range(prange.first, prange.second))
{
auto crange = cindex.equal_range(boost::make_tuple(pobj.id, op.which()));
for(const custom_account_authority_object& cobj : boost::make_iterator_range(crange.first, crange.second))
{
if(now >= cobj.valid_from && now < cobj.valid_to)
{
custom_auths.push_back(pobj.auth);
}
}
}
return custom_auths;
}
bool database::item_locked(const nft_id_type &item) const
{
const auto &offer_idx = get_index_type<offer_index>();
const auto &oidx = dynamic_cast<const base_primary_index &>(offer_idx);
const auto &market_items = oidx.get_secondary_index<graphene::chain::offer_item_index>();
auto items_itr = market_items._locked_items.find(item);
return (items_itr != market_items._locked_items.end());
}
bool database::account_role_valid(const account_role_object &aro, account_id_type account, optional<int> op_type) const
{
return (aro.valid_to > head_block_time()) &&
(aro.whitelisted_accounts.find(account) != aro.whitelisted_accounts.end()) &&
(!op_type || (aro.allowed_operations.find(*op_type) != aro.allowed_operations.end()));
}
std::set<son_id_type> database::get_sons_being_deregistered()
{
std::set<son_id_type> ret;
@ -169,17 +222,32 @@ std::set<son_id_type> database::get_sons_to_be_deregistered()
for( auto& son : son_idx )
{
if(son.status == son_status::in_maintenance)
bool need_to_be_deregistered = true;
for(const auto& status : son.statuses)
{
auto stats = son.statistics(*this);
// TODO : We need to add a function that returns if we can deregister SON
// i.e. with introduction of PW code, we have to make a decision if the SON
// is needed for release of funds from the PW
if(head_block_time() - stats.last_down_timestamp >= fc::seconds(get_global_properties().parameters.son_deregister_time()))
const auto& sidechain = status.first;
if(status.second != son_status::in_maintenance)
need_to_be_deregistered = false;
if(need_to_be_deregistered)
{
ret.insert(son.id);
auto stats = son.statistics(*this);
// TODO : We need to add a function that returns if we can deregister SON
// i.e. with introduction of PW code, we have to make a decision if the SON
// is needed for release of funds from the PW
if(stats.last_active_timestamp.contains(sidechain)) {
if (head_block_time() - stats.last_active_timestamp.at(sidechain) < fc::seconds(get_global_properties().parameters.son_deregister_time())) {
need_to_be_deregistered = false;
}
}
}
}
if(need_to_be_deregistered)
{
ret.insert(son.id);
}
}
return ret;
}
@ -201,7 +269,7 @@ std::set<son_id_type> database::get_sons_being_reported_down()
fc::optional<operation> database::create_son_deregister_proposal( son_id_type son_id, account_id_type paying_son )
{
son_delete_operation son_dereg_op;
son_deregister_operation son_dereg_op;
son_dereg_op.payer = get_global_properties().parameters.son_account();
son_dereg_op.son_id = son_id;
@ -236,21 +304,96 @@ bool database::is_son_dereg_valid( son_id_type son_id )
return false;
}
return (son->status == son_status::in_maintenance &&
(head_block_time() - son->statistics(*this).last_down_timestamp >= fc::seconds(get_global_properties().parameters.son_deregister_time())));
bool status_son_dereg_valid = true;
for (const auto &active_sidechain_type : active_sidechain_types(head_block_time())) {
if(son->statuses.at(active_sidechain_type) != son_status::in_maintenance)
status_son_dereg_valid = false;
if(status_son_dereg_valid)
{
if(son->statistics(*this).last_active_timestamp.contains(active_sidechain_type)) {
if (head_block_time() - son->statistics(*this).last_active_timestamp.at(active_sidechain_type) < fc::seconds(get_global_properties().parameters.son_deregister_time())) {
status_son_dereg_valid = false;
}
}
}
}
return status_son_dereg_valid;
}
const account_statistics_object& database::get_account_stats_by_owner( account_id_type owner )const
bool database::is_son_active( sidechain_type type, son_id_type son_id )
{
auto& idx = get_index_type<account_stats_index>().indices().get<by_owner>();
auto itr = idx.find( owner );
FC_ASSERT( itr != idx.end(), "Can not find account statistics object for owner ${a}", ("a",owner) );
return *itr;
const auto& son_idx = get_index_type<son_index>().indices().get< by_id >();
auto son = son_idx.find( son_id );
if(son == son_idx.end()) {
return false;
}
const global_property_object& gpo = get_global_properties();
if(!gpo.active_sons.contains(type)) {
return false;
}
const auto& gpo_as = gpo.active_sons.at(type);
vector<son_id_type> active_son_ids;
active_son_ids.reserve(gpo_as.size());
std::transform(gpo_as.cbegin(), gpo_as.cend(),
std::inserter(active_son_ids, active_son_ids.end()),
[](const son_sidechain_info& swi) {
return swi.son_id;
});
if(active_son_ids.empty()) {
return false;
}
auto it_son = std::find(active_son_ids.begin(), active_son_ids.end(), son_id);
return (it_son != active_son_ids.end());
}
const witness_schedule_object& database::get_witness_schedule_object()const
vector<uint64_t> database::get_random_numbers(uint64_t minimum, uint64_t maximum, uint64_t selections, bool duplicates)
{
return *_p_witness_schedule_obj;
FC_ASSERT( selections <= 100000 );
if (duplicates == false) {
FC_ASSERT( maximum - minimum >= selections );
}
vector<uint64_t> v;
v.reserve(selections);
if (duplicates) {
for (uint64_t i = 0; i < selections; i++) {
int64_t rnd = get_random_bits(maximum - minimum) + minimum;
v.push_back(rnd);
}
} else {
vector<uint64_t> tmpv;
tmpv.reserve(selections);
for (uint64_t i = minimum; i < maximum; i++) {
tmpv.push_back(i);
}
for (uint64_t i = 0; (i < selections) && (tmpv.size() > 0); i++) {
uint64_t idx = get_random_bits(tmpv.size());
v.push_back(tmpv.at(idx));
tmpv.erase(tmpv.begin() + idx);
}
}
return v;
}
} }
bool database::is_asset_creation_allowed(const string &symbol)
{
if (symbol == "BTC")
{
if (head_block_time() < HARDFORK_SON_TIME)
return false;
}
return true;
}
}
}

View file

@ -49,6 +49,14 @@
#include <graphene/chain/tournament_object.hpp>
#include <graphene/chain/match_object.hpp>
#include <graphene/chain/game_object.hpp>
#include <graphene/chain/custom_permission_object.hpp>
#include <graphene/chain/custom_account_authority_object.hpp>
#include <graphene/chain/offer_object.hpp>
#include <graphene/chain/account_role_object.hpp>
#include <graphene/chain/random_number_object.hpp>
#include <graphene/chain/nft_object.hpp>
#include <graphene/chain/sport_object.hpp>
#include <graphene/chain/event_group_object.hpp>
#include <graphene/chain/event_object.hpp>
@ -82,16 +90,22 @@
#include <graphene/chain/event_evaluator.hpp>
#include <graphene/chain/betting_market_evaluator.hpp>
#include <graphene/chain/tournament_evaluator.hpp>
#include <graphene/chain/custom_permission_evaluator.hpp>
#include <graphene/chain/custom_account_authority_evaluator.hpp>
#include <graphene/chain/offer_evaluator.hpp>
#include <graphene/chain/nft_evaluator.hpp>
#include <graphene/chain/account_role_evaluator.hpp>
#include <graphene/chain/nft_lottery_evaluator.hpp>
#include <graphene/chain/son_evaluator.hpp>
#include <graphene/chain/son_wallet_evaluator.hpp>
#include <graphene/chain/son_wallet_deposit_evaluator.hpp>
#include <graphene/chain/son_wallet_withdraw_evaluator.hpp>
#include <graphene/chain/sidechain_address_evaluator.hpp>
#include <graphene/chain/sidechain_transaction_evaluator.hpp>
#include <graphene/chain/random_number_evaluator.hpp>
#include <graphene/chain/protocol/fee_schedule.hpp>
#include <fc/smart_ref_impl.hpp>
#include <fc/uint128.hpp>
#include <fc/crypto/digest.hpp>
@ -174,12 +188,29 @@ const uint8_t betting_market_object::type_id;
const uint8_t bet_object::space_id;
const uint8_t bet_object::type_id;
const uint8_t nft_object::space_id;
const uint8_t nft_object::type_id;
const uint8_t betting_market_position_object::space_id;
const uint8_t betting_market_position_object::type_id;
const uint8_t global_betting_statistics_object::space_id;
const uint8_t global_betting_statistics_object::type_id;
const uint8_t offer_object::space_id;
const uint8_t offer_object::type_id;
const uint8_t offer_history_object::space_id;
const uint8_t offer_history_object::type_id;
const uint8_t account_role_object::space_id;
const uint8_t account_role_object::type_id;
const uint8_t nft_lottery_balance_object::space_id;
const uint8_t nft_lottery_balance_object::type_id;
const uint8_t random_number_object::space_id;
const uint8_t random_number_object::type_id;
void database::initialize_evaluators()
{
@ -254,9 +285,31 @@ void database::initialize_evaluators()
register_evaluator<lottery_reward_evaluator>();
register_evaluator<lottery_end_evaluator>();
register_evaluator<sweeps_vesting_claim_evaluator>();
register_evaluator<create_custom_permission_evaluator>();
register_evaluator<update_custom_permission_evaluator>();
register_evaluator<delete_custom_permission_evaluator>();
register_evaluator<create_custom_account_authority_evaluator>();
register_evaluator<update_custom_account_authority_evaluator>();
register_evaluator<delete_custom_account_authority_evaluator>();
register_evaluator<offer_evaluator>();
register_evaluator<bid_evaluator>();
register_evaluator<cancel_offer_evaluator>();
register_evaluator<finalize_offer_evaluator>();
register_evaluator<nft_metadata_create_evaluator>();
register_evaluator<nft_metadata_update_evaluator>();
register_evaluator<nft_mint_evaluator>();
register_evaluator<nft_safe_transfer_from_evaluator>();
register_evaluator<nft_approve_evaluator>();
register_evaluator<nft_set_approval_for_all_evaluator>();
register_evaluator<account_role_create_evaluator>();
register_evaluator<account_role_update_evaluator>();
register_evaluator<account_role_delete_evaluator>();
register_evaluator<nft_lottery_token_purchase_evaluator>();
register_evaluator<nft_lottery_reward_evaluator>();
register_evaluator<nft_lottery_end_evaluator>();
register_evaluator<create_son_evaluator>();
register_evaluator<update_son_evaluator>();
register_evaluator<delete_son_evaluator>();
register_evaluator<deregister_son_evaluator>();
register_evaluator<son_heartbeat_evaluator>();
register_evaluator<son_report_down_evaluator>();
register_evaluator<son_maintenance_evaluator>();
@ -272,12 +325,58 @@ void database::initialize_evaluators()
register_evaluator<sidechain_transaction_create_evaluator>();
register_evaluator<sidechain_transaction_sign_evaluator>();
register_evaluator<sidechain_transaction_send_evaluator>();
register_evaluator<sidechain_transaction_settle_evaluator>();
register_evaluator<random_number_store_evaluator>();
}
void database::initialize_hardforks()
{
_hardfork_times.emplace_back(HARDFORK_357_TIME);
_hardfork_times.emplace_back(HARDFORK_359_TIME);
_hardfork_times.emplace_back(HARDFORK_385_TIME);
_hardfork_times.emplace_back(HARDFORK_409_TIME);
_hardfork_times.emplace_back(HARDFORK_413_TIME);
_hardfork_times.emplace_back(HARDFORK_415_TIME);
_hardfork_times.emplace_back(HARDFORK_416_TIME);
_hardfork_times.emplace_back(HARDFORK_419_TIME);
_hardfork_times.emplace_back(HARDFORK_436_TIME);
_hardfork_times.emplace_back(HARDFORK_445_TIME);
_hardfork_times.emplace_back(HARDFORK_453_TIME);
_hardfork_times.emplace_back(HARDFORK_480_TIME);
_hardfork_times.emplace_back(HARDFORK_483_TIME);
_hardfork_times.emplace_back(HARDFORK_516_TIME);
_hardfork_times.emplace_back(HARDFORK_533_TIME);
_hardfork_times.emplace_back(HARDFORK_538_TIME);
_hardfork_times.emplace_back(HARDFORK_555_TIME);
_hardfork_times.emplace_back(HARDFORK_563_TIME);
_hardfork_times.emplace_back(HARDFORK_572_TIME);
_hardfork_times.emplace_back(HARDFORK_599_TIME);
_hardfork_times.emplace_back(HARDFORK_607_TIME);
_hardfork_times.emplace_back(HARDFORK_613_TIME);
_hardfork_times.emplace_back(HARDFORK_615_TIME);
_hardfork_times.emplace_back(HARDFORK_999_TIME);
_hardfork_times.emplace_back(HARDFORK_1000_TIME);
_hardfork_times.emplace_back(HARDFORK_1001_TIME);
_hardfork_times.emplace_back(HARDFORK_5050_1_TIME);
_hardfork_times.emplace_back(HARDFORK_CORE_429_TIME);
_hardfork_times.emplace_back(HARDFORK_GPOS_TIME);
_hardfork_times.emplace_back(HARDFORK_NFT_TIME);
_hardfork_times.emplace_back(HARDFORK_SON_FOR_HIVE_TIME);
_hardfork_times.emplace_back(HARDFORK_SON_TIME);
_hardfork_times.emplace_back(HARDFORK_SON2_TIME);
_hardfork_times.emplace_back(HARDFORK_SON_FOR_ETHEREUM_TIME);
_hardfork_times.emplace_back(HARDFORK_SWEEPS_TIME);
std::sort(_hardfork_times.begin(), _hardfork_times.end());
}
void database::initialize_indexes()
{
reset_indexes();
_undo_db.set_max_size( GRAPHENE_MIN_UNDO_HISTORY );
const std::lock_guard<std::mutex> undo_db_lock{_undo_db_mutex};
_undo_db.set_max_size(GRAPHENE_MIN_UNDO_HISTORY);
//Protocol object indexes
add_index< primary_index<asset_index, 13> >(); // 8192 assets per chunk
@ -314,6 +413,14 @@ void database::initialize_indexes()
tournament_details_idx->add_secondary_index<tournament_players_index>();
add_index< primary_index<match_index> >();
add_index< primary_index<game_index> >();
add_index< primary_index<custom_permission_index> >();
add_index< primary_index<custom_account_authority_index> >();
auto offer_idx = add_index< primary_index<offer_index> >();
offer_idx->add_secondary_index<offer_item_index>();
add_index< primary_index<nft_metadata_index > >();
add_index< primary_index<nft_index > >();
add_index< primary_index<account_role_index> >();
add_index< primary_index<son_proposal_index> >();
add_index< primary_index<son_wallet_index> >();
@ -352,7 +459,10 @@ void database::initialize_indexes()
add_index< primary_index<lottery_balance_index > >();
add_index< primary_index<sweeps_vesting_balance_index > >();
add_index< primary_index<offer_history_index > >();
add_index< primary_index<nft_lottery_balance_index > >();
add_index< primary_index<son_stats_index > >();
add_index< primary_index<random_number_index > >();
}
@ -366,7 +476,9 @@ void database::init_genesis(const genesis_state_type& genesis_state)
FC_ASSERT(genesis_state.initial_active_witnesses <= genesis_state.initial_witness_candidates.size(),
"initial_active_witnesses is larger than the number of candidate witnesses.");
const std::lock_guard<std::mutex> undo_db_lock{_undo_db_mutex};
_undo_db.disable();
struct auth_inhibitor {
auth_inhibitor(database& db) : db(db), old_flags(db.node_properties().skip_flags)
{ db.node_properties().skip_flags |= skip_authority_check; }
@ -882,7 +994,6 @@ void database::init_genesis(const genesis_state_type& genesis_state)
const auto& idx = get_index_type<asset_index>().indices().get<by_symbol>();
auto it = idx.begin();
bool has_imbalanced_assets = false;
while( it != idx.end() )
{
@ -894,7 +1005,6 @@ void database::init_genesis(const genesis_state_type& genesis_state)
FC_ASSERT( debt_itr != total_debts.end() );
if( supply_itr->second != debt_itr->second )
{
has_imbalanced_assets = true;
elog( "Genesis for asset ${aname} is not balanced\n"
" Debt is ${debt}\n"
" Supply is ${supply}\n",
@ -906,10 +1016,6 @@ void database::init_genesis(const genesis_state_type& genesis_state)
}
++it;
}
// @romek
#if 0
FC_ASSERT( !has_imbalanced_assets );
#endif
// Save tallied supplies
for( const auto& item : total_supplies )
@ -998,8 +1104,9 @@ void database::init_genesis(const genesis_state_type& genesis_state)
FC_ASSERT( _p_witness_schedule_obj->id == witness_schedule_id_type() );
// Initialize witness schedule
#ifndef NDEBUG
const son_schedule_object& sso =
const son_schedule_object& ssobitcoin =
#endif
create<son_schedule_object>([&](son_schedule_object& _sso)
{
@ -1008,24 +1115,64 @@ void database::init_genesis(const genesis_state_type& genesis_state)
witness_scheduler_rng rng(_sso.rng_seed.begin(), GRAPHENE_NEAR_SCHEDULE_CTR_IV);
auto init_witnesses = get_global_properties().active_witnesses;
auto init_bitcoin_sons = get_global_properties().active_sons.at(sidechain_type::bitcoin);
_sso.scheduler = son_scheduler();
_sso.scheduler._min_token_count = std::max(int(init_witnesses.size()) / 2, 1);
_sso.scheduler._min_token_count = std::max(int(init_bitcoin_sons.size()) / 2, 1);
_sso.last_scheduling_block = 0;
_sso.recent_slots_filled = fc::uint128::max_value();
});
assert( sso.id == son_schedule_id_type() );
assert( ssobitcoin.id == son_schedule_id_type(get_son_schedule_id(sidechain_type::bitcoin)) );
#ifndef NDEBUG
const son_schedule_object& ssoethereum =
#endif
create<son_schedule_object>([&](son_schedule_object& _sso)
{
// for scheduled
memset(_sso.rng_seed.begin(), 0, _sso.rng_seed.size());
witness_scheduler_rng rng(_sso.rng_seed.begin(), GRAPHENE_NEAR_SCHEDULE_CTR_IV);
auto init_ethereum_sons = get_global_properties().active_sons.at(sidechain_type::ethereum);
_sso.scheduler = son_scheduler();
_sso.scheduler._min_token_count = std::max(int(init_ethereum_sons.size()) / 2, 1);
_sso.last_scheduling_block = 0;
_sso.recent_slots_filled = fc::uint128::max_value();
});
assert( ssoethereum.id == son_schedule_id_type(get_son_schedule_id(sidechain_type::ethereum)) );
#ifndef NDEBUG
const son_schedule_object& ssohive =
#endif
create<son_schedule_object>([&](son_schedule_object& _sso)
{
// for scheduled
memset(_sso.rng_seed.begin(), 0, _sso.rng_seed.size());
witness_scheduler_rng rng(_sso.rng_seed.begin(), GRAPHENE_NEAR_SCHEDULE_CTR_IV);
auto init_hive_sons = get_global_properties().active_sons.at(sidechain_type::hive);
_sso.scheduler = son_scheduler();
_sso.scheduler._min_token_count = std::max(int(init_hive_sons.size()) / 2, 1);
_sso.last_scheduling_block = 0;
_sso.recent_slots_filled = fc::uint128::max_value();
});
assert( ssohive.id == son_schedule_id_type(get_son_schedule_id(sidechain_type::hive)) );
// Enable fees
modify(get_global_properties(), [&genesis_state](global_property_object& p) {
p.parameters.current_fees = genesis_state.initial_parameters.current_fees;
});
// Create FBA counters
create<fba_accumulator_object>([&]( fba_accumulator_object& acc )
{

File diff suppressed because it is too large Load diff

View file

@ -28,6 +28,7 @@
#include <graphene/chain/witness_schedule_object.hpp>
#include <graphene/chain/special_authority_object.hpp>
#include <graphene/chain/operation_history_object.hpp>
#include <graphene/chain/nft_object.hpp>
#include <graphene/chain/protocol/fee_schedule.hpp>
#include <fc/io/fstream.hpp>
@ -43,7 +44,7 @@ database::database() :
{
initialize_indexes();
initialize_evaluators();
initialize_db_sidechain();
initialize_hardforks();
}
database::~database()
@ -108,7 +109,6 @@ void database::reindex( fc::path data_dir )
ilog( "reindexing blockchain" );
auto start = fc::time_point::now();
const auto last_block_num = last_block->block_num();
uint32_t flush_point = last_block_num < 10000 ? 0 : last_block_num - 10000;
uint32_t undo_point = last_block_num < 50 ? 0 : last_block_num - 50;
ilog( "Replaying blocks, starting at ${next}...", ("next",head_block_num() + 1) );
@ -124,8 +124,7 @@ void database::reindex( fc::path data_dir )
}
for( uint32_t i = head_block_num() + 1; i <= last_block_num; ++i )
{
if( i % 10000 == 0 ) std::cerr << " " << double(i*100)/last_block_num << "% "<<i << " of " <<last_block_num<<" \n";
if( i == flush_point )
if( i % 1000000 == 0 )
{
ilog( "Writing database to disk at block ${i}", ("i",i) );
flush();
@ -234,7 +233,12 @@ void database::open(
FC_ASSERT( *last_block >= head_block_id(),
"last block ID does not match current chain state",
("last_block->id", last_block)("head_block_id",head_block_num()) );
_block_id_to_block.set_replay_mode(true);
reindex( data_dir );
_block_id_to_block.set_replay_mode(false);
}
_opened = true;
}
@ -245,7 +249,7 @@ void database::close(bool rewind)
{
if (!_opened)
return;
// TODO: Save pending tx's on close()
clear_pending();
@ -295,7 +299,7 @@ void database::force_slow_replays()
void database::check_ending_lotteries()
{
try {
const auto& lotteries_idx = get_index_type<asset_index>().indices().get<active_lotteries>();
const auto& lotteries_idx = get_index_type<asset_index>().indices().get<active_lotteries>();
for( auto checking_asset: lotteries_idx )
{
FC_ASSERT( checking_asset.is_lottery() );
@ -307,6 +311,24 @@ void database::check_ending_lotteries()
} catch( ... ) {}
}
void database::check_ending_nft_lotteries()
{
try {
const auto &nft_lotteries_idx = get_index_type<nft_metadata_index>().indices().get<active_nft_lotteries>();
for (auto checking_token : nft_lotteries_idx)
{
FC_ASSERT(checking_token.is_lottery());
const auto &lottery_options = checking_token.lottery_data->lottery_options;
FC_ASSERT(lottery_options.is_active);
// Check the current supply of lottery tokens
auto current_supply = checking_token.get_token_current_supply(*this);
if ((lottery_options.ending_on_soldout && (current_supply == checking_token.max_supply)) ||
(lottery_options.end_date != time_point_sec() && (lottery_options.end_date <= head_block_time())))
checking_token.end_lottery(*this);
}
} catch( ... ) {}
}
void database::check_lottery_end_by_participants( asset_id_type asset_id )
{
try {

View file

@ -24,6 +24,7 @@
#include <fc/container/flat.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/chain/protocol/authority.hpp>
#include <graphene/chain/protocol/operations.hpp>
#include <graphene/chain/protocol/transaction.hpp>
@ -40,6 +41,11 @@
#include <graphene/chain/vesting_balance_object.hpp>
#include <graphene/chain/transaction_object.hpp>
#include <graphene/chain/impacted.hpp>
#include <graphene/chain/hardfork.hpp>
#include <graphene/chain/account_object.hpp>
#include <graphene/chain/account_role_object.hpp>
#include <graphene/chain/son_object.hpp>
#include <graphene/chain/sidechain_address_object.hpp>
using namespace fc;
@ -49,8 +55,13 @@ using namespace graphene::chain;
struct get_impacted_account_visitor
{
flat_set<account_id_type>& _impacted;
get_impacted_account_visitor( flat_set<account_id_type>& impact ):_impacted(impact) {}
typedef void result_type;
bool _ignore_custom_op_reqd_auths;
get_impacted_account_visitor( flat_set<account_id_type>& impact, bool ignore_custom_operation_required_auths )
: _impacted( impact ), _ignore_custom_op_reqd_auths( ignore_custom_operation_required_auths )
{}
using result_type = void;
void operator()( const transfer_operation& op )
{
@ -136,7 +147,7 @@ struct get_impacted_account_visitor
{
vector<authority> other;
for( const auto& proposed_op : op.proposed_ops )
operation_get_required_authorities( proposed_op.op, _impacted, _impacted, other );
operation_get_required_authorities( proposed_op.op, _impacted, _impacted, other, _ignore_custom_op_reqd_auths );
for( auto& o : other )
add_authority_accounts( _impacted, o );
}
@ -192,27 +203,10 @@ struct get_impacted_account_visitor
_impacted.insert( op.issuer );
}
void operator()( const transfer_to_blind_operation& op )
{
_impacted.insert( op.from );
for( const auto& out : op.outputs )
add_authority_accounts( _impacted, out.owner );
}
void operator()( const blind_transfer_operation& op )
{
for( const auto& in : op.inputs )
add_authority_accounts( _impacted, in.owner );
for( const auto& out : op.outputs )
add_authority_accounts( _impacted, out.owner );
}
void operator()( const transfer_from_blind_operation& op )
{
_impacted.insert( op.to );
for( const auto& in : op.inputs )
add_authority_accounts( _impacted, in.owner );
}
//! We don't use this operations
void operator()( const transfer_to_blind_operation& op ){}
void operator()( const blind_transfer_operation& op ){}
void operator()( const transfer_from_blind_operation& op ){}
void operator()( const asset_settle_cancel_operation& op )
{
@ -293,14 +287,81 @@ struct get_impacted_account_visitor
void operator()( const sweeps_vesting_claim_operation& op ) {
_impacted.insert( op.account );
}
void operator()( const custom_permission_create_operation& op ){
_impacted.insert( op.owner_account );
}
void operator()( const custom_permission_update_operation& op ){
_impacted.insert( op.owner_account );
}
void operator()( const custom_permission_delete_operation& op ){
_impacted.insert( op.owner_account );
}
void operator()( const custom_account_authority_create_operation& op ){
_impacted.insert( op.owner_account );
}
void operator()( const custom_account_authority_update_operation& op ){
_impacted.insert( op.owner_account );
}
void operator()( const custom_account_authority_delete_operation& op ){
_impacted.insert( op.owner_account );
}
void operator()( const nft_metadata_create_operation& op ) {
_impacted.insert( op.owner );
}
void operator()( const nft_metadata_update_operation& op ) {
_impacted.insert( op.owner );
}
void operator()( const nft_mint_operation& op ) {
_impacted.insert( op.owner );
}
void operator()( const nft_safe_transfer_from_operation& op ) {
_impacted.insert( op.from );
_impacted.insert( op.to );
}
void operator()( const nft_approve_operation& op ) {
_impacted.insert( op.operator_ );
_impacted.insert( op.approved );
}
void operator()( const nft_set_approval_for_all_operation& op ) {
_impacted.insert( op.owner );
_impacted.insert( op.operator_ );
}
void operator()( const offer_operation& op ) {
_impacted.insert( op.issuer );
}
void operator()( const bid_operation& op ) {
_impacted.insert( op.bidder );
}
void operator()( const cancel_offer_operation& op ) {
_impacted.insert( op.issuer );
}
void operator()( const finalize_offer_operation& op ) {
_impacted.insert( op.fee_paying_account );
}
void operator()( const account_role_create_operation& op ){
_impacted.insert( op.owner );
}
void operator()( const account_role_update_operation& op ){
_impacted.insert( op.owner );
}
void operator()( const account_role_delete_operation& op ){
_impacted.insert( op.owner );
}
void operator()( const nft_lottery_token_purchase_operation& op ){
_impacted.insert( op.buyer );
}
void operator()( const nft_lottery_reward_operation& op ) {
_impacted.insert( op.winner );
}
void operator()( const nft_lottery_end_operation& op ) {}
void operator()( const son_create_operation& op ) {
_impacted.insert( op.owner_account );
}
void operator()( const son_update_operation& op ) {
_impacted.insert( op.owner_account );
}
void operator()( const son_delete_operation& op ) {
_impacted.insert( op.owner_account );
void operator()( const son_deregister_operation& op ) {
_impacted.insert( op.payer);
}
void operator()( const son_heartbeat_operation& op ) {
_impacted.insert( op.owner_account );
@ -330,13 +391,13 @@ struct get_impacted_account_visitor
_impacted.insert( op.payer );
}
void operator()( const sidechain_address_add_operation& op ) {
_impacted.insert( op.sidechain_address_account );
_impacted.insert( op.payer );
}
void operator()( const sidechain_address_update_operation& op ) {
_impacted.insert( op.sidechain_address_account );
_impacted.insert( op.payer );
}
void operator()( const sidechain_address_delete_operation& op ) {
_impacted.insert( op.sidechain_address_account );
_impacted.insert( op.payer );
}
void operator()( const sidechain_transaction_create_operation& op ) {
_impacted.insert( op.payer );
@ -347,22 +408,25 @@ struct get_impacted_account_visitor
void operator()( const sidechain_transaction_send_operation& op ) {
_impacted.insert( op.payer );
}
void operator()( const sidechain_transaction_settle_operation& op ) {
_impacted.insert( op.payer );
}
void operator()( const random_number_store_operation& op ) {
_impacted.insert( op.account );
}
};
void graphene::chain::operation_get_impacted_accounts( const operation& op, flat_set<account_id_type>& result )
{
get_impacted_account_visitor vtor = get_impacted_account_visitor( result );
void graphene::chain::operation_get_impacted_accounts( const operation& op, flat_set<account_id_type>& result, bool ignore_custom_operation_required_auths ) {
get_impacted_account_visitor vtor = get_impacted_account_visitor( result, ignore_custom_operation_required_auths );
op.visit( vtor );
}
void graphene::chain::transaction_get_impacted_accounts( const transaction& tx, flat_set<account_id_type>& result )
{
void graphene::chain::transaction_get_impacted_accounts( const transaction& tx, flat_set<account_id_type>& result, bool ignore_custom_operation_required_auths ) {
for( const auto& op : tx.operations )
operation_get_impacted_accounts( op, result );
operation_get_impacted_accounts( op, result, ignore_custom_operation_required_auths );
}
void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accounts )
{
void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accounts, bool ignore_custom_operation_required_auths ) {
if( obj->id.space() == protocol_ids )
{
switch( (object_type)obj->id.type() )
@ -409,12 +473,14 @@ void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accoun
} case proposal_object_type:{
const auto& aobj = dynamic_cast<const proposal_object*>(obj);
assert( aobj != nullptr );
transaction_get_impacted_accounts( aobj->proposed_transaction, accounts );
transaction_get_impacted_accounts( aobj->proposed_transaction, accounts,
ignore_custom_operation_required_auths);
break;
} case operation_history_object_type:{
const auto& aobj = dynamic_cast<const operation_history_object*>(obj);
assert( aobj != nullptr );
operation_get_impacted_accounts( aobj->op, accounts );
operation_get_impacted_accounts( aobj->op, accounts,
ignore_custom_operation_required_auths);
break;
} case withdraw_permission_object_type:{
const auto& aobj = dynamic_cast<const withdraw_permission_object*>(obj);
@ -435,6 +501,12 @@ void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accoun
} case balance_object_type:{
/** these are free from any accounts */
break;
} case account_role_type:{
const auto& aobj = dynamic_cast<const account_role_object*>(obj);
assert( aobj != nullptr );
accounts.insert( aobj->owner );
accounts.insert( aobj->whitelisted_accounts.begin(), aobj->whitelisted_accounts.end() );
break;
} case son_object_type:{
const auto& aobj = dynamic_cast<const son_object*>(obj);
assert( aobj != nullptr );
@ -454,6 +526,9 @@ void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accoun
} case sidechain_transaction_object_type:{
break;
}
default: {
break;
}
}
}
else if( obj->id.space() == implementation_ids )
@ -483,7 +558,8 @@ void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accoun
} case impl_transaction_object_type:{
const auto& aobj = dynamic_cast<const transaction_object*>(obj);
assert( aobj != nullptr );
transaction_get_impacted_accounts( aobj->trx, accounts );
transaction_get_impacted_accounts( aobj->trx, accounts,
ignore_custom_operation_required_auths);
break;
} case impl_blinded_balance_object_type:{
const auto& aobj = dynamic_cast<const blinded_balance_object*>(obj);
@ -507,6 +583,10 @@ void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accoun
break;
case impl_fba_accumulator_object_type:
break;
case impl_nft_lottery_balance_object_type:
break;
default:
break;
}
}
} // end get_relevant_accounts( const object* obj, flat_set<account_id_type>& accounts )
@ -539,7 +619,7 @@ void database::notify_changed_objects()
new_ids.push_back(item);
auto obj = find_object(item);
if(obj != nullptr)
get_relevant_accounts(obj, new_accounts_impacted);
get_relevant_accounts(obj, new_accounts_impacted, true);
}
GRAPHENE_TRY_NOTIFY( new_objects, new_ids, new_accounts_impacted)
@ -553,7 +633,7 @@ void database::notify_changed_objects()
for( const auto& item : head_undo.old_values )
{
changed_ids.push_back(item.first);
get_relevant_accounts(item.second.get(), changed_accounts_impacted);
get_relevant_accounts(item.second.get(), changed_accounts_impacted, true);
}
GRAPHENE_TRY_NOTIFY( changed_objects, changed_ids, changed_accounts_impacted)
@ -570,7 +650,7 @@ void database::notify_changed_objects()
removed_ids.emplace_back( item.first );
auto obj = item.second.get();
removed.emplace_back( obj );
get_relevant_accounts(obj, removed_accounts_impacted);
get_relevant_accounts(obj, removed_accounts_impacted, true);
}
GRAPHENE_TRY_NOTIFY( removed_objects, removed_ids, removed, removed_accounts_impacted)

View file

@ -1,10 +0,0 @@
#include <graphene/chain/database.hpp>
namespace graphene { namespace chain {
void database::initialize_db_sidechain()
{
recreate_primary_wallet = false;
}
} }

View file

@ -26,16 +26,18 @@
#include <graphene/chain/db_with.hpp>
#include <graphene/chain/asset_object.hpp>
#include <graphene/chain/betting_market_object.hpp>
#include <graphene/chain/game_object.hpp>
#include <graphene/chain/global_property_object.hpp>
#include <graphene/chain/hardfork.hpp>
#include <graphene/chain/market_object.hpp>
#include <graphene/chain/offer_object.hpp>
#include <graphene/chain/proposal_object.hpp>
#include <graphene/chain/son_proposal_object.hpp>
#include <graphene/chain/tournament_object.hpp>
#include <graphene/chain/transaction_object.hpp>
#include <graphene/chain/withdraw_permission_object.hpp>
#include <graphene/chain/witness_object.hpp>
#include <graphene/chain/tournament_object.hpp>
#include <graphene/chain/game_object.hpp>
#include <graphene/chain/betting_market_object.hpp>
#include <graphene/chain/protocol/fee_schedule.hpp>
@ -46,7 +48,6 @@ namespace graphene { namespace chain {
void database::update_global_dynamic_data( const signed_block& b, const uint32_t missed_blocks )
{
const dynamic_global_property_object& _dgp = get_dynamic_global_properties();
const global_property_object& gpo = get_global_properties();
// dynamic global properties updating
modify( _dgp, [&b,this,missed_blocks]( dynamic_global_property_object& dgp ){
@ -706,10 +707,35 @@ void database::update_betting_markets(fc::time_point_sec current_block_time)
remove_completed_events();
}
void database::finalize_expired_offers(){
try {
detail::with_skip_flags( *this,
get_node_properties().skip_flags | skip_authority_check, [&](){
transaction_evaluation_state cancel_context(this);
//Cancel expired limit orders
auto& limit_index = get_index_type<offer_index>().indices().get<by_expiration_date>();
auto itr = limit_index.begin();
while( itr != limit_index.end() && itr->offer_expiration_date <= head_block_time() )
{
const offer_object& offer = *itr;
++itr;
finalize_offer_operation finalize;
finalize.fee_paying_account = offer.issuer;
finalize.offer_id = offer.id;
finalize.fee = asset( 0, asset_id_type() );
finalize.result = offer.bidder ? result_type::Expired : result_type::ExpiredNoBid;
cancel_context.skip_fee_schedule_check = true;
apply_operation(cancel_context, finalize);
}
});
} FC_CAPTURE_AND_RETHROW()}
void database::remove_son_proposal( const proposal_object& proposal )
{ try {
if( proposal.proposed_transaction.operations.size() == 1 &&
( proposal.proposed_transaction.operations.back().which() == operation::tag<son_delete_operation>::value ||
( proposal.proposed_transaction.operations.back().which() == operation::tag<son_deregister_operation>::value ||
proposal.proposed_transaction.operations.back().which() == operation::tag<son_report_down_operation>::value) )
{
const auto& son_proposal_idx = get_index_type<son_proposal_index>().indices().get<by_proposal>();

View file

@ -74,21 +74,32 @@ witness_id_type database::get_scheduled_witness( uint32_t slot_num )const
return wid;
}
son_id_type database::get_scheduled_son( uint32_t slot_num )const
unsigned_int database::get_son_schedule_id( sidechain_type type )const
{
static const map<sidechain_type, unsigned_int> schedule_map = {
{ sidechain_type::bitcoin, 0 },
{ sidechain_type::ethereum, 1 },
{ sidechain_type::hive, 2 }
};
return schedule_map.at(type);
}
son_id_type database::get_scheduled_son( sidechain_type type, uint32_t slot_num )const
{
son_id_type sid;
const global_property_object& gpo = get_global_properties();
if (gpo.parameters.witness_schedule_algorithm == GRAPHENE_WITNESS_SHUFFLED_ALGORITHM)
{
const dynamic_global_property_object& dpo = get_dynamic_global_properties();
const son_schedule_object& sso = son_schedule_id_type()(*this);
const son_schedule_object& sso = son_schedule_id_type(get_son_schedule_id(type))(*this);
uint64_t current_aslot = dpo.current_aslot + slot_num;
return sso.current_shuffled_sons[ current_aslot % sso.current_shuffled_sons.size() ];
}
if (gpo.parameters.witness_schedule_algorithm == GRAPHENE_WITNESS_SCHEDULED_ALGORITHM &&
slot_num != 0 )
{
const son_schedule_object& sso = son_schedule_id_type()(*this);
const son_schedule_object& sso = son_schedule_id_type(get_son_schedule_id(type))(*this);
// ask the near scheduler who goes in the given slot
bool slot_is_near = sso.scheduler.get_slot(slot_num-1, sid);
if(! slot_is_near)
@ -189,36 +200,39 @@ void database::update_witness_schedule()
}
}
void database::update_son_schedule()
void database::update_son_schedule(sidechain_type type)
{
const son_schedule_object& sso = son_schedule_id_type()(*this);
const global_property_object& gpo = get_global_properties();
if( head_block_num() % gpo.active_sons.size() == 0 )
const son_schedule_object& sidechain_sso = get(son_schedule_id_type(get_son_schedule_id(type)));
if( gpo.active_sons.at(type).size() != 0 &&
head_block_num() % gpo.active_sons.at(type).size() == 0)
{
modify( sso, [&]( son_schedule_object& _sso )
modify( sidechain_sso, [&]( son_schedule_object& _sso )
{
_sso.current_shuffled_sons.clear();
_sso.current_shuffled_sons.reserve( gpo.active_sons.size() );
_sso.current_shuffled_sons.reserve( gpo.active_sons.at(type).size() );
for( const son_info& w : gpo.active_sons )
_sso.current_shuffled_sons.push_back( w.son_id );
for ( const auto &w : gpo.active_sons.at(type) ) {
_sso.current_shuffled_sons.push_back(w.son_id);
}
auto now_hi = uint64_t(head_block_time().sec_since_epoch()) << 32;
for( uint32_t i = 0; i < _sso.current_shuffled_sons.size(); ++i )
for (uint32_t i = 0; i < _sso.current_shuffled_sons.size(); ++i)
{
/// High performance random generator
/// http://xorshift.di.unimi.it/
uint64_t k = now_hi + uint64_t(i)*2685821657736338717ULL;
uint64_t k = now_hi + uint64_t(i) * 2685821657736338717ULL;
k ^= (k >> 12);
k ^= (k << 25);
k ^= (k >> 27);
k *= 2685821657736338717ULL;
uint32_t jmax = _sso.current_shuffled_sons.size() - i;
uint32_t j = i + k%jmax;
std::swap( _sso.current_shuffled_sons[i],
_sso.current_shuffled_sons[j] );
uint32_t j = i + k % jmax;
std::swap(_sso.current_shuffled_sons[i],
_sso.current_shuffled_sons[j]);
}
});
}
@ -304,13 +318,15 @@ void database::update_witness_schedule(const signed_block& next_block)
idump( ( double(total_time/1000000.0)/calls) );
}
void database::update_son_schedule(const signed_block& next_block)
void database::update_son_schedule(sidechain_type type, const signed_block& next_block)
{
auto start = fc::time_point::now();
const global_property_object& gpo = get_global_properties();
#ifndef NDEBUG
const son_schedule_object& sso = get(son_schedule_id_type());
uint32_t schedule_needs_filled = gpo.active_sons.size();
uint32_t schedule_slot = get_slot_at_time(next_block.timestamp);
#endif
const global_property_object& gpo = get_global_properties();
const uint32_t schedule_needs_filled = gpo.active_sons.at(type).size();
const uint32_t schedule_slot = get_slot_at_time(next_block.timestamp);
// We shouldn't be able to generate _pending_block with timestamp
// in the past, and incoming blocks from the network with timestamp
@ -319,48 +335,49 @@ void database::update_son_schedule(const signed_block& next_block)
assert( schedule_slot > 0 );
son_id_type first_son;
bool slot_is_near = sso.scheduler.get_slot( schedule_slot-1, first_son );
son_id_type son;
const dynamic_global_property_object& dpo = get_dynamic_global_properties();
assert( dpo.random.data_size() == witness_scheduler_rng::seed_length );
assert( witness_scheduler_rng::seed_length == sso.rng_seed.size() );
modify(sso, [&](son_schedule_object& _sso)
const son_schedule_object& sidechain_sso = get(son_schedule_id_type(get_son_schedule_id(type)));
son_id_type first_son;
bool slot_is_near = sidechain_sso.scheduler.get_slot( schedule_slot-1, first_son );
son_id_type son_id;
modify(sidechain_sso, [&](son_schedule_object& _sso)
{
_sso.slots_since_genesis += schedule_slot;
witness_scheduler_rng rng(sso.rng_seed.data, _sso.slots_since_genesis);
_sso.slots_since_genesis += schedule_slot;
witness_scheduler_rng rng(_sso.rng_seed.data, _sso.slots_since_genesis);
_sso.scheduler._min_token_count = std::max(int(gpo.active_sons.size()) / 2, 1);
_sso.scheduler._min_token_count = std::max(int(gpo.active_sons.at(type).size()) / 2, 1);
if( slot_is_near )
{
uint32_t drain = schedule_slot;
while( drain > 0 )
{
if( _sso.scheduler.size() == 0 )
break;
_sso.scheduler.consume_schedule();
--drain;
}
}
else
{
_sso.scheduler.reset_schedule( first_son );
}
while( !_sso.scheduler.get_slot(schedule_needs_filled, son) )
{
if( _sso.scheduler.produce_schedule(rng) & emit_turn )
memcpy(_sso.rng_seed.begin(), dpo.random.data(), dpo.random.data_size());
}
_sso.last_scheduling_block = next_block.block_num();
_sso.recent_slots_filled = (
(_sso.recent_slots_filled << 1)
+ 1) << (schedule_slot - 1);
if( slot_is_near )
{
uint32_t drain = schedule_slot;
while( drain > 0 )
{
if( _sso.scheduler.size() == 0 )
break;
_sso.scheduler.consume_schedule();
--drain;
}
}
else
{
_sso.scheduler.reset_schedule( first_son );
}
while( !_sso.scheduler.get_slot(schedule_needs_filled, son_id) )
{
if( _sso.scheduler.produce_schedule(rng) & emit_turn )
memcpy(_sso.rng_seed.begin(), dpo.random.data(), dpo.random.data_size());
}
_sso.last_scheduling_block = next_block.block_num();
_sso.recent_slots_filled = (
(_sso.recent_slots_filled << 1)
+ 1) << (schedule_slot - 1);
});
auto end = fc::time_point::now();
static uint64_t total_time = 0;
static uint64_t calls = 0;

View file

@ -47,7 +47,7 @@ namespace graphene { namespace chain {
};
} }
FC_REFLECT_ENUM(graphene::chain::event_state,
FC_REFLECT_ENUM(graphene::chain::event_state,
(upcoming)
(frozen_upcoming)
(in_progress)
@ -61,12 +61,12 @@ namespace graphene { namespace chain {
namespace msm = boost::msm;
namespace mpl = boost::mpl;
namespace
namespace
{
// Events -- most events happen when the witnesses publish an event_update operation with a new
// status, so if they publish an event with the status set to `frozen`, we'll generate a `frozen_event`
struct upcoming_event
struct upcoming_event
{
database& db;
upcoming_event(database& db) : db(db) {}
@ -76,12 +76,12 @@ namespace graphene { namespace chain {
database& db;
in_progress_event(database& db) : db(db) {}
};
struct frozen_event
struct frozen_event
{
database& db;
frozen_event(database& db) : db(db) {}
};
struct finished_event
struct finished_event
{
database& db;
finished_event(database& db) : db(db) {}
@ -104,7 +104,7 @@ namespace graphene { namespace chain {
betting_market_group_resolved_event(database& db, betting_market_group_id_type resolved_group, bool was_canceled) : db(db), resolved_group(resolved_group), was_canceled(was_canceled) {}
};
// event triggered when a betting market group is closed. When we get this,
// event triggered when a betting market group is closed. When we get this,
// if all child betting market groups are closed, transition to finished
struct betting_market_group_closed_event
{
@ -127,7 +127,7 @@ namespace graphene { namespace chain {
void on_entry(const upcoming_event& event, event_state_machine_& fsm) {
dlog("event ${id} -> upcoming", ("id", fsm.event_obj->id));
auto& betting_market_group_index = event.db.get_index_type<betting_market_group_object_index>().indices().get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(fsm.event_obj->id)))
try
{
@ -147,7 +147,7 @@ namespace graphene { namespace chain {
void on_entry(const in_progress_event& event, event_state_machine_& fsm) {
dlog("event ${id} -> in_progress", ("id", fsm.event_obj->id));
auto& betting_market_group_index = event.db.get_index_type<betting_market_group_object_index>().indices().get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(fsm.event_obj->id)))
try
{
@ -203,7 +203,7 @@ namespace graphene { namespace chain {
void freeze_betting_market_groups(const frozen_event& event) {
auto& betting_market_group_index = event.db.get_index_type<betting_market_group_object_index>().indices().get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(event_obj->id)))
{
try
@ -222,7 +222,7 @@ namespace graphene { namespace chain {
void close_all_betting_market_groups(const finished_event& event) {
auto& betting_market_group_index = event.db.get_index_type<betting_market_group_object_index>().indices().get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(event_obj->id)))
{
try
@ -241,7 +241,7 @@ namespace graphene { namespace chain {
void cancel_all_betting_market_groups(const canceled_event& event) {
auto& betting_market_group_index = event.db.template get_index_type<betting_market_group_object_index>().indices().template get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(event_obj->id)))
event.db.modify(betting_market_group, [&event](betting_market_group_object& betting_market_group_obj) {
betting_market_group_obj.on_canceled_event(event.db, true);
@ -252,15 +252,15 @@ namespace graphene { namespace chain {
bool all_betting_market_groups_are_closed(const betting_market_group_closed_event& event)
{
auto& betting_market_group_index = event.db.get_index_type<betting_market_group_object_index>().indices().get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(event_obj->id)))
if (betting_market_group.id != event.closed_group)
{
betting_market_group_status status = betting_market_group.get_status();
if (status != betting_market_group_status::closed &&
status != betting_market_group_status::graded &&
status != betting_market_group_status::re_grading &&
status != betting_market_group_status::settled &&
if (status != betting_market_group_status::closed &&
status != betting_market_group_status::graded &&
status != betting_market_group_status::re_grading &&
status != betting_market_group_status::settled &&
status != betting_market_group_status::canceled)
return false;
}
@ -276,7 +276,7 @@ namespace graphene { namespace chain {
if (event_obj->at_least_one_betting_market_group_settled)
return false;
auto& betting_market_group_index = event.db.get_index_type<betting_market_group_object_index>().indices().get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(event_obj->id)))
if (betting_market_group.id != event.resolved_group)
if (betting_market_group.get_status() != betting_market_group_status::canceled)
@ -290,7 +290,7 @@ namespace graphene { namespace chain {
event_obj->at_least_one_betting_market_group_settled = true;
auto& betting_market_group_index = event.db.get_index_type<betting_market_group_object_index>().indices().get<by_event_id>();
for (const betting_market_group_object& betting_market_group :
for (const betting_market_group_object& betting_market_group :
boost::make_iterator_range(betting_market_group_index.equal_range(event_obj->id))) {
if (betting_market_group.id != event.resolved_group) {
betting_market_group_status status = betting_market_group.get_status();
@ -344,7 +344,6 @@ namespace graphene { namespace chain {
{
FC_THROW_EXCEPTION(graphene::chain::no_transition, "No transition");
}
template <class Fsm>
void no_transition(canceled_event const& e, Fsm&, int state)
{
@ -372,7 +371,7 @@ namespace graphene { namespace chain {
{
}
event_object::event_object(const event_object& rhs) :
event_object::event_object(const event_object& rhs) :
graphene::db::abstract_object<event_object>(rhs),
name(rhs.name),
season(rhs.season),
@ -408,7 +407,7 @@ namespace graphene { namespace chain {
}
namespace {
bool verify_event_status_constants()
{
unsigned error_count = 0;
@ -443,19 +442,19 @@ namespace graphene { namespace chain {
dlog("Event status constants are correct");
else
wlog("There were ${count} errors in the event status constants", ("count", error_count));
return error_count == 0;
}
} // end anonymous namespace
event_status event_object::get_status() const
{
static bool state_constants_are_correct = verify_event_status_constants();
(void)&state_constants_are_correct;
event_state state = (event_state)my->state_machine.current_state()[0];
ddump((state));
switch (state)
{
case event_state::upcoming:
@ -523,8 +522,8 @@ namespace graphene { namespace chain {
my->state_machine.process_event(betting_market_group_closed_event(db, closed_group));
}
// These are the only statuses that can be explicitly set by witness operations. The missing
// status, 'settled', is automatically set when all of the betting market groups have
// These are the only statuses that can be explicitly set by witness operations. The missing
// status, 'settled', is automatically set when all of the betting market groups have
// settled/canceled
void event_object::dispatch_new_status(database& db, event_status new_status)
{
@ -533,16 +532,16 @@ namespace graphene { namespace chain {
on_upcoming_event(db);
break;
case event_status::in_progress: // by witnesses when the event starts
on_in_progress_event(db);
on_in_progress_event(db);
break;
case event_status::frozen: // by witnesses when the event needs to be frozen
on_frozen_event(db);
on_frozen_event(db);
break;
case event_status::finished: // by witnesses when the event is complete
on_finished_event(db);
on_finished_event(db);
break;
case event_status::canceled: // by witnesses to cancel the event
on_canceled_event(db);
on_canceled_event(db);
break;
default:
FC_THROW("Status ${new_status} cannot be explicitly set", ("new_status", new_status));
@ -551,7 +550,7 @@ namespace graphene { namespace chain {
} } // graphene::chain
namespace fc {
namespace fc {
// Manually reflect event_object to variant to properly reflect "state"
void to_variant(const graphene::chain::event_object& event_obj, fc::variant& v, uint32_t max_depth)
{

View file

@ -24,7 +24,6 @@
#include <graphene/chain/fork_database.hpp>
#include <graphene/chain/exceptions.hpp>
#include <graphene/chain/protocol/fee_schedule.hpp>
#include <fc/smart_ref_impl.hpp>
namespace graphene { namespace chain {
fork_database::fork_database()

View file

@ -547,7 +547,7 @@ namespace graphene { namespace chain {
} } // graphene::chain
namespace fc {
namespace fc {
// Manually reflect game_object to variant to properly reflect "state"
void to_variant(const graphene::chain::game_object& game_obj, fc::variant& v, uint32_t max_depth)
{

View file

@ -25,7 +25,6 @@
#include <graphene/chain/genesis_state.hpp>
// these are required to serialize a genesis_state
#include <fc/smart_ref_impl.hpp> // required for gcc in release mode
#include <graphene/chain/protocol/fee_schedule.hpp>
namespace graphene { namespace chain {

View file

@ -1,3 +1,7 @@
#ifndef HARDFORK_1000_TIME
#define HARDFORK_1000_TIME (fc::time_point_sec( 1540000000 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_1000_TIME (fc::time_point_sec::from_iso_string("2018-10-20T01:46:40"))
#else
#define HARDFORK_1000_TIME (fc::time_point_sec::from_iso_string("2019-02-18T12:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// added delete sport and delete event group operations
#ifndef HARDFORK_1001_TIME
#define HARDFORK_1001_TIME (fc::time_point_sec( 1540000000 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_1001_TIME (fc::time_point_sec::from_iso_string("2018-10-20T01:46:40"))
#else
#define HARDFORK_1001_TIME (fc::time_point_sec::from_iso_string("2019-02-18T12:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #357 Disallow publishing certain malformed price feeds
#ifndef HARDFORK_357_TIME
#define HARDFORK_357_TIME (fc::time_point_sec( 1444416300 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_357_TIME (fc::time_point_sec::from_iso_string("2015-10-09T18:45:00"))
#else
#define HARDFORK_357_TIME (fc::time_point_sec::from_iso_string("2015-10-09T18:45:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #359 Allow digits in asset name
#ifndef HARDFORK_359_TIME
#define HARDFORK_359_TIME (fc::time_point_sec( 1444416300 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_359_TIME (fc::time_point_sec::from_iso_string("2015-10-09T18:45:00"))
#else
#define HARDFORK_359_TIME (fc::time_point_sec::from_iso_string("2015-10-09T18:45:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #385 October 23 enforce PARENT.CHILD and allow short names
#ifndef HARDFORK_385_TIME
#define HARDFORK_385_TIME (fc::time_point_sec( 1445558400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_385_TIME (fc::time_point_sec::from_iso_string("2015-10-23T00:00:00"))
#else
#define HARDFORK_385_TIME (fc::time_point_sec::from_iso_string("2015-10-23T00:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #409 Allow creation of sub-assets
#ifndef HARDFORK_409_TIME
#define HARDFORK_409_TIME (fc::time_point_sec( 1446652800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_409_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#else
#define HARDFORK_409_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #413 Add operation to claim asset fees
#ifndef HARDFORK_413_TIME
#define HARDFORK_413_TIME (fc::time_point_sec( 1446652800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_413_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#else
#define HARDFORK_413_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #415 Default accept policy for asset with no whitelist authorities
#ifndef HARDFORK_415_TIME
#define HARDFORK_415_TIME (fc::time_point_sec( 1446652800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_415_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#else
#define HARDFORK_415_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #416 enforce_white_list is inconsistently applied
#ifndef HARDFORK_416_TIME
#define HARDFORK_416_TIME (fc::time_point_sec( 1446652800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_416_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#else
#define HARDFORK_416_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #419 Account can pay fees in blacklisted asset
#ifndef HARDFORK_419_TIME
#define HARDFORK_419_TIME (fc::time_point_sec( 1446652800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_419_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#else
#define HARDFORK_419_TIME (fc::time_point_sec::from_iso_string("2015-11-04T16:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #436 Prevent margin call from being triggered unless feed < call price
#ifndef HARDFORK_436_TIME
#define HARDFORK_436_TIME (fc::time_point_sec( 1450288800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_436_TIME (fc::time_point_sec::from_iso_string("2015-12-16T18:00:00"))
#else
#define HARDFORK_436_TIME (fc::time_point_sec::from_iso_string("2015-12-16T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #445 Refund create order fees on cancel
#ifndef HARDFORK_445_TIME
#define HARDFORK_445_TIME (fc::time_point_sec( 1450288800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_445_TIME (fc::time_point_sec::from_iso_string("2015-12-16T18:00:00"))
#else
#define HARDFORK_445_TIME (fc::time_point_sec::from_iso_string("2015-12-16T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #453 Hardfork to retroactively correct referral percentages
#ifndef HARDFORK_453_TIME
#define HARDFORK_453_TIME (fc::time_point_sec( 1450288800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_453_TIME (fc::time_point_sec::from_iso_string("2015-12-16T18:00:00"))
#else
#define HARDFORK_453_TIME (fc::time_point_sec::from_iso_string("2015-12-16T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #480 Fix non-BTS MIA core_exchange_rate check
#ifndef HARDFORK_480_TIME
#define HARDFORK_480_TIME (fc::time_point_sec( 1450378800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_480_TIME (fc::time_point_sec::from_iso_string("2015-12-17T19:00:00"))
#else
#define HARDFORK_480_TIME (fc::time_point_sec::from_iso_string("2015-12-17T19:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #483 Operation history numbering change
#ifndef HARDFORK_483_TIME
#define HARDFORK_483_TIME (fc::time_point_sec( 1450378800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_483_TIME (fc::time_point_sec::from_iso_string("2015-12-17T19:00:00"))
#else
#define HARDFORK_483_TIME (fc::time_point_sec::from_iso_string("2015-12-17T19:00:00"))
#endif
#endif

View file

@ -0,0 +1,7 @@
#ifndef HARDFORK_5050_1_TIME
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_5050_1_TIME (fc::time_point_sec::from_iso_string("2020-04-15T20:00:00"))
#else
#define HARDFORK_5050_1_TIME (fc::time_point_sec::from_iso_string("2020-04-22T20:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #516 Special authorities
#ifndef HARDFORK_516_TIME
#define HARDFORK_516_TIME (fc::time_point_sec( 1456250400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_516_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#else
#define HARDFORK_516_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #533 Improve vote counting implementation
#ifndef HARDFORK_533_TIME
#define HARDFORK_533_TIME (fc::time_point_sec( 1456250400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_533_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#else
#define HARDFORK_533_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #538 Buyback accounts
#ifndef HARDFORK_538_TIME
#define HARDFORK_538_TIME (fc::time_point_sec( 1456250400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_538_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#else
#define HARDFORK_538_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #555 Buyback accounts
#ifndef HARDFORK_555_TIME
#define HARDFORK_555_TIME (fc::time_point_sec( 1456250400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_555_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#else
#define HARDFORK_555_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #563 Stealth fee routing
#ifndef HARDFORK_563_TIME
#define HARDFORK_563_TIME (fc::time_point_sec( 1456250400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_563_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#else
#define HARDFORK_563_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #572 Allow asset to update permission flags when no supply exists
#ifndef HARDFORK_572_TIME
#define HARDFORK_572_TIME (fc::time_point_sec( 1456250400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_572_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#else
#define HARDFORK_572_TIME (fc::time_point_sec::from_iso_string("2016-02-23T18:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #599 Unpacking of extension is incorrect
#ifndef HARDFORK_599_TIME
#define HARDFORK_599_TIME (fc::time_point_sec( 1459789200 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_599_TIME (fc::time_point_sec::from_iso_string("2016-04-04T17:00:00"))
#else
#define HARDFORK_599_TIME (fc::time_point_sec::from_iso_string("2016-04-04T17:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #607 Disable negative voting on workers
#ifndef HARDFORK_607_TIME
#define HARDFORK_607_TIME (fc::time_point_sec( 1458752400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_607_TIME (fc::time_point_sec::from_iso_string("2016-03-23T17:00:00"))
#else
#define HARDFORK_607_TIME (fc::time_point_sec::from_iso_string("2016-03-23T17:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #613 Deprecate annual membership
#ifndef HARDFORK_613_TIME
#define HARDFORK_613_TIME (fc::time_point_sec( 1458752400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_613_TIME (fc::time_point_sec::from_iso_string("2016-03-23T17:00:00"))
#else
#define HARDFORK_613_TIME (fc::time_point_sec::from_iso_string("2016-03-23T17:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// #615 Fix price feed expiration check, so websocket server will never spam too much data
#ifndef HARDFORK_615_TIME
#define HARDFORK_615_TIME (fc::time_point_sec( 1458752400 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_615_TIME (fc::time_point_sec::from_iso_string("2016-03-23T17:00:00"))
#else
#define HARDFORK_615_TIME (fc::time_point_sec::from_iso_string("2016-03-23T17:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// Placeholder HF for affiliate reward system
#ifndef HARDFORK_999_TIME
#define HARDFORK_999_TIME (fc::time_point_sec( 1540000000 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_999_TIME (fc::time_point_sec::from_iso_string("2018-10-20T01:46:40"))
#else
#define HARDFORK_999_TIME (fc::time_point_sec::from_iso_string("2019-02-18T12:00:00"))
#endif
#endif

View file

@ -1,4 +1,8 @@
// bitshares-core #429 rounding issue when creating assets
#ifndef HARDFORK_CORE_429_TIME
#define HARDFORK_CORE_429_TIME (fc::time_point_sec( 1566784800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_CORE_429_TIME (fc::time_point_sec::from_iso_string("2019-08-26T02:00:00"))
#else
#define HARDFORK_CORE_429_TIME (fc::time_point_sec::from_iso_string("2019-09-13T02:00:00"))
#endif
#endif

View file

@ -1,5 +1,7 @@
// GPOS HARDFORK Monday, 31 Dec 2019 00:00:00 GMT - 1577750400
// GPOS HARDFORK Monday, March 30, 2020 2:00:00 PM - 1585569600
#ifndef HARDFORK_GPOS_TIME
#define HARDFORK_GPOS_TIME (fc::time_point_sec( 1585569600 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_GPOS_TIME (fc::time_point_sec::from_iso_string("2020-01-06T01:00:00"))
#else
#define HARDFORK_GPOS_TIME (fc::time_point_sec::from_iso_string("2020-02-17T22:00:00"))
#endif
#endif

View 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

View file

@ -0,0 +1,7 @@
#ifndef HARDFORK_NFT_TIME
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_NFT_TIME (fc::time_point_sec::from_iso_string("2020-08-15T00:00:00"))
#else
#define HARDFORK_NFT_TIME (fc::time_point_sec::from_iso_string("2020-12-21T00:00:00"))
#endif
#endif

View file

@ -0,0 +1,7 @@
#ifndef HARDFORK_SIDECHAIN_DELETE_TIME
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_SIDECHAIN_DELETE_TIME (fc::time_point_sec::from_iso_string("2022-11-16T02:00:00"))
#else
#define HARDFORK_SIDECHAIN_DELETE_TIME (fc::time_point_sec::from_iso_string("2022-11-16T02:00:00"))
#endif
#endif

View file

@ -1,7 +1,7 @@
// SON HARDFORK Wednesday, January 1, 2020 12:00:00 AM - 1577836800
// SON HARDFORK Monday, March 30, 2020 3:00:00 PM - 1585573200
// SON HARDFORK Monday, September 21, 2020 1:43:11 PM - 1600695791
#ifndef HARDFORK_SON_TIME
#include <ctime>
#define HARDFORK_SON_TIME (fc::time_point_sec( 1585573200 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_SON_TIME (fc::time_point_sec::from_iso_string("2020-10-28T00:00:00"))
#else
#define HARDFORK_SON_TIME (fc::time_point_sec::from_iso_string("2020-12-21T00:00:00"))
#endif
#endif

View file

@ -0,0 +1,7 @@
#ifndef HARDFORK_SON2_TIME
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_SON2_TIME (fc::time_point_sec::from_iso_string("2021-07-31T00:00:00"))
#else
#define HARDFORK_SON2_TIME (fc::time_point_sec::from_iso_string("2021-07-31T00:00:00"))
#endif
#endif

View file

@ -0,0 +1,7 @@
#ifndef HARDFORK_SON_FOR_ETHEREUM_TIME
#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"))
#endif
#endif

View file

@ -0,0 +1,7 @@
#ifndef HARDFORK_SON_FOR_HIVE_TIME
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_SON_FOR_HIVE_TIME (fc::time_point_sec::from_iso_string("2021-03-31T00:00:00"))
#else
#define HARDFORK_SON_FOR_HIVE_TIME (fc::time_point_sec::from_iso_string("2021-12-21T00:00:00"))
#endif
#endif

View file

@ -1,3 +1,7 @@
#ifndef HARDFORK_SWEEPS_TIME
#define HARDFORK_SWEEPS_TIME (fc::time_point_sec( 1566784800 ))
#ifdef BUILD_PEERPLAYS_TESTNET
#define HARDFORK_SWEEPS_TIME (fc::time_point_sec::from_iso_string("2019-08-26T02:00:00"))
#else
#define HARDFORK_SWEEPS_TIME (fc::time_point_sec::from_iso_string("2019-09-13T02:00:00"))
#endif
#endif

View file

@ -0,0 +1,35 @@
#pragma once
#include <graphene/chain/database.hpp>
#include <graphene/chain/evaluator.hpp>
#include <graphene/chain/protocol/operations.hpp>
#include <graphene/chain/protocol/types.hpp>
namespace graphene { namespace chain {
class account_role_create_evaluator : public evaluator<account_role_create_evaluator>
{
public:
typedef account_role_create_operation operation_type;
void_result do_evaluate( const account_role_create_operation& o );
object_id_type do_apply( const account_role_create_operation& o );
};
class account_role_update_evaluator : public evaluator<account_role_update_evaluator>
{
public:
typedef account_role_update_operation operation_type;
void_result do_evaluate( const account_role_update_operation& o );
void_result do_apply( const account_role_update_operation& o );
};
class account_role_delete_evaluator : public evaluator<account_role_delete_evaluator>
{
public:
typedef account_role_delete_operation operation_type;
void_result do_evaluate( const account_role_delete_operation& o );
void_result do_apply( const account_role_delete_operation& o );
};
} } // graphene::chain

View file

@ -0,0 +1,49 @@
#pragma once
#include <graphene/chain/protocol/types.hpp>
#include <graphene/db/object.hpp>
#include <graphene/db/generic_index.hpp>
namespace graphene
{
namespace chain
{
using namespace graphene::db;
class account_role_object : public abstract_object<account_role_object>
{
public:
static const uint8_t space_id = protocol_ids;
static const uint8_t type_id = account_role_type;
account_id_type owner;
std::string name;
std::string metadata;
flat_set<int> allowed_operations;
flat_set<account_id_type> whitelisted_accounts;
time_point_sec valid_to;
};
struct by_owner;
struct by_expiration;
using account_role_multi_index_type = multi_index_container<
account_role_object,
indexed_by<
ordered_unique< tag<by_id>,
member<object, object_id_type, &object::id>
>,
ordered_non_unique< tag<by_owner>,
member<account_role_object, account_id_type, &account_role_object::owner>
>,
ordered_unique< tag<by_expiration>,
composite_key<account_role_object,
member<account_role_object, time_point_sec, &account_role_object::valid_to>,
member<object, object_id_type, &object::id>>
>
>
>;
using account_role_index = generic_index<account_role_object, account_role_multi_index_type>;
} // namespace chain
} // namespace graphene
FC_REFLECT_DERIVED(graphene::chain::account_role_object, (graphene::db::object),
(owner)(name)(metadata)(allowed_operations)(whitelisted_accounts)(valid_to))

View file

@ -134,6 +134,7 @@ namespace graphene { namespace chain {
optional<lottery_asset_options> lottery_options;
time_point_sec get_lottery_expiration() const;
vector<account_id_type> get_holders( database& db ) const;
vector<uint64_t> get_ticket_ids( database& db ) const;
void distribute_benefactors_part( database& db );
map< account_id_type, vector< uint16_t > > distribute_winners_part( database& db );
void distribute_sweeps_holders_part( database& db );
@ -163,7 +164,12 @@ namespace graphene { namespace chain {
template<class DB>
const asset_bitasset_data_object& bitasset_data(const DB& db)const
{ assert(bitasset_data_id); return db.get(*bitasset_data_id); }
{
FC_ASSERT( bitasset_data_id.valid(),
"Asset ${a} (${id}) is not a market issued asset.",
("a",this->symbol)("id",this->id) );
return db.get(*bitasset_data_id);
}
template<class DB>
const asset_dividend_data_object& dividend_data(const DB& db)const

Some files were not shown because too many files have changed in this diff Show more