Commit Graph

915 Commits

Author SHA1 Message Date
Christoph Atteneder
d498e43415
Bump version number 2019-07-26 10:41:47 +02:00
Christoph Sturm
82821f1d72 mark outdated fields as deprecated 2019-07-25 16:41:28 +02:00
Christoph Sturm
de4e1d7b58 move protobuf to proto package 2019-07-25 14:08:00 +02:00
Christoph Sturm
1c0fe2673f split pb.java file into separate files. 2019-07-25 13:40:02 +02:00
Christoph Sturm
c3d21806c4 rename Clock to ClockWatcher
* this class is not a clock but it watches the clock, detects standby
and runs periodic tasks.
* there is already a jdk method called clock
First i thought it should be called PeriodicTaskManager, now i find
ClockWatcher more fitting.
2019-07-24 16:39:03 +02:00
Christoph Sturm
a25befb742 log stacktrace to logfile when a task fails 2019-07-24 14:51:54 +02:00
Christoph Atteneder
59be5bc94e
Bump version number 2019-07-15 16:33:55 +02:00
Florian Reimair
b44cb452f9
Rename stuff 2019-07-10 16:31:58 +02:00
Florian Reimair
3fb8be3481
Rename 2019-07-08 09:33:50 +02:00
Florian Reimair
b101035d99
Sketch of businesslogic regarding EnvelopeOfEnvelopes 2019-06-24 16:55:58 +02:00
Florian Reimair
16392f5f0a
Added EnvelopeOfEnvelopes Network Message 2019-06-24 16:53:53 +02:00
Christoph Atteneder
ca24ce0217
Bump version number 2019-06-04 10:49:00 +02:00
sqrrm
b93e7bac56
Add trader chat
- Add communication messages to Trade protobuf message to be able to
save chat messages per trade
- Add Type enum and field to DisputeCommunicationMessage protobuf to
be able to dispatch Dispute and Trade chat messages properly
- Rename some function as isClient instead of isTrader to make it easier
to understand who is who when two traders are communicating with each
other
2019-06-02 15:40:50 +02:00
Christoph Atteneder
ac68da1dd3
Bump version number 2019-05-06 10:47:01 +02:00
Christoph Atteneder
8ceb2e3be2
Bump version number 2019-05-03 12:13:41 +02:00
Manfred Karrer
3b613bebce
Improve handling of filter 2019-05-02 21:48:13 -05:00
Manfred Karrer
eb1c4fd25c
Merge pull request #2737 from ManfredKarrer/use-utf8-for-getBytes
Add UTF8 for getBytes calls
2019-04-21 17:16:34 -05:00
Manfred Karrer
59f31c7c6e
Merge branch 'master' into fix-dao-full-mode-settings-issue
# Conflicts:
#	common/src/main/proto/pb.proto
#	core/src/main/java/bisq/core/user/Preferences.java
#	core/src/main/java/bisq/core/user/PreferencesPayload.java
#	desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesView.java
2019-04-19 20:32:11 -05:00
Christoph Atteneder
55d09a308b
Use different security deposit for fiat-crypto and crypto-crypto trades 2019-04-18 19:37:46 +02:00
Manfred Karrer
1008e9bc51
Add UTF8 for getBytes calls
Fixes https://github.com/bisq-network/bisq/issues/2729
2019-04-17 19:56:21 -05:00
Manfred Karrer
6cd04a0d91
Merge pull request #2621 from ManfredKarrer/ignore-dust-utxo
Ignore dust utxo
2019-04-17 18:30:50 -05:00
Manfred Karrer
6f44dc5c1c
Fix issues with DAO full mode in preferences
There was missing the block notify port as well as the options have
not been applied correctly which led to the situation that when you
run the same application in full mode and later in lite mode that
data got persisted.

Added also to the footer a note if full mode is running.
2019-04-17 18:26:33 -05:00
Manfred Karrer
ab0c81804c
Make GetBlocksRequest implement SendersNodeAddressMessage and SupportedCapabilitiesMessage
When we request at startup the blocks from a seed which has not yet
received out capabilities or node address we will not get a response.
We do not want to depend on the state in the getData domain in the
p2p network by using only a seed which has already responded but we
prefer to make sure the seednode will get all the data by our request
to be able to respond.
2019-04-16 22:52:20 -05:00
Manfred Karrer
fcbc3b659b
Ignore utxo below a user defined threshold to avoid dust attacks
Implements https://github.com/bisq-network/bisq/issues/2604
2019-04-16 20:42:13 -05:00
Manfred Karrer
9945d4a414
Add size method 2019-04-16 15:08:18 -05:00
Christoph Atteneder
bdf163ca2d
Bump version number 2019-04-16 16:03:12 +02:00
Manfred Karrer
57ae8af3d7
Add requireUpdateToNewVersion check 2019-04-14 13:52:53 -05:00
Manfred Karrer
4269607065
Merge pull request #4 from ripcurlx/bump-version-number
Bump version number
2019-04-12 17:26:40 -05:00
Christoph Atteneder
2c106c74c6
Bump version number 2019-04-12 12:09:49 +02:00
Manfred Karrer
68436f5f85
Merge branch 'master' into rc_v1.0.0
# Conflicts:
#	common/src/main/proto/pb.proto
#	core/src/main/java/bisq/core/dao/governance/blindvote/storage/BlindVotePayload.java
2019-04-10 09:39:15 -05:00
Manfred Karrer
44cf1dced7
Fix wrong order or arguments 2019-04-09 12:08:10 -05:00
Manfred Karrer
8e82fa6654
Handle dao state conflicts better
- Check if conflicting node is seed node or not. Show info in list entry
and only show resync button and red color in text if conflict is with
seed node.
- At resync move all p2p network data to a dedicated directory so they
will be reloaded from the seeds.
2019-04-08 16:39:13 -05:00
Christoph Atteneder
f9a0dd1502
Bump version number 2019-04-08 12:10:59 +02:00
Christoph Atteneder
2846b1881b
Merge pull request #2667 from ManfredKarrer/protect-against-late-blind-vote-publishing
Protect against late blind vote publishing
2019-04-08 10:43:48 +02:00
Christoph Atteneder
33a04bba57
Merge pull request #2669 from ManfredKarrer/close-printwriter-before-rename-temp-file
Close printWriter before renaming temp file
2019-04-08 10:42:37 +02:00
Manfred Karrer
38a6d58254
Add filter for min required version for DAO 2019-04-07 18:58:17 -05:00
Manfred Karrer
bd7358ffe4
Add date to BlindVote 2019-04-07 18:01:11 -05:00
Manfred Karrer
7d562013f7
Fixes https://github.com/bisq-network/bisq/issues/2660 2019-04-07 14:47:46 -05:00
Manfred Karrer
d81498dc01
Remove date and DateTolerantPayload interface from BlindVotePayload 2019-04-06 21:49:18 -05:00
Manfred Karrer
6b416ca278
Add TODO for removing the date from BlindVotePayload at mainnet launch
We don't want to break consensus and persisted data at current
dao_regtest by removing the date now. It is not used anywhere so it is
irrelevant but would break things as the hash would be different and
persisted data would not be readable anymore. So we delay that change
to the mainnet launch.
2019-04-06 19:46:58 -05:00
Manfred Karrer
a6ec41aaeb
Set dao activated by default
We still keep the activation code just in case...
We can clean it up in a later release
2019-04-04 17:06:33 -05:00
Christoph Atteneder
0ffc93a091
Bump version number 2019-04-02 17:13:04 +02:00
Christoph Atteneder
fb3c8c214e
Bump version number 2019-04-02 11:19:03 +02:00
Manfred Karrer
0e2bb14683
Break up lines 2019-03-31 17:43:14 -05:00
Manfred Karrer
73db81a34f
Add more validation
- Check max length of strings and byte arrays
- Check that tx ID has 64 chars
- Add ExtraDataMapValidator for validating extraDataMap fields
2019-03-31 15:49:37 -05:00
Manfred Karrer
d5fc7cb97e
Use burnedBsq field in Tx for burnedFee and invalidatedBsq
In case of an invalid tx we burn all available BSQ input. We only know
that at parsing time. We renamed the burntFee field to burntBsq to make
it more generic and use it for the burnt fee in case if a normal tx and
as invalidatedBsq in case of an invalid tx.
2019-03-30 19:35:12 -05:00
Manfred Karrer
ff868311bb
Merge branch 'master' into add-check-for-bsq-balance
# Conflicts:
#	desktop/src/main/java/bisq/desktop/main/dao/wallet/dashboard/BsqDashboardView.java
2019-03-26 00:40:27 -05:00
Manfred Karrer
ce1da644c2
Add IRREGULAR txType for txs which are not rule conform but not burnt
We don't want to burn BSQ in cases like that the tx was published too
late, which is a valid case if the tx does not make it in the next block.
We set such txs as IRREGULAR and allow spending of the BSQ, but there
function in the governance is invalidated.

We also add a check if the sum of all UTXO is the same as the sum of the
genesis + sum of issuance txs - burned fees.
2019-03-26 00:37:55 -05:00
Oscar Guindzberg
56d152ebee Fix typo 2019-03-25 12:06:45 -03:00
Oscar Guindzberg
2113e02c63 Fix typo 2019-03-25 12:03:59 -03:00
Manfred Karrer
61a3be354e
Remove nonBsqTxOutputMap from daoState
We can evaluate the nonBsqTxOutputs without storing it.
Storing them in the map would have required to remove them as well
once withdrawn from the wallet.
2019-03-21 23:48:19 -05:00
Manfred Karrer
7e61afcb8e
Add BONDED_ROLE_FACTOR to param to react on BSQ price changes
To avoid the need to change the required bond in the BondedRoleType
if the BSQ price changes we use the BONDED_ROLE_FACTOR param where the
factor can be changed. In the BondedRoleType we use the requiredBondUnit
which will be multiplied with the BONDED_ROLE_FACTOR value to get the
required bond amount.
2019-03-21 19:46:15 -05:00
Manfred Karrer
6d5b404876
Remove SHA3-256 hash as it turned out it is slower as SHA256
In some tests it seemed that SHA3-256 is 30% fast than SHA256 but later
with the data we used in dao testnet it was actually slower.
To avoid confusion which hash function to use and to avoid mixing them
without strong reason I prefer to remove it again.
2019-03-21 18:44:24 -05:00
Manfred Karrer
f780cf5a15
Add SHA3-256 hash function
SHA3-256 is about 30% faster than SHA256
2019-03-20 21:28:25 -05:00
Manfred Karrer
13ca802dd1
Add extraDataMap to BlindVote and Proposal
In case we need to add additional data in future we are can use that map
without breaking consensus or breaking the hash chain.
2019-03-19 22:20:13 -05:00
Manfred Karrer
3aa50a3be5
Store requiredBond and unlockTime in RoleProposal 2019-03-19 21:22:28 -05:00
Manfred Karrer
ac3374cc47
Remove requiredQuorum and requiredThreshold from EvaluatedProposal
We would break the hash chain if we would change the quorum or
threshold values in the param enum.
2019-03-19 20:39:47 -05:00
Florian Reimair
afc241c52a
Renamed hasCapabilities to isEmpty 2019-03-18 12:59:09 +01:00
Florian Reimair
ede3a3c721
Introduced Capabilities.addAll 2019-03-18 12:55:19 +01:00
Florian Reimair
7a03aba02e
Refactor Capabilities for Connection 2019-03-18 12:29:09 +01:00
Manfred Karrer
b7941c82c3
Merge branch 'master' into add-hash-of-dao-state 2019-03-16 13:04:06 -05:00
Manfred Karrer
4af74950cb
Add blind vote monitoring 2019-03-15 19:38:30 -05:00
Manfred Karrer
2109c66e51
Add num proposals
- Cleanups
- Improve logs
2019-03-15 10:18:31 -05:00
Manfred Karrer
2009c30d81
Refactor dao state monitor
- Move dao state monitor classes to other package structure
- Add support for proposal payload monitor (WIP)
- Use generics and sub classes for common functionality
2019-03-14 19:03:11 -05:00
Manfred Karrer
eb3d65d187
Add snapshot support for hashChain
- Add hashChain to snapshot
- Use TreeMap instead of Map to have deterministic order
- Use eventCoordinator to make correct order of execution transparent
- Fix missing applying of nonBsqTxOutputMap at applySnapshot
2019-03-13 22:03:14 -05:00
Manfred Karrer
bbec682d98
Add UI for Dao state monitor
Refactor dao state monitor domain.
Add support for requesting all hashed from genesis from a peer which is
in conflict (can help to find at which block the issue started).
2019-03-11 18:32:48 -05:00
Oscar Guindzberg
f42a5c2936 Fix typo 2019-03-11 16:41:30 -03:00
Manfred Karrer
9ed109330a
Fix index out of bound issues
At Capabilities I got an exception after going back from a new dev
branch to master and getting p2p network data from nodes still running
on the dev branch as that newly added capability was outside of the
existing scope.

I found another potential issue with DaoPhase.Phase and added a check
there as well.
2019-03-10 22:40:26 -05:00
Manfred Karrer
fcd7997582
Create chain of dao state hashes for monitoring consensus issues
We create a chain of hashes of the dao state starting from the genesis
block height and using the previous hash in the hash. This ensures that
the history need to be correct if a particular hash at a block height is
correct. We request from seed nodes the last 10 hashes and broadcast to
our peers our hash at each new block. We build our list in memory and
listen on the new onSnapShotApplied event to start building our chain
from the genesis height up to the last snapshot block and after that
from each parsed block.
If we detect a mismatch we store it in a collection and the UI can show
a warning to the user.
We added also the onDaoStateChanged handler to the DaoStateListener.
This event is called after all parsing is completed and listeners have
completed their work. We must not use time based delays in the listener
code otherwise we would get changed our dao state after that event.
To detect such we added a assert method to throw an exception if the
dao state gets changed after the allowDaoStateChange is set to false.
2019-03-10 22:10:12 -05:00
Manfred Karrer
51ec876edc
Add removeLinebreaks parameter to toTruncatedString 2019-03-09 09:11:51 -05:00
Manfred Karrer
40b6505fd9
Add monitoring for hash of DaoState 2019-03-08 20:23:44 -05:00
Manfred Karrer
855ca062c6
Add missing @EqualsAndHashCode to Capabilities
Peer extends Capabilities and we use a HashSet to manage persisted
peers. Without the @EqualsAndHashCode we would add endlessly peers to
the hashsets.
2019-03-07 20:41:40 -05:00
Manfred Karrer
73eea7927a
Merge pull request #2469 from freimair/refactor_capabilities
Refactor capabilities and other P2P-related stuff
2019-03-06 18:38:23 -05:00
Christoph Atteneder
75fd991b3b
Bump version number 2019-03-06 10:04:50 +01:00
Florian Reimair
00872427de
Get rid of Capability ordinals
github.com/AlDanial/cloc v 1.80  T=0.19 s (5.3 files/s, 5.3 lines/s)
-------------------------------------------------------------------------------
                             files          blank        comment           code
-------------------------------------------------------------------------------
 same                            0              0            913           3405
 modified                       28              0              6            145
 added                           1             18             36             58
 removed                         0              9              3            103
-------------------------------------------------------------------------------
2019-03-06 09:29:26 +01:00
Manfred Karrer
b711f571a4
Cleanup some log.debug calls 2019-03-05 11:24:07 -05:00
Manfred Karrer
1d0fdf4c55
Cleanup some log.trace calls 2019-03-05 11:11:04 -05:00
Manfred Karrer
7fd2030003
Remove Log.traceCall methods
Florian reported that they consume quite a bit of performance.As
they have not been used for development testing since long we should
better remove those.
2019-03-05 10:32:39 -05:00
Manfred Karrer
b8f8fbff20
Use percentage based value for security deposits
Use percentage based value of trade amount for buyer and seller
security deposit.
To ensure that the BTC value is not getting too low, we apply a min.
value for both.
2019-03-04 23:35:35 -05:00
Manfred Karrer
64f085ce48
Merge branch 'allow-spending-unconfirmed-bsq-utxs'
# Conflicts:
#	core/src/main/java/bisq/core/trade/protocol/tasks/taker/CreateTakerFeeTx.java
2019-03-04 11:20:55 -05:00
Manfred Karrer
44f57984f6
Merge branch 'master' into add-live-trading 2019-03-03 19:24:10 -05:00
Ben Kaufman
26a710d0c2 Fix system tray visibility for dark mode Mac 2019-03-03 22:37:05 +02:00
Manfred Karrer
992480d3a7
Refactoring: Renaming 2019-03-03 02:28:37 -05:00
Manfred Karrer
6c11fc18c7
Add altcoin payment method for live trading
- Add LiveAsset account, payment method, AccountPayload
- Extract super classes for normal CryptoCurrenyAccount and payload and
LiveAssetAccount and payload
- Add isAsset method
- Add button for creating a live asset account

As it is a bit tricky to use the AccountForm for both methods and add a
checkbox there so defined which payment method to use I added a button
to add an AccountForm with the LiveAssets passed. This is just
temporary to be able to test a bit more and see if there are any
critical issues. We should unify that form but that might require a bit
of refactoring of the CryptoCurrencyForm.
2019-03-03 01:12:54 -05:00
Manfred Karrer
03d0a22580
Allow spending of unconfirmed BSQ change outputs
When creating a BSQ transaction (actually at commit time as we can create a tx and then
cancel it in the confirmation popup) we store the change output (only that not the other
possible BSQ output) in a persisted list. The BsqCoinSelector will take that list to
allow spending those coins. We use the txType to find the index of the cahnge output.
We only have one change output in the transactions created in Bisq. Multiple change
outputs would be valid but our goal is only increased usability in the Bisq app and it is
not related to validation rules.

We update out list at each new block confirmation.

With that approach we avoid too much dependencies to the BitcoinJ side.

- Add UnconfirmedBsqChangeOutputListService and persisted UnconfirmedBsqChangeOutputList
for storing unconfirmed outputs
- Add lookup for unconfirmed BSQ change outputs at BsqCoinSelector and allow spending if
found
- Pass TxType for walletsManager.publishAndCommitBsqTx calls
- Add TxType to bsqWalletService.commitTx
- Refactor getPreparedSendTx methods for BSQ and BTC sending to one common method with a
coinselector parameter.
- Add getChangeAddress method to BsqWalletService to make change outputs more explicit
- Add unconfirmedChangeBalance to onUpdateBalances handlers
- Rename availableBalance to availableConfirmedBalance in onUpdateBalances
- Unify onUpdateBalances parameter names
2019-02-28 23:22:43 -05:00
Christoph Atteneder
d31173bc4f
Update version number for v0.9.4 2019-02-21 22:34:36 +01:00
Devin Bileck
082ef6684e
Download rpm package on RedHat-based Linux
Currently, the download update task will download the deb package for
any Linux distribution. Not only is this incorrect, but now that we are
able to provide an rpm package (see #2200), the download update task
needs to be able to differentiate Linux distributions and provide
the appropriate package.

The download update task will now differentiate between Debian and
RedHat based distributions (the two distributions for which we have an
install package) and download the appropriate package.

In addition, the isSupportedOS method was changed to exclusively check
for Debian and RedHat based distributions, as opposed to just Linux in
general. This means that any other distribution will encounter the
following error, which seems appropriate:

> Unable to determine the correct installer. Please download and verify
manually at https://bisq.network/downloads
2019-02-17 12:59:20 -08:00
Manfred Karrer
11bc11fd24
Remove code for Venmo, Cashapp and OKPay
- We had an automate remove accounts for those payment methods for long
time, so we can assume that no traders have any of those accounts still
in their persisted user objects and it is safe to completely remove them.
Only part where we cannot remove it is the PB definitions (actually I
think we could remove those as well, but not 100% sure and it seems to
be more safe to mark those as deprecated and leave the entries).
2019-02-13 21:34:51 -05:00
Manfred Karrer
a110d7d82d
Merge branch 'master' into dao-fix-majorityvote-issue
# Conflicts:
#	desktop/src/main/java/bisq/desktop/main/dao/governance/make/MakeProposalView.java
2019-02-06 11:37:00 +01:00
Manfred Karrer
dcf40bcfb5
Refactor: Add handler, make onMissedSecondTick default 2019-02-05 20:43:46 +01:00
Manfred Karrer
26ffe14778
Cleanup 2019-02-05 20:14:14 +01:00
Manfred Karrer
e2fac0c759
Only use blind vote payloads which are in majority list 2019-02-05 14:25:48 +01:00
Manfred Karrer
3f4e641f19
Merge pull request #2355 from ManfredKarrer/dao-add-filter-flag-for-disable-dao
Dao add filter flag for disable dao
2019-02-04 00:17:08 +01:00
Manfred Karrer
69a9f6f311
Merge branch 'master' into dao-add-params 2019-02-03 21:13:48 +01:00
Manfred Karrer
002f225bdd
Merge branch 'master' into dao-add-filter-flag-for-disable-dao 2019-02-03 21:13:06 +01:00
Manfred Karrer
42e37d7a07
Cleanup 2019-02-03 21:03:35 +01:00
sqrrm
5f0e64f173
Update common/src/test/java/bisq/common/util/PermutationTest.java
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
2019-02-03 20:52:18 +01:00
sqrrm
ada67fa8e7
Update common/src/test/java/bisq/common/util/PermutationTest.java
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
2019-02-03 20:52:09 +01:00
sqrrm
46dfaf280f
Update common/src/test/java/bisq/common/util/PermutationTest.java
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
2019-02-03 20:52:00 +01:00
sqrrm
aff5a551bc
Update common/src/test/java/bisq/common/util/PermutationTest.java
Co-Authored-By: ManfredKarrer <mk@nucleo.io>
2019-02-03 20:51:54 +01:00