Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add protection tools #2787

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c2757db
Merge branch 'fix-trade-peers-account-age' into delay-payout-if-fait-…
ManfredKarrer Apr 21, 2019
29ff2fc
Fix wrong display of ages with 1 at the end (e.g. 31 days)
ManfredKarrer Apr 22, 2019
a314416
Add min required buyers account age
ManfredKarrer Apr 22, 2019
72be262
Add warning popup to offer book
ManfredKarrer Apr 22, 2019
e74aad7
Remove rounded fiat amounts popup
ManfredKarrer Apr 22, 2019
4cae398
Add popup to offer maker
ManfredKarrer Apr 22, 2019
79ed168
Refactor
ManfredKarrer Apr 22, 2019
a1e58a4
Improve text
ManfredKarrer Apr 22, 2019
b46e98f
Handle trade period (WIP)
ManfredKarrer Apr 22, 2019
9e6989a
Add more keys
ManfredKarrer Apr 23, 2019
8eab3f3
Refactor: Move accountAgeWitness classes to new package
ManfredKarrer Apr 23, 2019
ca373ff
Refactor: Cleanup, no functionality change
ManfredKarrer Apr 23, 2019
b20a60e
Add SignedWitness domain (WIP)
ManfredKarrer Apr 23, 2019
0968861
Merge branch 'master' into delay-payout-if-fait-buyer-has-new-account
ManfredKarrer Apr 27, 2019
99c271a
Update strings
ManfredKarrer Apr 27, 2019
27d7656
Merge branch 'master' into sign-account-usage
ManfredKarrer Apr 27, 2019
ce99f56
Fix wrong imports
ManfredKarrer Apr 27, 2019
a28c728
Refactoring: Move classed to new package
ManfredKarrer Apr 27, 2019
e6d4709
Add Account score domain (WIP)
ManfredKarrer Apr 27, 2019
9c02ef8
Refactor: Move methods to domain (WIP)
ManfredKarrer Apr 27, 2019
ca6843c
Move account age related code to AccountCreationAgeService
ManfredKarrer Apr 28, 2019
eb1899f
Fix delay function, refactorings
ManfredKarrer Apr 28, 2019
765c708
Rename method
ManfredKarrer Apr 28, 2019
8d6267d
Add methods for getting the AccountScoreCategory
ManfredKarrer Apr 28, 2019
9a54dc3
Merge branch 'sign-account-usage' into add-protection-tools
ManfredKarrer Apr 28, 2019
cbdb472
Add arguments
ManfredKarrer Apr 28, 2019
f172fa6
Apply organize imports
ManfredKarrer Apr 28, 2019
e2b322f
Rename package
ManfredKarrer Apr 28, 2019
2c7b613
Handle AccountScoreCategory methods depending on signed witness state
ManfredKarrer Apr 28, 2019
60fcde6
Add verify check
ManfredKarrer Apr 28, 2019
26fb30c
Apply new delay function, add ScoreInfo class and methods
ManfredKarrer Apr 29, 2019
f9a756b
Add UI for score info
ManfredKarrer Apr 29, 2019
e6f7345
Fix deposit function
ManfredKarrer Apr 29, 2019
43b6238
Adjust create offer popup with new scoreInfo data
ManfredKarrer Apr 29, 2019
3fd133f
Add popup for taker
ManfredKarrer Apr 29, 2019
12a3d89
Change buyer sec. deposit
ManfredKarrer Apr 30, 2019
248df21
Change PERM_DELAY to 15 days, adjust tests
ManfredKarrer Apr 30, 2019
a2454ac
Add requireAuthorizedTaker to offer and preferences
ManfredKarrer Apr 30, 2019
8f519f3
Add check and popup for offers requiring authorized takers
ManfredKarrer Apr 30, 2019
c81142c
Adjust column width
ManfredKarrer Apr 30, 2019
74344a8
Show restrictions based on payment method
ManfredKarrer Apr 30, 2019
961870a
Improve restrictions settings in create offer
ripcurlx Apr 30, 2019
649c28a
Merge pull request #8 from ripcurlx/create-offer-improvements
ManfredKarrer Apr 30, 2019
a989438
Add comment
ManfredKarrer Apr 30, 2019
dbc1594
Add trade amount to SignedWitness
ManfredKarrer Apr 30, 2019
61d4d26
Rename put method to putIfAbsent to reflect behaviour better
ManfredKarrer Apr 30, 2019
e52707f
Rename put method to putIfAbsent to reflect behaviour better
ManfredKarrer Apr 30, 2019
c960520
Add more comments
ManfredKarrer Apr 30, 2019
a2d2fea
Add missing parameter
ripcurlx May 1, 2019
4ac64a1
Change icons
ripcurlx May 1, 2019
dedfd2e
Extend trade protocol to support payout delay
ManfredKarrer May 1, 2019
6cbc311
Add missing class
ManfredKarrer May 1, 2019
b176bd6
Fix fiatReceivedDate handling
ManfredKarrer May 2, 2019
997c032
Rename PeerInfoWithTagEditor to PeerInfoPopup
ManfredKarrer May 2, 2019
41b3f04
Handle delayed payout in trade protocol (WIP)
ManfredKarrer May 2, 2019
4494d07
Add verify task, improve UI
ManfredKarrer May 2, 2019
3c24644
Handle payout delay in trade process (WIP)
ManfredKarrer Jun 13, 2019
969c448
Merge pull request #9 from ripcurlx/change-icons
ManfredKarrer May 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion common/src/main/java/bisq/common/app/Capability.java
Expand Up @@ -32,5 +32,6 @@ public enum Capability {
BLIND_VOTE,
ACK_MSG,
BSQ_BLOCK,
DAO_STATE
DAO_STATE,
SIGNED_ACCOUNT_AGE_WITNESS
}
31 changes: 31 additions & 0 deletions common/src/main/proto/pb.proto
Expand Up @@ -66,6 +66,8 @@ message NetworkEnvelope {
NewBlindVoteStateHashMessage new_blind_vote_state_hash_message = 40;
GetBlindVoteStateHashesRequest get_blind_vote_state_hashes_request = 41;
GetBlindVoteStateHashesResponse get_blind_vote_state_hashes_response = 42;

FiatReceivedMessage fiat_received_message = 43; // added at v 1.1 as part of trade protocol changes for payout delay
}
}

Expand Down Expand Up @@ -261,6 +263,13 @@ message PayoutTxPublishedMessage {
string uid = 4;
}

message FiatReceivedMessage {
int64 fiat_received_date = 1;
string trade_id = 2;
NodeAddress sender_node_address = 3;
string uid = 4;
}

// dispute

message OpenNewDisputeMessage {
Expand Down Expand Up @@ -432,6 +441,7 @@ message PersistableNetworkPayload {
TradeStatistics2 trade_statistics2 = 2;
ProposalPayload proposal_payload = 3;
BlindVotePayload blind_vote_payload = 4;
SignedWitness signed_witness = 5;
}
}

Expand Down Expand Up @@ -633,6 +643,16 @@ message AccountAgeWitness {
int64 date = 2;
}

message SignedWitness {
bool signed_by_arbitrator = 1;
bytes witness_hash = 2;
bytes signature = 3;
bytes signer_pub_key = 4;
bytes witness_owner_pub_key = 5;
int64 date = 6;
int64 trade_amount = 7;
}

///////////////////////////////////////////////////////////////////////////////////////////
// Dispute payload
///////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1014,6 +1034,7 @@ message PersistableEnvelope {
MyReputationList my_reputation_list = 25;
MyProofOfBurnList my_proof_of_burn_list = 26;
UnconfirmedBsqChangeOutputList unconfirmed_bsq_change_output_list = 27;
SignedWitnessStore signed_witness_store = 28;
}
}

Expand Down Expand Up @@ -1054,6 +1075,10 @@ message AccountAgeWitnessStore {
repeated AccountAgeWitness items = 1;
}

message SignedWitnessStore {
repeated SignedWitness items = 1;
}

// We use a list not a hash map to save disc space. The hash can be calculated from the payload anyway
message TradeStatistics2Store {
repeated TradeStatistics2 items = 1;
Expand Down Expand Up @@ -1178,6 +1203,7 @@ message Trade {
BUYER_RECEIVED_PAYOUT_TX_PUBLISHED_MSG = 28;
BUYER_SAW_PAYOUT_TX_IN_NETWORK = 29;
WITHDRAW_COMPLETED = 30;
BUYER_RECEIVED_SELLERS_FIAT_PAYMENT_RECEIPT_CONFIRMATION = 31; // Added with 1.1.0 and cannot be put in logical place due PB restrictions
}

enum Phase {
Expand Down Expand Up @@ -1205,6 +1231,9 @@ message Trade {
FIRST_HALF = 1;
SECOND_HALF = 2;
TRADE_PERIOD_OVER = 3;
WAITING_FOR_BLOCKCHAIN_CONFIRMATION = 4; // Added with 1.1.0 so it is not in logical order but as we cannot change PB definition we need to keep it that way.
PAYOUT_DELAY = 5;
RELEASE_BTC = 6;
}

Offer offer = 1;
Expand Down Expand Up @@ -1235,6 +1264,7 @@ message Trade {
PubKeyRing arbitrator_pub_key_ring = 26;
PubKeyRing mediator_pub_key_ring = 27;
string counter_currency_tx_id = 28;
int64 fiat_received_date = 29;
}

message BuyerAsMakerTrade {
Expand Down Expand Up @@ -1356,6 +1386,7 @@ message PreferencesPayload {
int32 ignore_dust_threshold = 51;
double buyer_security_deposit_as_percent_for_crypto = 52;
int32 block_notify_port = 53;
bool require_authorized_taker = 54;
}

///////////////////////////////////////////////////////////////////////////////////////////
Expand Down