Commit graph

261 commits

Author SHA1 Message Date
Srdjan Obucina
bb6aac3f23 Deposit address creation, import deposit/withdraw addresses, some code cleanup 2020-04-18 05:59:05 +02:00
Srdjan Obucina
55949fbf2a Merge branch 'feature/SONs-base' of https://github.com/peerplays-network/peerplays into SON-BTCPxPlex-Tryouts 2020-04-17 21:42:05 +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
satyakoneru
6be014587f Add proper checks for withdraw fee 2020-04-17 14:15:52 +00:00
satyakoneru
9d912ba0f0 Move util functions to Utils file 2020-04-17 13:31:35 +00:00
satyakoneru
b81088f192 Integration of deposit and rest of weighted wallets, withdrawal fee fix, whole code refactoring 2020-04-17 12:10:48 +00:00
satyakoneru
b5a3ca8040 CLANG code format 2020-04-17 04:59:11 +00:00
Srdjan Obucina
2739b56b94 Refactor sidechain address mapping 2020-04-17 02:47:32 +02:00
Srdjan Obucina
4d7454a98a Merge branch 'feature/SONs-base' into SON-BTCPxPlex-Tryouts 2020-04-17 01:50:53 +02:00
gladcow
7bc2511418 fix error in redeem_script 2020-04-16 18:27:23 +03:00
gladcow
c5c6dd8721 simplify redeem script 2020-04-16 17:49:42 +03:00
gladcow
c67cc5b673 btc_one_or_weighted_multisig_address implementation 2020-04-16 17:19:55 +03:00
gladcow
b90a0c36e1 move network_type enum to the base class 2020-04-16 16:48:14 +03:00
satyakoneru
b31f380135 1 or m-of-n deposit address support 2020-04-16 12:10:02 +00:00
satyakoneru
a60dc96f88 End to End test weighted multi sig 2020-04-16 06:18:16 +00:00
gladcow
44abebab97 fix the issues with tx signing 2020-04-16 01:23:14 +03:00
satyakoneru
93bc6f9823 Fix for bad-txns-nonstandard-inputs 2020-04-15 13:37:19 +00:00
gladcow
dd9e350f9f btc_weighted_multisig_address implementation 2020-04-15 12:54:23 +03:00
gladcow
6e3a0e962b witness script for weighted wallet 2020-04-15 10:24:12 +03:00
gladcow
9842a11846 extend script_builder 2020-04-15 10:24:12 +03:00
satyakoneru
30717b73ae Fix for son deletion in the middle 2020-04-15 04:56:46 +00:00
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
satyakoneru
7112292832 Debug logs and additional tests 2020-04-14 20:18:20 +00:00
satyakoneru
4c3da2015a Add send_transaction_standalone function 2020-04-14 17:49:56 +00:00
satyakoneru
73e0673199 Add signing and verification tests and sign_transaction_standalone 2020-04-14 16:41:43 +00:00
satyakoneru
458dfe5a29 tx deserialization fix 2020-04-14 13:45:53 +00:00
satyakoneru
b153513863 Add tx creation, signing and tests 2020-04-14 13:06:13 +00:00
satyakoneru
c4a48f1317 Bring in the bitcoin utils code into plugin 2020-04-13 13:04:43 +00: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
obucina
bd1bd842ce
[SON-325] Added check for approving sidechain_transaction_create_operation (#337) 2020-04-06 18:09:01 +02: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
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
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
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
obucina
13bc59aee9
Parallelizing sidechain transaction signing (#319) 2020-03-27 19:00:32 +01:00
obucina
54390346c1
[SON-271] Merge recent develop branch changes(both GPOS and graphene updates) into SONs branch (#322) 2020-03-27 18:46:30 +01:00
obucina
0f97241f1b
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
2020-03-25 11:44:22 +01:00
sierra19XX
964aed0bdf
[SON-122] - SON Statistics improvements and consensus account creation (#318)
Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
2020-03-25 20:21:09 +11:00
obucina
19a34e9102
Revert "Merge develop branch changes(GPOS+graphene updates) into SONs branch" 2020-03-21 09:47:46 +01:00
pbattu123
275315ee3e gpos, graphene updates 2020-03-19 00:54:15 -03:00
obucina
ff7e1baaf1
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
2020-03-14 16:14:39 +05:30
sierra19XX
f1e5171be0
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>
2020-03-11 15:01:20 +05:30
pbattu123
11718af9b8 Merge develop into SONS 2020-03-03 16:42:51 -04:00
obucinac
d6e6bed907
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
2020-03-02 15:24:24 +02:00
satyakoneru
abeae4e34d
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
2020-02-28 02:21:04 +05:30
satyakoneru
477aa0332f
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
2020-02-28 01:06:20 +11:00
obucinac
47c98c203a
[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>
2020-02-24 15:00:59 +02:00