Commit graph

2926 commits

Author SHA1 Message Date
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
obucina
44db4f5c9b
[SON-346] Sidechain transaction marked as complete even though current_weight < threshold, Fixed (#342) 2020-04-08 22:40:20 +02:00
pbattu123
dd88b8f1ff update HF check 2020-04-08 09:05:39 -03:00
obucina
4f72269cf6
[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
2020-04-08 13:51:16 +02: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
gladcow
c345369c67
[SON-341, SON-342] Fix issue with deposits number (#339)
Co-authored-by: gladcow <s.gladkov@pbsa.info>
2020-04-06 18:26:41 +02:00
obucina
bd1bd842ce
[SON-325] Added check for approving sidechain_transaction_create_operation (#337) 2020-04-06 18:09:01 +02:00
pbattu123
29f41ec7da nh5050:winner ticket id changes 2020-04-06 12:30:55 -03:00
obucina
be4b55c4a0
[SON-320] Added check for approving son_wallet_update_operation (#336) 2020-04-06 11:31:58 +02:00
obucina
17bf51e963
[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
2020-04-04 20:02:27 +02:00
sierra19XX
52d7ebc200
[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>
2020-04-04 05:47:50 +02:00
sierra19XX
1542a9a8e4
[SON-339] - SON Schedule crash (#334)
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-04-04 05:36:28 +02:00
gladcow
e1a487c87b
[SON-305, SON-308, SON-310] Use BTC asset in bitcoin deposits and withdraws (#332) 2020-04-03 04:59:24 +02:00
Srdjan Obucina
b6dc7dcc13 Merge branch 'feature/SONs-base' of https://github.com/peerplays-network/peerplays into feature/SONs-base 2020-04-02 17:54:30 +02:00
Srdjan Obucina
efa7436ded Hotfix - add initialization values to extension params, remove trailing spaces 2020-04-02 17:54:13 +02:00
sierra19XX
5bf245ee6c
SON-297_SON-336 - SON vesting functionality broken after graphene merge (#331)
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-04-02 21:22:05 +11:00
gladcow
8aaa3791bf
[SON-307] Create PBTC asset (#326) 2020-04-01 18:57:50 +02:00
sierra19XX
27f401d24e
[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>
2020-04-01 23:05:22 +11:00
Srdjan Obucina
d71061565a [SON-329] Hotfix - Enable test test_update_dividend_interval 2020-03-31 14:16:18 +02:00
pbattu123
210e72f843
update son-account parameters (#328) 2020-03-30 22:49:03 +02:00
obucina
f3a0827d5d
[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
2020-03-30 22:48:39 +02:00
Srdjan Obucina
bccba7697e Quickfix - change GPOS and SON hardfork times 2020-03-30 16:59:10 +02:00
Srdjan Obucina
dc5a8da13d Hotfix - Fix build error 2020-03-29 23:23:57 +02:00
gladcow
1e76a23133
[SON-311] Add try_create_son call without explicit deposit params (#324)
Co-authored-by: gladcow <s.gladkov@pbsa.info>
2020-03-29 23:19:45 +02:00
sierra19XX
26f6252716
[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>
2020-03-27 22:13:27 +01:00
obucina
770ccdb77a
[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
2020-03-27 21:15:46 +01:00