Compare commits

...

34 commits

Author SHA1 Message Date
serkixenos
68e2cc9ed9 Set SON and NFT hardfork date to 2020-12-21 00:00:00 GMT 2020-12-14 13:14:11 +01:00
serkixenos
5cf5b57ace Fix failing son_cli tests 2020-12-14 13:13:09 +01:00
serkixenos
d428aad312 Set SON and NFT hardfork date to 2020-12-19 00:00:00 GMT 2020-12-12 00:28:02 +01:00
serkixenos
7fe0ddeb5b Fix failing betting test 2020-12-10 01:44:31 +01:00
serkixenos
29d92d94e1 Fix failing son test 2020-12-09 15:58:12 +01:00
serkixenos
e3ff3bf7bc Fix failing gpos tests 2020-12-09 14:49:38 +01:00
serkixenos
99a7d8453c Merge branch 'merge/master-to-beatrice-20201203' into beatrice 2020-12-08 17:26:49 +01:00
serkixenos
c34c00441b Merge branch 'master' into merge/master-to-beatrice-20201203 2020-12-05 03:45:06 +01: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
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
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
PBSA Github Manager
434837f61f
Update README.md 2020-01-06 10:02:37 -04:00
PBSA Github Manager
709c74505b
Update README.md 2019-12-04 13:26:19 -04:00
Bobinson K B
a0f793951c
updates to PR template 2019-09-26 20:26:23 +05:30
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
23 changed files with 213991 additions and 8253 deletions

View file

@ -88,14 +88,14 @@ then proceed with:
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 +155,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)
```

222008
genesis.json

File diff suppressed because it is too large Load diff

View file

@ -160,10 +160,13 @@ namespace detail {
{
// t.me/peerplays #seednodes
vector<string> seeds = {
"ppy-beatrice-seed.blckchnd.com:6666",
"159.69.223.206:7777",
"51.38.237.243:9666",
"pbsa-beatrice.blockchainprojectsbv.com:9195"
"173.249.23.108:9777",
"node.peerblock.trade:9777",
"peerplays.blockoperations.com:9777",
"pms.blockveritas.co:7777",
"seed.ppy.alex-pu.info:8888",
"seed.ppy.blckchnd.com:6116",
"seed01.eifos.org:7777"
};
for( const string& endpoint_string : seeds )

View file

@ -79,7 +79,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 +122,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 +177,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;
});
@ -225,7 +225,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 +578,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) ) }

View file

@ -44,11 +44,11 @@
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)
@ -56,20 +56,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
@ -78,7 +78,7 @@ namespace {
else
edump( ("Found dup"));
}
return digest_accumulator.proposed_operations_digests;
}
}
@ -148,24 +148,24 @@ 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_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());
}
auto proposed_operations_digests = gather_proposed_operations_digests(trx);
for (auto& digest: proposed_operations_digests)
{
@ -337,7 +337,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
@ -351,7 +351,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);
@ -551,7 +551,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();
@ -561,7 +561,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 );
@ -692,10 +692,10 @@ 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) {
@ -713,9 +713,9 @@ 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();
create_block_summary(next_block);
place_delayed_bets(); // must happen after update_global_dynamic_data() updates the time
clear_expired_transactions();
@ -786,7 +786,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();
@ -884,7 +884,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

@ -1,3 +1,3 @@
#ifndef HARDFORK_1000_TIME
#define HARDFORK_1000_TIME (fc::time_point_sec( 1540000000 ))
#define HARDFORK_1000_TIME (fc::time_point_sec( 1550491200 ))
#endif

View file

@ -1,4 +1,4 @@
// added delete sport and delete event group operations
#ifndef HARDFORK_1001_TIME
#define HARDFORK_1001_TIME (fc::time_point_sec( 1540000000 ))
#define HARDFORK_1001_TIME (fc::time_point_sec( 1550491200 ))
#endif

View file

@ -1,4 +1,4 @@
// 5050_1 HARDFORK Wednesday, 15 April 2020 20:00:00 GMT
// 5050_1 HARDFORK Thursday, 22 April 2020 20:00:00 GMT
#ifndef HARDFORK_5050_1_TIME
#define HARDFORK_5050_1_TIME (fc::time_point_sec( 1586980800 ))
#define HARDFORK_5050_1_TIME (fc::time_point_sec( 1587585600 ))
#endif

View file

@ -1,4 +1,4 @@
// Placeholder HF for affiliate reward system
#ifndef HARDFORK_999_TIME
#define HARDFORK_999_TIME (fc::time_point_sec( 1540000000 ))
#define HARDFORK_999_TIME (fc::time_point_sec( 1550491200 ))
#endif

View file

@ -1,4 +1,4 @@
// bitshares-core #429 rounding issue when creating assets
#ifndef HARDFORK_CORE_429_TIME
#define HARDFORK_CORE_429_TIME (fc::time_point_sec( 1566784800 ))
#define HARDFORK_CORE_429_TIME (fc::time_point_sec( 1568340000 ))
#endif

View file

@ -1,4 +1,4 @@
// GPOS HARDFORK Monday, 6 January 2020 01:00:00 GMT
// GPOS HARDFORK Monday, 17 February 2020 22:00:00 GMT
#ifndef HARDFORK_GPOS_TIME
#define HARDFORK_GPOS_TIME (fc::time_point_sec( 1578272400 ))
#define HARDFORK_GPOS_TIME (fc::time_point_sec( 1581976800 ))
#endif

View file

@ -1,4 +1,4 @@
// NFT HARDFORK Sat, 15-Aug-20 00:00:00 UTC
// GPOS HARDFORK 2020-12-21 00:00:00 GMT
#ifndef HARDFORK_NFT_TIME
#define HARDFORK_NFT_TIME (fc::time_point_sec( 1597449600 ))
#define HARDFORK_NFT_TIME (fc::time_point_sec( 1608508800 ))
#endif

View file

@ -1,5 +1,4 @@
// SON HARDFORK Wednesday, October 28, 2020 0:00:00 GMT
// GPOS HARDFORK 2020-12-21 00:00:00 GMT
#ifndef HARDFORK_SON_TIME
#include <ctime>
#define HARDFORK_SON_TIME (fc::time_point_sec( 1603843200 ))
#define HARDFORK_SON_TIME (fc::time_point_sec( 1608508800 ))
#endif

View file

@ -1,3 +1,3 @@
#ifndef HARDFORK_SWEEPS_TIME
#define HARDFORK_SWEEPS_TIME (fc::time_point_sec( 1566784800 ))
#define HARDFORK_SWEEPS_TIME (fc::time_point_sec( 1568340000 ))
#endif

View file

@ -28,10 +28,10 @@ namespace graphene
using account_role_multi_index_type = multi_index_container<
account_role_object,
indexed_by<
ordered_unique< tag<by_id>,
ordered_unique< tag<by_id>,
member<object, object_id_type, &object::id>
>,
ordered_non_unique< tag<by_owner>,
ordered_non_unique< tag<by_owner>,
member<account_role_object, account_id_type, &account_role_object::owner>
>,
ordered_unique< tag<by_expiration>,

View file

@ -23,8 +23,8 @@
*/
#pragma once
#define GRAPHENE_SYMBOL "TEST"
#define GRAPHENE_ADDRESS_PREFIX "TEST"
#define GRAPHENE_SYMBOL "PPY"
#define GRAPHENE_ADDRESS_PREFIX "PPY"
#define GRAPHENE_MIN_ACCOUNT_NAME_LENGTH 1
#define GRAPHENE_MAX_ACCOUNT_NAME_LENGTH 63
@ -153,7 +153,7 @@
#define GRAPHENE_RECENTLY_MISSED_COUNT_INCREMENT 4
#define GRAPHENE_RECENTLY_MISSED_COUNT_DECREMENT 3
#define GRAPHENE_CURRENT_DB_VERSION "PPY2.3"
#define GRAPHENE_CURRENT_DB_VERSION "PPY2.4"
#define GRAPHENE_IRREVERSIBLE_THRESHOLD (70 * GRAPHENE_1_PERCENT)

View file

@ -1838,14 +1838,17 @@ BOOST_AUTO_TEST_CASE(event_group_delete_test_with_matched_bets)
transfer(account_id_type(), bob_id, asset(initialAccountAsset));
generate_blocks(1);
const auto& event = create_event({{"en", "event"}}, {{"en", "2016-17"}}, nhl.id);
create_event({{"en", "event"}}, {{"en", "2016-17"}}, nhl.id);
generate_blocks(1);
const event_object& event = *db.get_index_type<event_object_index>().indices().get<by_id>().rbegin();
const auto& market_group = create_betting_market_group({{"en", "market group"}}, event.id, betting_market_rules.id, asset_id_type(), false, 0);
create_betting_market_group({{"en", "market group"}}, event.id, betting_market_rules.id, asset_id_type(), false, 0);
generate_blocks(1);
const betting_market_group_object& market_group = *db.get_index_type<betting_market_group_object_index>().indices().get<by_id>().rbegin();
const auto& market = create_betting_market(market_group.id, {{"en", "market"}});
create_betting_market(market_group.id, {{"en", "market"}});
generate_blocks(1);
const betting_market_object& market = *db.get_index_type<betting_market_object_index>().indices().get<by_id>().rbegin();
place_bet(alice_id, market.id, bet_type::back, asset(betAsset, asset_id_type()), 2 * GRAPHENE_BETTING_ODDS_PRECISION);
place_bet(bob_id, market.id, bet_type::lay, asset(betAsset, asset_id_type()), 2 * GRAPHENE_BETTING_ODDS_PRECISION);
@ -1877,9 +1880,8 @@ BOOST_AUTO_TEST_CASE(event_group_delete_test_not_existed_event_group)
try
{
CREATE_ICE_HOCKEY_BETTING_MARKET(false, 0);
event_group_id_type nhl_id = nhl.id;
delete_event_group(nhl_id);
event_group_id_type nhl_id = nhl.id;
delete_event_group(nhl_id);
BOOST_CHECK_THROW(delete_event_group(nhl_id), fc::exception);
} FC_LOG_AND_RETHROW()

View file

@ -201,9 +201,39 @@ cli_fixture::~cli_fixture()
#endif
}
void cli_fixture::generate_blocks(fc::time_point_sec timestamp, bool miss_intermediate_blocks, uint32_t skip)
{
auto db = app1->chain_database();
if( miss_intermediate_blocks )
{
generate_block(skip);
auto slots_to_miss = db->get_slot_at_time(timestamp);
if( slots_to_miss <= 1 )
return;
--slots_to_miss;
generate_block(skip, fc::ecc::private_key::regenerate(fc::sha256::hash(string("null_key"))), slots_to_miss);
return;
}
while( db->head_block_time() < timestamp )
generate_block(skip);
}
signed_block cli_fixture::generate_block(uint32_t skip, const fc::ecc::private_key& key, int miss_blocks)
{
skip |= database::skip_undo_history_check;
// skip == ~0 will skip checks specified in database::validation_steps
auto db = app1->chain_database();
auto block = db->generate_block(db->get_slot_time(miss_blocks + 1),
db->get_scheduled_witness(miss_blocks + 1),
key, skip);
db->clear_pending();
return block;
}
bool cli_fixture::generate_maintenance_block() {
try {
fc::ecc::private_key committee_key = fc::ecc::private_key::regenerate(fc::sha256::hash(string("nathan")));
fc::ecc::private_key committee_key = fc::ecc::private_key::regenerate(fc::sha256::hash(string("null_key")));
uint32_t skip = ~database::skip_fork_db;
auto db = app1->chain_database();
auto maint_time = db->get_dynamic_global_properties().next_maintenance_time;
@ -219,27 +249,6 @@ bool cli_fixture::generate_maintenance_block() {
}
}
bool cli_fixture::generate_block()
{
graphene::chain::signed_block returned_block;
return generate_block(returned_block);
}
bool cli_fixture::generate_block(graphene::chain::signed_block& returned_block)
{
try {
fc::ecc::private_key committee_key = fc::ecc::private_key::regenerate(fc::sha256::hash(string("nathan")));
auto db = app1->chain_database();
returned_block = db->generate_block( db->get_slot_time(1),
db->get_scheduled_witness(1),
committee_key,
database::skip_nothing );
return true;
} catch (exception &e) {
return false;
}
}
void cli_fixture::init_nathan()
{
try
@ -254,7 +263,7 @@ void cli_fixture::init_nathan()
import_txs = con.wallet_api_ptr->import_balance("nathan", nathan_keys, true);
nathan_acct_before_upgrade = con.wallet_api_ptr->get_account("nathan");
BOOST_CHECK(generate_block());
generate_block();
// upgrade nathan
BOOST_TEST_MESSAGE("Upgrading Nathan to LTM");

View file

@ -60,13 +60,12 @@ struct cli_fixture
cli_fixture();
~cli_fixture();
///////////
/// Send a block to the db
/// @param returned_block the signed block
/// @returns true on success
///////////
bool generate_block(graphene::chain::signed_block& returned_block);
bool generate_block();
signed_block generate_block(uint32_t skip = ~0,
const fc::ecc::private_key& key = fc::ecc::private_key::regenerate(fc::sha256::hash(string("null_key"))),
int miss_blocks = 0);
void generate_blocks(fc::time_point_sec timestamp, bool miss_intermediate_blocks = true, uint32_t skip = ~0);
///////////
/// @brief Skip intermediate blocks, and generate a maintenance block
/// @returns true on success

View file

@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE( create_new_account )
BOOST_CHECK(con.wallet_api_ptr->import_key("jmjatlanta", bki.wif_priv_key));
con.wallet_api_ptr->save_wallet_file(con.wallet_filename);
BOOST_CHECK(generate_block());
generate_block();
fc::usleep( fc::seconds(1) );
// attempt to give jmjatlanta some peerplays
@ -112,7 +112,7 @@ BOOST_FIXTURE_TEST_CASE( cli_vote_for_2_witnesses, cli_fixture )
signed_transaction vote_witness1_tx = con.wallet_api_ptr->vote_for_witness("jmjatlanta", "init1", true, true);
// generate a block to get things started
BOOST_CHECK(generate_block());
generate_block();
// wait for a maintenance interval
BOOST_CHECK(generate_maintenance_block());
@ -197,7 +197,7 @@ BOOST_AUTO_TEST_CASE( account_history_pagination )
"1.3.0", "Here are some CORE token for your new account", true);
}
BOOST_CHECK(generate_block());
generate_block();
// now get account history and make sure everything is there (and no duplicates)
std::vector<graphene::wallet::operation_detail> history = con.wallet_api_ptr->get_account_history("jmjatlanta", 300);
@ -489,7 +489,7 @@ BOOST_FIXTURE_TEST_CASE( saving_keys_wallet_test, cli_fixture )
graphene::wallet::plain_keys pk = decrypt_keys( "supersecret", wallet.cipher_keys );
BOOST_CHECK( pk.keys.size() == 1 ); // nathan key
BOOST_CHECK( generate_block() );
generate_block();
fc::usleep( fc::seconds(1) );
wallet = fc::json::from_file( path ).as<graphene::wallet::wallet_data>( 2 * GRAPHENE_MAX_NESTED_OBJECTS );

View file

@ -27,6 +27,9 @@
#include <boost/test/unit_test.hpp>
#include <graphene/chain/config.hpp>
#include <graphene/chain/hardfork.hpp>
class son_test_helper
{
cli_fixture& fixture_;
@ -36,6 +39,8 @@ public:
fixture_(fixture)
{
fixture_.init_nathan();
fixture_.generate_blocks(HARDFORK_SON_TIME);
fixture_.generate_block();
}
void create_son(const std::string& account_name, const std::string& son_url,
@ -65,7 +70,7 @@ public:
"nathan", account_name, "65000", "1.3.0", "Here are some CORE token for your new account", true
);
BOOST_CHECK(fixture_.generate_block());
fixture_.generate_block();
// upgrade son account
BOOST_TEST_MESSAGE("Upgrading son account to LTM");
@ -75,16 +80,16 @@ public:
// verify that the upgrade was successful
BOOST_CHECK(son_account.is_lifetime_member());
BOOST_CHECK(fixture_.generate_block());
fixture_.generate_block();
// create deposit vesting
fixture_.con.wallet_api_ptr->create_vesting_balance(account_name,
"50", "1.3.0", vesting_balance_type::son, true);
BOOST_CHECK(fixture_.generate_block());
fixture_.generate_block();
// create pay_vb vesting
fixture_.con.wallet_api_ptr->create_vesting_balance(account_name, "1", "1.3.0", vesting_balance_type::normal, true);
BOOST_CHECK(fixture_.generate_block());
fixture_.generate_block();
// check deposits are here
auto deposits = fixture_.con.wallet_api_ptr->get_vesting_balances(account_name);
@ -169,10 +174,11 @@ BOOST_AUTO_TEST_CASE( cli_update_son )
// update SON signing key
sidechain_public_keys.clear();
con.wallet_api_ptr->update_son("sonmember", "http://sonmember_updated2", "TEST6Yaq5ZNTTkMM2kBBzV5jktr8ETsniCC3bnVD7eFmegRrLXfGGG", sidechain_public_keys, true);
std::string new_key = GRAPHENE_ADDRESS_PREFIX + std::string("6Yaq5ZNTTkMM2kBBzV5jktr8ETsniCC3bnVD7eFmegRrLXfGGG");
con.wallet_api_ptr->update_son("sonmember", "http://sonmember_updated2", new_key, sidechain_public_keys, true);
son_data = con.wallet_api_ptr->get_son("sonmember");
BOOST_CHECK(son_data.url == "http://sonmember_updated2");
BOOST_CHECK(std::string(son_data.signing_key) == "TEST6Yaq5ZNTTkMM2kBBzV5jktr8ETsniCC3bnVD7eFmegRrLXfGGG");
BOOST_CHECK(std::string(son_data.signing_key) == new_key);
} catch( fc::exception& e ) {
edump((e.to_detail_string()));
@ -421,7 +427,7 @@ BOOST_AUTO_TEST_CASE( update_son_votes_test )
con.wallet_api_ptr->create_vesting_balance("nathan", "1000", "1.3.0", vesting_balance_type::gpos, true);
update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
rejected, 2, true);
BOOST_CHECK(generate_block());
generate_block();
BOOST_CHECK(generate_maintenance_block());
// Verify the votes
@ -461,7 +467,7 @@ BOOST_AUTO_TEST_CASE( update_son_votes_test )
rejected.push_back("son1accnt");
BOOST_CHECK_THROW(update_votes_tx = con.wallet_api_ptr->update_son_votes("nathan", accepted,
rejected, 1, true), fc::exception);
BOOST_CHECK(generate_block());
generate_block();
// Verify the votes
son1_obj = con.wallet_api_ptr->get_son("son1account");
@ -675,7 +681,7 @@ BOOST_AUTO_TEST_CASE( maintenance_test )
// put SON in maintenance mode
con.wallet_api_ptr->request_son_maintenance(name, true);
BOOST_CHECK(generate_block());
generate_block();
// check SON is in request_maintenance
son_obj = con.wallet_api_ptr->get_son(name);
@ -683,7 +689,7 @@ BOOST_AUTO_TEST_CASE( maintenance_test )
// restore SON activity
con.wallet_api_ptr->cancel_request_son_maintenance(name, true);
BOOST_CHECK(generate_block());
generate_block();
// check SON is active
son_obj = con.wallet_api_ptr->get_son(name);
@ -691,7 +697,7 @@ BOOST_AUTO_TEST_CASE( maintenance_test )
// put SON in maintenance mode
con.wallet_api_ptr->request_son_maintenance(name, true);
BOOST_CHECK(generate_block());
generate_block();
// check SON is in request_maintenance
son_obj = con.wallet_api_ptr->get_son(name);

View file

@ -1005,7 +1005,7 @@ BOOST_AUTO_TEST_CASE( issue_429_test )
const auto& fees = *db.get_global_properties().parameters.current_fees;
auto fees_to_pay = fees.get<asset_create_operation>();
{
signed_transaction tx;
asset_create_operation op;

View file

@ -905,7 +905,7 @@ BOOST_AUTO_TEST_CASE( worker_dividends_voting )
vote_for(voter1_id, worker.vote_for, voter1_private_key);
// first maint pass, coefficient will be 1
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
generate_blocks(HARDFORK_GPOS_TIME + fc::hours(12)); //forward 1/2 sub-period so that it consider only gpos votes
worker = worker_id_type()(db);
BOOST_CHECK_EQUAL(worker.total_votes_for, 100);
@ -925,8 +925,8 @@ BOOST_AUTO_TEST_CASE( worker_dividends_voting )
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
// worker is getting paid
BOOST_CHECK_EQUAL(worker_id_type()(db).worker.get<vesting_balance_worker_type>().balance(db).balance.amount.value, 10);
BOOST_CHECK_EQUAL(worker.worker.get<vesting_balance_worker_type>().balance(db).balance.amount.value, 10);
BOOST_CHECK_EQUAL(worker_id_type()(db).worker.get<vesting_balance_worker_type>().balance(db).balance.amount.value, 5);
BOOST_CHECK_EQUAL(worker.worker.get<vesting_balance_worker_type>().balance(db).balance.amount.value, 5);
// second maint pass, coefficient will be 0.75
worker = worker_id_type()(db);
@ -1009,7 +1009,7 @@ BOOST_AUTO_TEST_CASE( account_multiple_vesting )
vote_for(sam_id, witness1.vote_id, sam_private_key);
vote_for(patty_id, witness1.vote_id, patty_private_key);
generate_blocks(db.get_dynamic_global_properties().next_maintenance_time);
generate_blocks(HARDFORK_GPOS_TIME + fc::hours(12)); //forward 1/2 sub-period so that it consider only gpos votes
// amount in vested balanced will sum up as voting power
witness1 = witness_id_type(1)(db);