Commit Graph

1080 Commits

Author SHA1 Message Date
chimp1984
2f291a6acb
Cleanup Filter value object. Remove nullables from old versions. Keep signatureAsBase64 nullable as it is set null at creation time and set later after signing. We use filter protobuf data as input for signature so we have to set signature to null and apply the signature afterwards. To keep object immutable we clone it with static clone method. Similar we handle signature verification. We clone the filter with a null value for the signature and do the validation with that cloned object.
Use now the complete object data for signature creation. We use the protobuf data for creating the signature with DER encoding. We restict ourself more regarding backward compatibility but I think it is not a big problem.
If a new field is added to Filter and deployed the maintainer needs to publishes a new filter object. By using the new version he cannot remove the old filter from the network as the protobuf data is different and sig verification on the P2P datastorage level will fail. This is intended to keep the old filter alive for some time to support not updated users. We do not remove invalid filters anymore from our local storage to enable seed nodes to support also old filter objects.
For not updated users the new filter will fail at sig verification because the protobuf data is different. So they ignore the new filter and still use the old filter. For updated users the old filter will fail and the new filter is accepted. As it has a newer date it would also replace the old filter anyway. If the maintainer wants to delete the old filter from the network he can use the old app version and remove the filter. It is recommended to keep a copy of the data directory before the update so that the removal of the older filter is possible.

Refacorings:
- Rename isPeersPaymentAccountDataAreBanned to arePeersPaymentAccountDataBanned
- Rename isSignerPubKeyBanned to isWitnessSignerPubKeyBanned
2020-08-27 21:23:02 -05:00
ghubstan
c4023869bf
Remove duplicate CompositeOptionSet class
This commit changes the access modifier on
bisq.common.config.CompositeOptionSet to make
it visible to bisq.apitest.config.ApiTestConfig,
and the duplicate bisq.apitest.config.ApiTestConfig
was deleted from 'apitest'.
2020-08-24 15:29:32 -03:00
Christoph Atteneder
7475f17207
Bump version number for v1.3.7 2020-07-30 10:19:34 +02:00
Christoph Atteneder
7613912c75
Bump version number for v1.3.6 2020-07-04 21:02:29 +02:00
Christoph Atteneder
cfc3252f7b
Merge pull request #4347 from sqrrm/deposit-improvements
Deposit improvements
2020-07-03 21:20:27 +02:00
sqrrm
fabd592938
Merge remote-tracking branch 'origin/master' into HEAD 2020-07-03 16:58:13 +02:00
sqrrm
3630abdeb8
Improve MovingAverage
Don't include outliers (20% deviation from moving average) in moving
average calculation. It's quite likely that low liquidity markets or
markets with large spreads can't calculate deposit suggestion and will
then suggest deposit from preferences.

Added test for moving average class
2020-07-02 23:03:26 +02:00
sqrrm
190867e383
Suggest security deposit depending on previous volatility 2020-06-30 14:45:51 +02:00
Christoph Atteneder
92ee247fa7
Bump version number for v1.3.5 release 2020-06-06 08:44:41 +02:00
sqrrm
ca9665fa3c
Sign unsigned keys
Legacy arbitrator can sign unsigned signed witness signer pubkeys
To sign, from legacy arbitrator support, ctrl+O
2020-06-03 15:44:04 +02:00
sqrrm
7bd5969dcf
Refactor accountagewitnessservice log helpers
Better filter for root signedwitnesses

Add debug keyboard shortcuts:
- ctrl+shift+L -> logSignedWitnesses
- ctrl+shift+S -> logSigners
2020-05-31 15:08:41 +02:00
sqrrm
8bf0f3350c
Test dummy account age witness signing
Add orphaned witness log
2020-05-31 15:08:41 +02:00
Christoph Atteneder
23432308a2
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.3.4
# Conflicts:
#	build.gradle
#	desktop/package/linux/Dockerfile
#	desktop/package/linux/package.sh
#	desktop/package/linux/release.sh
#	desktop/package/macosx/create_app.sh
#	desktop/package/macosx/finalize.sh
#	desktop/package/macosx/insert_snapshot_version.sh
#	desktop/package/windows/package.bat
#	desktop/package/windows/release.bat
#	p2p/src/main/java/bisq/network/p2p/storage/P2PDataStorage.java
#	p2p/src/main/resources/AccountAgeWitnessStore_BTC_MAINNET
#	p2p/src/main/resources/DaoStateStore_BTC_MAINNET
#	p2p/src/main/resources/SignedWitnessStore_BTC_MAINNET
#	p2p/src/main/resources/TradeStatistics2Store_BTC_MAINNET
#	relay/src/main/resources/version.txt
2020-04-30 16:36:51 +02:00
Christoph Atteneder
64f55cb777
Bump version number for v1.3.4 2020-04-30 10:19:27 +02:00
Chris Beams
4277e62135
Merge pull request #4199 from cbeams/refactor-rpc-server
Refactor rpc server implementation
2020-04-29 16:23:42 +02:00
Chris Beams
e03c46106b
Merge pull request #4189 from ghubstan/simple-rpc-auth
Implement simple password-based gRPC authentication
2020-04-29 16:17:04 +02:00
Christoph Atteneder
df56aaddab
Bump version number for v1.3.3 2020-04-29 16:08:54 +02:00
sqrrm
96575dcad7
Test permutations level by level 2020-04-29 16:06:39 +02:00
chimp1984
f7dfef253a
Add resync from resources button
We add a second button (displayed as first) to the preferences UI for
resync from latest resources. We add a warning to the resync from
genesis as it takes very long time and causes heavy network load for
seeds.
The resync button at the stateMonitor does now a resync from resources,
not from genesis.
We add handling of the UnconfirmedBsqChangeOutputList file as well.
In Filemanager we add a check if file exists.
2020-04-29 16:06:27 +02:00
chimp1984
bc7f570a18
Remove dev logs 2020-04-29 16:06:19 +02:00
chimp1984
5c5051435c
Add optimized permutation algo
WIP, needs more tests, comments, clean up....
2020-04-29 16:06:08 +02:00
Christoph Atteneder
5fd05cf660
Merge pull request #4206 from sqrrm/permutation-fix
Permutation fix
2020-04-29 15:56:45 +02:00
sqrrm
92cd7ec5a6
Test permutations level by level 2020-04-29 01:00:53 +02:00
chimp1984
77015fea17
Add resync from resources button
We add a second button (displayed as first) to the preferences UI for
resync from latest resources. We add a warning to the resync from
genesis as it takes very long time and causes heavy network load for
seeds.
The resync button at the stateMonitor does now a resync from resources,
not from genesis.
We add handling of the UnconfirmedBsqChangeOutputList file as well.
In Filemanager we add a check if file exists.
2020-04-28 15:18:11 -05:00
chimp1984
77bd421a00
Remove dev logs 2020-04-28 13:25:56 -05:00
Christoph Atteneder
91ce44ad96
Merge pull request #4102 from stejbac/tidy-persistable-envelope-inheritance
Tidy PersistableEnvelope inheritance
2020-04-28 16:22:41 +02:00
chimp1984
54e280c78d
Add optimized permutation algo
WIP, needs more tests, comments, clean up....
2020-04-28 00:40:41 -05:00
Chris Beams
3badf299e3
Add 'apiPort' configuration option 2020-04-27 19:49:10 +02:00
Chris Beams
e84123c20a
Refactor auth infrastructure naming 2020-04-25 09:52:50 +02:00
Chris Beams
1a133f4b67
Use a single auth token vs username:password
There is actually no use case for both username and password forming the
authentication token. This change simplifies the arrangement such that a
single token is passed.

--rpcUser and --rpcPassword are no longer used and are replaced by
--apiToken on both cli and daemon sides.
2020-04-23 11:32:19 +02:00
ghubstan
fe9e57babb
Implement simple cleartext gRPC authentication
* Renamed CliCommand to RpcCommand, differentiating it from cmd
   string token(s)

 * Added new CliConfig, based on :common Config

 * Injected Config into CoreApi to make bisq.properties and cmd line
   args available to server

 * Added cleartext username:password BisqCallCredentials to :cli, and
   an AuthenticationInterceptor to :core (server)

 * Moved :daemon resources folder to expected location under src/main

 * Duplicated CompositeOptionSet, ConfigException and BisqException
   in :cli because they are not visible from :common.  (TODO refactor?)
   CompositeOptionSet will be used to let command line parameters
   override params set in config file.

 * Removed outdated references to :cli in a couple of comments in
   :common Config

 * gRPC parameters & command names are lowercase to mimic bitcoind/rpc

TBD

 * Decide what rpc auth param names to use, to differentiate them from
   bitcoind rpc user/passord param names
2020-04-22 18:16:01 -03:00
sqrrm
1a1f71a0a7
Change command line argument default 2020-04-13 11:38:30 +02:00
sqrrm
6fc087c72c
Add option to allow faulty delay payout tx
Add more logging during unfail process
2020-04-13 11:38:15 +02:00
Christoph Atteneder
782921ec55
Bump version number for v1.3.2 2020-04-10 20:02:39 +02:00
Christoph Atteneder
aeda234ef1
Merge pull request #4154 from freimair/prevent_misuse_of_dev_cmdline_option
Limit abuse of `--useLocalhostForP2P` option
2020-04-10 12:08:32 +02:00
Florian Reimair
609b8b066d
Limit abuse of useLocalhostForP2P option
Until now, the --useLocalhostForP2P option could be used even for
BTC_MAINNET. That is bad and caused mediation cases.
2020-04-09 18:05:51 +02:00
Christoph Atteneder
4b826eb2a9
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.3.1
# Conflicts:
#	build.gradle
#	desktop/package/linux/Dockerfile
#	desktop/package/linux/package.sh
#	desktop/package/linux/release.sh
#	desktop/package/macosx/create_app.sh
#	desktop/package/macosx/finalize.sh
#	desktop/package/macosx/insert_snapshot_version.sh
#	desktop/package/windows/package.bat
#	desktop/package/windows/release.bat
#	relay/src/main/resources/version.txt
2020-04-08 23:03:19 +02:00
chimp1984
b145616038
Allow daoActivated to be set to false for non mainnet networks 2020-04-08 21:52:18 +02:00
chimp1984
86d9e8c89e
Allow daoActivated to be set to false for non mainnet networks 2020-04-08 13:28:44 -05:00
Christoph Atteneder
51ffd9d95c
Bump version number for v1.3.1 2020-04-08 20:04:13 +02:00
Christoph Atteneder
bb75f59b86
Bump version number for v1.3.0 2020-04-07 19:38:16 +02:00
Steven Barclay
594b42a865
Delete PersistableHashMap & simplify PersistableList
Remove unused functionality to pass a custom 'toProto' function via a
constructor or setter, as it was unused and all subclasses override the
toProtoMessage() method anyway. In this way, the method may be removed
and the class (+ UserThreadMappedPersistableList) made abstract.

Also it appears PersistableHashMap was never used, so remove it.
2020-03-28 19:49:53 +08:00
Steven Barclay
9d10a6384f
Tidy payload instances wrongly implementing PersistableEnvelope
Remove an unused PersistableEnvelope interface from the following five
PersistableNetworkPayload implementations:

  AccountAgeWitness, BlindVotePayload, ProposalPayload,
  SignedWitness, TradeStatistics2

These already have corresponding *Store envelope classes which correctly
implement the interface.
2020-03-28 15:22:06 +08:00
ghubstan
aed3453142
Move command & core proto defs to new subproject
Protobuf definition files were moved from common and core to a new
protodefinition subproject.

The two main reasons for doing this are to speed up builds by not
having to regenerate common and core protobuf classes
every time a change is made in those subprojects, and to remove
the grpc cli's direct dependency on core, and the transitive dependency
on common.

In order to accomplish this, cli's BisqCliMain was stripped of
its dependencies on common and core.  Cli can only get the version
and balance now.

gRPC stub boilerplate was moved from BisqCliMain to a CliCommand
class to avoid some of the bloat that is going to happen as the
read-response loop supports more rpc commands.
2020-03-26 10:14:33 -03:00
Christoph Atteneder
557ec7f449
Merge pull request #4025 from stejbac/make-persistence-thread-safe
Make serialisation in FileManager::saveToFile thread-safe
2020-03-23 13:49:27 +01:00
Steven Barclay
9ab649ec05
Restore type hierarchy of MeritList & VoteWithProposalTxIdList
Provide UserThreadMappedPersistableList subclass for persistable lists
which need to implement UserThreadMappedPersistableEnvelope, instead of
putting the interface on the base class.

Make the (non-storage) classes MeritList and VoteWithProposalTxIdList
keep the original PersistableList superclass, deriving the remaining
subclasses of PersistableList from the new class instead. In this way,
further persistence-related changes are less likely to inadvertently
alter the behaviour of those two consensus-critical classes.

Removing the superfluous PersistableEnvelope interface from the two
classes (via the base class) will be done in a separate PR.
2020-03-22 14:12:57 +08:00
Christoph Atteneder
066614f966
Bump version number for v1.2.9 2020-03-13 17:16:09 +01:00
Christoph Atteneder
dfba2103ab
Bump version number to v1.2.8 2020-03-10 09:17:21 +01:00
Steven Barclay
91fa07343c
Add UserThreadMappedPersistableEnvelope for greater explicitness
Make the default toPersistableMessage() method of PersistableEnvelope
simply delegate to Proto.toProtoMessage for speed, so that stores can
explicitly implement (Threaded|UserThreadMapped)PersistableEnvelope if
they actually need concurrency control.

As part of this, make PeerList implement PersistableEnvelope directly
instead of extending PersistableList, as it is non-critical & cloned on
the user thread prior to storage anyway, so doesn't need be thread-safe.
In this way, only PaymentAccountList & small DAO-related stores extend
PersistableList, so they can all be made user-thread-mapped.

After this change, the only concrete store classes not implementing
(Threaded|UserThreadMapped)PersistableEnvelope are:

  AccountAgeWitness, BlindVotePayload, ProposalPayload, SignedWitness,
  TradeStatistics2, NavigationPath & PeerList

The first five appear to erroneously implement PersistableEnvelope and
can be cleaned up in a separate commit. The last two are non-critical.

(Make NavigationPath.path an immutable list, for slightly better thread
safety anyway - that way it will never be observed half-constructed.)
2020-03-10 12:05:33 +08:00
Steven Barclay
9e9fc6ab57
Rename toProtoMessageSynchronized to toPersistableMessage
Make PersistableEnvelope method name less confusing, as it is only
synchronised in ThreadedPersistableEnvelope.
2020-03-10 10:36:52 +08:00