Commit graph

698 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
26debc66f9
Merge pull request #231 from lightninglabs/issue-template
GitHub: add issue templates
2021-03-09 18:59:36 -08:00
Oliver Gugger
52adbec87e
GitHub: add issue templates
To make initial triage easier and nudge people into reading the
documentation and gathering information before submitting an issue, we
add three issue templates: bug reports, feature requests and "other".
2021-03-09 11:12:11 +01:00
Grisha Lyukshin
d94acd702a
docs: update account close example (#229)
* Updated for a transaction close

* adding an extra line at the end of the file.

* sat_per_byte value update

As per PR review feedback, updating from 0 to something more realistic, like 11 sats per vbyte.

Co-authored-by: root <root@pop-os.localdomain>
2021-03-08 13:08:14 +01:00
Johan T. Halseth
79ad156ce4
Merge pull request #230 from guggero/newnodesonly-flag
rpcserver+poolrpc: expose state of --newnodesonly flag in RPC
2021-03-05 09:54:42 +01:00
Oliver Gugger
ffd2613b0f
rpcserver+poolrpc: expose state of --newnodesonly flag in RPC
With this commit we expose the state of the global --newnodesonly flag
of the Pool daemon in the GetInfo RPC call.
2021-03-04 16:34:37 +01:00
Oliver Gugger
c0a59f2640
Merge pull request #217 from guggero/tlv-ticket
sidecar: add ticket with TLV encoders
2021-03-01 10:05:26 +01:00
Oliver Gugger
00ac0e512e
Merge pull request #224 from lightninglabs/lit-integrated-shutdown-fix
Provide default value for lnd macaroon path, fix shutdown panic in LiT
2021-02-24 12:57:26 +01:00
Oliver Gugger
c0235be121
version: bump to version v0.4.3-alpha 2021-02-24 12:43:17 +01:00
Oliver Gugger
34d2fe52a3
config: provide default value for lnd macaroon path
To make it easier for users with everything installed to the default
locations to use Pool, we add a default value for the macaroon path.
2021-02-24 09:49:45 +01:00
Oliver Gugger
0cf137c511
server: fix nil pointer panic when running as subserver
When Pool is started as a subserver in LiT the gRPC server is never
initialized. When trying to stop Pool this would lead to a nil pointer
panic.
2021-02-24 09:31:41 +01:00
Oliver Gugger
7c3bf310c0
sidecar: add string encoder and decoder
To allow a ticket to be transported easily over any communication
channel we also provide an easy ascii compatible exchange format which
includes a prefix and a checksum in addition to the tlv stream data.
The string encoding chosen is URL safe base64.
2021-02-22 10:26:00 +01:00
Oliver Gugger
fb7cbc9e6a
sidecar: add TLV encoders and decoders
To allow the ticket to become a versatile and extendable data exchange
format, we encode its main parts using different TLV streams. That way
more parts can always be added or extended individually.
2021-02-22 10:25:59 +01:00
Oliver Gugger
ee0736d58c
sidecar: add sidecar ticket types
With this commit we add the main sidecar Ticket type and the partial
information types that are bundled within.
The ticket itself is meant to be used in a PSBT like manner where each
participant incrementally adds their information according to their role
and the current step.
2021-02-22 10:25:53 +01:00
Olaoluwa Osuntokun
25b1fd0cea
Merge pull request #213 from guggero/license
pool: add MIT license
2021-02-08 18:50:50 -08:00
Oliver Gugger
d27fd7a40d
Merge pull request #216 from sputn1ck/socks-proxy
Add SOCKS proxy option
2021-02-05 10:11:18 +01:00
kon
4537447933 auctioneer: add tor proxy 2021-02-04 09:58:57 +01:00
Oliver Gugger
235848c344
Merge pull request #214 from carlaKC/poold-exitcode
poold: exit with non-zero error code if main fails
2021-02-02 15:34:48 +01:00
carla
1736a28ebf
poold: exit with non-zero error code if main fails 2021-02-02 13:34:53 +02:00
Oliver Gugger
b73c05c81f
pool: add MIT license 2021-02-02 10:09:45 +01:00
Oliver Gugger
41d958e284
Merge pull request #210 from guggero/rest-fixes
Fix multiple REST issues, allow only one macaroon to be used for lnd connection
2021-02-02 10:09:04 +01:00
Oliver Gugger
7c1e8c9d53
multi: allow only specifying one lnd macaroon
Fixes #196 by allowing only one macaroon to be specified in the
--lnd.macaroonpath config option.
2021-02-02 09:57:21 +01:00
Oliver Gugger
6d0bda3fbb
poolrpc+rpcserver: optimize batch snapshot URI for REST
Fixes #204 by allowing multiple REST URI patterns for the batch
snapshots call.
2021-02-02 09:57:20 +01:00
Oliver Gugger
3e844c8f3e
cmd/pool: add getinfo and stop commands 2021-02-02 09:57:18 +01:00
Oliver Gugger
d7ed2a257e
macaroons: add permissions for GetInfo and StopDaemon
This commit adds the required macaroon permissions for the two new RPC
methods added in the previous commit.
We don't want to introduce a new permission that didn't exist before
because that would mean all users would need to re-create their macaroon
to use the commands. Therefore we use the account:write permission for
the shutdown command as that is probably the most sensitive permission
anyway as it gives access to on-chain funds.
2021-02-02 09:57:16 +01:00
Oliver Gugger
e7d44f0c71
poolrpc+rpcserver: add GetInfo and StopDaemon RPCs
To give developers and users more information about the current state of
the trader daemon, we add a new GetInfo RPC that shows a summary of all
accounts and orders known to the system.
And because there currently is no other way than to <ctrl>+c or kill the
daemon, we add a StopDaemon RPC as well for proper shutdown.
2021-02-02 09:57:14 +01:00
Oliver Gugger
25622682ae
auctioneer: add mutex for subscribedAccts
Because the subscribedAccts map is potentially also accessed by multiple
goroutines at the same time, we add a mutex for it as well.
2021-02-02 09:57:13 +01:00
Oliver Gugger
42c6ac72f2
auctioneer: move mutex lock inside connectServerStream
This commit fixes a missing mutex lock in the SendAuctionMessage. To
make it possible to hold it there, we need to remove the deferred unlock
in connectAndAuthenticate into connectServerStream. Otherwise we'd run
into deadlocks.
2021-02-02 09:57:11 +01:00
Oliver Gugger
6134952464
auctioneer: add IsSubscribed method
The IsSubscribed() method informs about the subscription connection
status to the auctioneer server.
2021-02-02 09:57:09 +01:00
Oliver Gugger
5a2bc0cde9
order: store local node pubkey
The order manager already stores the local lnd node's identity public
key. We return it in an exported method so the RPC server can access it
as well without needing to query it again.
To make sure we only allow querying it after the manager is started, we
add an atomic flag for the startup state.
2021-02-02 09:57:07 +01:00
Oliver Gugger
f163ac85d8
server: emit default values in JSON
Fixes #208 by always rendering the default values in a JSON response,
even if they are "falsey" in the RPC message.
2021-02-02 09:57:05 +01:00
Oliver Gugger
5cf3c1a4e8
Merge pull request #211 from guggero/user-agent
Add user agent and initiator string to account open and order submission calls
2021-01-29 13:06:23 +01:00
Oliver Gugger
48c60bc24a
version: bump to version v0.4.3-alpha 2021-01-29 12:56:24 +01:00
Oliver Gugger
9fcf7e42c0
cmd/pool: add initiator string
We add the initiator string "pool-cli" to the account open and order
submission calls to give the server an idea what user facing software
was used for those actions.
2021-01-29 12:56:23 +01:00
Oliver Gugger
55826cf372
rpcserver: add client provided initiator to context
In case the RPC client specified the initiator string we add it to the
context of the InitAccount and SubmitOrder calls so it can be appended
to the static user agent of the binary.
2021-01-29 12:56:23 +01:00
Oliver Gugger
e245576d70
auctioneer+server: send user agent to auctioneer
Send the static user agent plus the dynamic initiator string (if
provided) to the auctioneer in the InitAccount and SubmitOrder RPCs.
2021-01-29 12:56:23 +01:00
Oliver Gugger
76838927c8
poolrpc: add initiator string to submission requests
To give any CLI or UI the option to identify themselves, an initiator
field is added that will be appended to the binary's user agent string
before sending it to the server.
2021-01-29 12:56:22 +01:00
Oliver Gugger
cb899d5abc
auctioneerrpc: add user agent string to server RPCs
To allow the server to gather some statistics about what software is
running on the other end, we add a user agent string to the following
calls:
 - InitAccount: to count what agent was used to create/open an account.
 - SubmitOrder: to count what agent submitted an order.
2021-01-29 12:56:22 +01:00
Oliver Gugger
59eb418c4a
version: store and read initiator string from context
To make it easy to pass the initiator of an action to the auctioneer
client, we use the incoming context to transport it. We provide two
helper functions in the main package to wrap and unwrap the initiator
string in a context.
2021-01-29 12:56:20 +01:00
Oliver Gugger
e713f7a38b
version: add user agent string
To be able to identify the type of Pool daemon binary version that
submits orders and accounts, we want to send a user agent string to the
server. That string can be customized when poold is integrated into LiT
for example.
2021-01-29 12:55:44 +01:00
Oliver Gugger
2b39913267
version: allow specifying the semantic alphabet
As a preparation to normalize the initiator part of the user agent, we
allow specifying the alphabet for the normalizeVerString function.
2021-01-29 12:52:14 +01:00
Oliver Gugger
9414280b96
make: fix ldflags to include commit in version string
The Makefile contained a number of copy/paste errors that we fix with
this commit: The make_ldflags function and RELEASE_TAGS variable were
missing and therefore resulted in empty strings.
With those things removed, we can then go ahead and build the correct
LDFLAGS variable and actually use it when building or installing the
binaries.
2021-01-27 14:40:47 +01:00
Oliver Gugger
33fcaed7a6
Merge pull request #207 from guggero/submodule-tag
mod: use tagged version for auctioneerrpc submodule
2021-01-25 13:31:42 +01:00
Oliver Gugger
912f58e2fe
mod: use tagged version for auctioneerrpc submodule
Now that we've merged the PR that made auctioneerrpc a submodule and
pushed a tag, we want to reference it with that tag to make the go.mod
file easier to read/understand.
2021-01-25 11:02:35 +01:00
Oliver Gugger
53fd164fb2
Merge pull request #201 from lightninglabs/rest-annotations
auctioneerrpc: move auctioneer proto files into own sub-module
2021-01-22 16:47:37 +01:00
Oliver Gugger
7077c8b542
mod: make auctioneerrpc its own sub-module
To make it possible to replace the package in the server integration
tests, we declare the auctioneerrpc package as its own submodule. That
way we can just plug in the server version in the itest if we have changes in the
server proto that aren't merged to the client repo yet.
2021-01-22 16:36:18 +01:00
Oliver Gugger
83b458b504
multi: move auctioneer proto to auctioneerrpc package
As a preparation to extract the auctioneer proto package into its own
sub-module, we move it out of the poolrpc package.
2021-01-22 10:41:44 +01:00
Oliver Gugger
ae21a944c6
poolrpc: extract REST annotations 2021-01-22 10:28:00 +01:00
Oliver Gugger
131f2c12f5
Merge pull request #202 from lightninglabs/update-lndclient
mod: update lndclient, block until lnd is unlocked, bump version to v0.4.2-alpha
2021-01-19 08:38:50 +01:00
Oliver Gugger
9881fca21f
version: bump to v0.4.2-alpha 2021-01-18 15:34:21 +01:00
Oliver Gugger
646222d29b
server: block until lnd is unlocked 2021-01-15 22:15:01 +01:00