Points to a call rate metering interceptor configuration file.
Test cases can build a config file, and the test harness will
install it into a daemon's appDataDir before startup.
The installed config file will be used to configure gRPC
service rate metering interceptors.
This change was prompted by the recent changes in the main branch to
allow a tx memo field to be set from the UI and API.
This and the prior PR address the API's need to be able to fetch a
tx (with a memo). The API can now get a completed trade's withdrawal
txid and pass it as a gettransaction parameter.
See previous PR "Append nullable withdrawalTxId field to Trade".
https://github.com/bisq-network/bisq/pull/4937
A summary of changes by file:
grpc.proto
- Added withdrawalTxId field to existing TradeInfo proto & wrapper.
- Reordered fields in TradeInfo proto.
- Added new fields to be displayed by TxInfo proto in CLI.
- Fixed typo: unsetTxFeeRatePreference -> UnsetTxFeeRatePreference.
- Added new GetTransaction rpc.
GrpcWalletsService - Added new getTransaction gRPC boilerplate.
CoreWalletsService - Added new getTransaction implementation.
TxInfo - Added the new fields for displaying a tx summary from CLI.
This is not intended to be more than a brief summary; a block explorer
or bitcoin-core client should be used to see the complete definition.
TradeInfo - Added the new withdrawalTxId field defined in grpc.proto.
CliMain - Added new 'case gettransaction'.
TransactionFormat - Formats a TxInfo sent from the server to CLI.
ColumnHeaderConstants - Added console headers used by TransactionFormat.
TradeFormat - Displays a completed trade's WithdrawalTxId if present.
Apitest - Adjusted affected tests: assert tx memo is persisted and
test gettransaction.
- Added optional memo parameter to the api's sendbtc and
withdrawfunds commands.
- Removed the @Nullable annotation was removed because protobuf
does not support null.
- Visibility in two wallet check methods were changed from private
to pkg protected so the CoreTradeService could use them.
- Adjusted affected tests. (Asserting the memo field was set on a
transaction cannot be checked from apitest yet.)
Takes an address, amount, and optional txfeerate param,
returns a lightweight TxInfo proto.
Also overloaded two BtcWalletService methods to allow sendbtc
to pass in the tx fee rate -- overriding the fee service and
custom fee rate setting.
If present in the sendbsq command, the parameter will override the fee
service and custom fee rate setting for the BSQ transaction.
Also changed the sendbsq grpc return type to a lightweight TX proto wrapper.
Besides some small refactoring in the CLI, all the changes are
adjustments for this new sendbsq parameter and its new grpc return value.
Users need to be able to preserve their acct age when moving a
payment account to a new client.
Also adjusted affected tests, and did some minor refactoring
of the custom gson type adaptor.
This change fixes the blocking problem in the fee rate request api.
Also redefined the TxFeeRateInfo.
- Redefined grpc.proto message TxFeeRateInfo, added
lastFeeServiceRequestTs field. (CLI user may want to know
TS of last fee request.)
- Adjusted TxFeeRateInfo proto wrapper.
- Adjusted CurrencyFormat and BtcTxFeeRateTest to new TxFeeRateInfo.
- Added @Getter annotation to FeeService. (CLI user may want to know
TS of last fee request).
- Pass resultHandler from GrpcWalletsService through CoreApi, to
CoreWalletsService's tx fee rate api methods.
These do not buy enough in the way of performance, at the cost of
so many additional lines. Buy these checks should be done for
debug log statements that have expensive parameters.
Keeping the bats test simple. More complex use cases are tested in
apitest, and we don't want to be trading on mainnet with a bats test.
- Add new getunusedbsqaddress test, assert success return status.
- Add new getpaymentmethods test, assert success return status.
- Change the getbalance tests to just check a sucessful '0' status code.
The api's getbalance method returns full balance info now, not just a
formatted long. We still assert the cmd did not fail, but don't check
the value string.
- Remove obsolete createpaymentacct tests.
This is well tested in apitest, and testing this cmd is unnecesarily
complex to do in a bats script.
In the CLI, this method now takes a single argument, the path to a json
file (a payment account form). The json text is read from the file
and sent to the server, where it is serialized to a new PaymentAccount
instance, saved, and sent back to the CLI as a protobuf.PaymentAccount.
- Modified existing gRPC boilerplate in grpc.proto and GrpcPaymentAccountsService.
- Modified existing method signatures in CoreApi and CorePaymentAccountsService.
- Replaced existing method impl in CorePaymentAccountsService and
removed dead code.
- Replaced the CLI's existing 'createpaymentacct' method impl.
- Modified existing tests.
Returns a list of supported payment method IDs. This gives CLI users
the correct payment method id for creating a new payment account.
- Added gRPC service GetPaymentMethods to grpc.proto.
- Added gRPC boilerplate method to GrpcPaymentAccountsService.
- Added implimentation to CoreApi -> CorePaymentAccountsService.
- Refactored PaymentAccountTest hierarchy.
- Add api method to CLI.
This change fixes the recently bloated wallet balances api. Now there
is one CLI getbalance [bsq|btc] method that calls a getbalances(currency-code)
on the server. The server returns full wallet balance information for
BSQ, BTC, or both if the CLI's currency argument is absent.
- grpc.proto: Reduced number of getbalance(s) proto services from
four to one.
- GrpcWalletsService: Reduced number of getbalance(s) gRPC service
boilerplate methods from four to one.
- CoreApi, CoreWalletsService: Reduced number of getbalance(s) gRPC
service implementation methods from four to one.
- CliMain: Reduced number of getbalance(s) commands from four to one.
- BalancesInfo: Changed BsqBalanceInfo & BtcBalanceInfo field names
to bsq and btc, respectively, to make calling their accessors
more readable, less verbose.
- BtcBalanceInfo, BsqBalanceInfo: Defined static final EMPTY instances
as place holders in a BalancesInfo returned by the gRPC server, when
one or the other balance types is not requested. Would be nice
to serve Optional.empty() instead, but protobuf does not support
it or null.
- Adjusted affected api tests and build doc.
- Add optional makerFeeCurrencyCode argument to CLI's 'createoffer'.
- Add optional takerFeeCurrencyCode argument to CLI's 'takeoffer'.
- Add isCurrencyForMakerFeeBtc field to OfferInfo proto wrapper.
- Pass fee currency argument down to CoreOffersService and CoreTradesService's
create and take offer methods.
- Add maybeSetFeePaymentCurrencyPreference method to OfferUtil to
conditionally set the 'payFeeInBtc' preference before creating
or taking an offer.
- Adjust affected tests.
Moved just enough code out of BsqSendView to avoid desktop/api
'sendbsq' duplication, at the cost of adding 1 new method to
BsqSendView.
- Created new BsqTransferModel to hold tx details shared by desktop and api.
- Created new BsqTransferService to send bsq using a BsqTransferModel shared
by desktop and api.
- Uncommented CoreWalletsService#sendBsq implementation.
- Uncommented sendbsq tests.
All the boilerplate for this method is included in this change, but
the implementation in CoreWalletsService#sendBsq is commented out
until the needed logic to send bsq is refactored out of desktop's
BsqSendView class -- to be included in the next PR.
- Added new method to CLI.
- Added the gRPC server boilerplate.
- Added the core implementation, commented out.
- Enabled tests.
- Added three new methods to CLI:
getbalances ... returns complete bsq and btc balance info
getbsqbalance ... returns complete bsq balance info
getbtcbalance ... returns complete btc balance info
The old getbalance method is deprecated and will be removed
if there is agreement to do that.
- Made the needed changes in the CLI's output formatting classes.
- Added new tests to existing BsqWalletTest, added new BtcWalletTest
and WalletBalancesTest.
- Added disabled tests for funding a bsq wallet (todo in next PR).
- Added new method to CLI, split some long msg strings into two lines,
and added a white space after a braceless else statement.
- Added the gRPC server boilerplate.
- Added the core implementation.
- Added a test, and moved method wallet tests into their own package.
Consolidated all method tests into fewer test cases by running them
from new 'scenario' test cases. This cuts the current scaffold
setup & teardown times by almost 1/2. No method tests were deleted
or duplicated.
(1) Disabled all method (unit) test cases at the class level.
(2) Added new scenario test cases to run all disabled test cases (1).
The method test cases can still be run by commenting out the @Disabled
annotation.
- Remove dead code from AbstractLinuxProcess.
- Make default dummy accts static in MethodTest.
- Simplify gRPC stub creation, btc block generation, dispute agent
registration, and dummy acct initialization in test case startup.
- Make ExpectedProtocolStatus visible to scenario test pkg.