Commit graph

320 commits

Author SHA1 Message Date
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
c6c26a7d9f Merge branch 'develop' into feature/SONs-base 2020-09-22 18:23:36 +02: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
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
6797cdc3d3
[SON-363] - Remove son deletion (#359)
* [SON-363] - Remove son deletion

* Fix the tests
2020-05-04 15:37:41 +10: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
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
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
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
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
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
e170676ff9
[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>
2020-03-27 14:40:37 +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
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
pbattu123
3ffcd4fdd0 Allow voting for son, only if GPOS vesting balance available 2020-03-16 18:24:28 -03:00
satyakoneru
2e8c074655
SON202 - Maintenance improvements (#303) 2020-03-06 22:49:26 +11:00
pbattu123
da4954c686 resolved compilation issues and other conflicts 2020-03-05 16:20:24 -04:00
pbattu123
11718af9b8 Merge develop into SONS 2020-03-03 16:42:51 -04:00
obucinac
13d2b27ed9
[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>
2020-02-23 22:03:43 +05:30
gladcow
a9cfadc500
[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
2020-02-23 22:01:51 +05:30
pbattu123
0e4434a0dc
Merge branch 'develop' into feature/GRPH-155 2020-02-13 08:57:28 -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
11919cdbd9
brought updates from mainnet branch (#285) 2020-02-12 23:38:23 +05:30
satyakoneru
daf7ac5da8
SON214 - Request maintenance wallet commands (#280) 2020-02-07 11:19:16 +05:30
obucinac
a688bb93ed
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>
2020-02-04 19:31:45 +01:00
satyakoneru
21c8337753
SON165 - Keys mapping missing from wallet data (#274) 2020-01-29 17:50:36 +05:30
Srdjan Obucina
7139b4a4e3 Quickfix for update_sidechain_address and delete_sidechain_address cli commands 2020-01-23 13:15:55 +01:00
gladcow
11339c1734 [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
2020-01-18 02:00:45 +05:30
obucinac
47eafcf6c0 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
2020-01-13 19:28:43 +05:30
obucinac
31ec55514b
Extend SON objects to contain sidechain public keys (#254) 2019-12-23 19:20:26 +01:00
pbattu123
054f06adc7 Beatrice hot fix(sync issue fix) 2019-12-20 21:55:45 -04:00
obucinac
6d5b86a8e5
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
2019-12-18 19:30:38 +01:00
Sandip Patel
d3ecbba3d7 avoid directly overwriting wallet file 2019-12-11 17:02:26 +05:30
pbattu123
91c65b9845
Merge pull request #234 from peerplays-network/BLOCKBACK-186
BLOCKBACK-186 fix: GPOS
2019-12-07 13:51:58 -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
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
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
45aac6dc61 fixed cli_wallet log issue 2019-12-03 14:20:15 +05:30
Peter Conrad
25458c294d Undo superfluous change 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
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
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
9b7776e301
Merge pull request #220 from peerplays-network/BLOCKBACK-177
issue with withdrawl
2019-11-25 10:51:06 -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