Commit Graph

237 Commits

Author SHA1 Message Date
nitramiz
d55db5e8ce Bump lightningd image to v24.08.2 2024-10-28 14:06:33 +00:00
nitramiz
2911863923 Bump lightningd image to v24.05 2024-08-12 11:37:51 +00:00
nitramiz
3bec2d7856 Bind charged to all interfaces 2023-10-13 17:10:10 +00:00
Blockstream Satellite
befb1cc89d tf: Replace localhost with 127.0.0.1 to avoid ipv6
After recent upgrades, the charge environment was interpreting localhost
as an ipv6 address (resolving to ::1) and callback requests were
failing. To avoid this and other potential problems, replace localhost
occurrences with 127.0.0.1 to ensure ipv4.
2023-10-13 12:36:37 -03:00
nitramiz
40881a01e1 TF: Upgrade charged to 0.4.24 2023-10-11 18:15:30 +00:00
nitramiz
effa8880d3 TF: Upgrade CLN node to v23.08 2023-10-11 16:23:25 +00:00
Mario Tischlinger
b0ca82ab32 [Alerts]Migrate OpsGenie alerts to OnCall 2023-10-11 15:22:41 +00:00
Blockstream Satellite
24d21fdc08 lint: Fix E231 errors detected with flake8 6.1.0 2023-08-04 12:05:26 -03:00
Blockstream Satellite
7a7591ba5b Define independent Tx retry timeouts per channel
The Tx confirmations sent for the gossip and bitcoin source channels may
arrive at times differing by more than the previous default timeout of
60 seconds. As a result, the server could trigger unnecessary
retransmissions. Use larger Tx confirmation timeout interval on these
channels specifically and keep the original 60-second interval on the
other channels (auth and user messages).
2023-08-04 11:59:24 -03:00
Blockstream Satellite
0822138867 ci: Update github workflow python version to 3.9 2023-05-23 12:36:34 -03:00
Blockstream Satellite
06469b6572 Rename db paths from ionosphere to satellite-api 2023-05-23 10:24:48 -03:00
Blockstream Satellite
4177f8577b TF: Rename CLN alias to satellite-api-* 2023-05-23 10:20:09 -03:00
Blockstream Satellite
0a4fcce525 TF: Fix dependencies on ionosphere.service on LB 2023-05-23 10:09:33 -03:00
Blockstream Satellite
7db6fcd314 TF: Rename ionosphere-named variables 2023-05-22 15:07:31 -03:00
Blockstream Satellite
d941a4f9a3 Rename gitlab repository to satellite-api 2023-05-22 15:03:29 -03:00
nitramiz
693bb97972 TF: Upgrade CLN version to v23.02.2 2023-05-22 17:33:47 +00:00
nitramiz
c68b6e053c TF: Assign CI svc account storage.admin 2023-05-22 17:31:57 +00:00
nitramiz
5a281ea11e TF: Move tor KMS crypto key + keyring to tor module 2023-05-22 17:30:55 +00:00
nitramiz
f306840add TF: Update LB bucket role members following a DRYer approach
Run terraform fmt -recursive
2023-05-22 16:27:03 +00:00
Blockstream Satellite
44b318521f yapf: Update format to yapf 0.33 2023-05-22 12:34:35 -03:00
Blockstream Satellite
e3da7790d3 lb: Add missing ssl-protected testnet endpoints 2023-02-22 11:46:52 -03:00
Blockstream Satellite
110f6f289c Fix retransmission on repeated Tx confirmation
The previous implementation could trigger an unnecessary retransmission
if a repeated Tx confirmation (with the same region confirmed before)
was sent.
2023-02-17 15:28:23 -03:00
Blockstream Satellite
d020ce37b7 Return retransmission info via the admin endpoints
When reading the order from /admin/order/:uuid or the retransmitting
orders via /admin/orders/retransmitting, include the retransmission
information (timestamp, retry count and region code).
2023-02-16 17:04:08 -03:00
Blockstream Satellite
6750bd1bce Substitute unnecessary Tx/RxConfirmation queries
Use the tx_confirmations/rx_confirmations order field populated
automatically (lazily) by the model.
2023-02-16 16:13:39 -03:00
Blockstream Satellite
2198ce4699 Dump admin info on orders from /admin/orders/state 2023-02-16 13:16:02 -03:00
Blockstream Satellite
fb225f58d4 tf: Fix empty testnet IP on staging nginx conf 2023-02-15 11:48:56 -03:00
Blockstream Satellite
cce56fcfda tf: Reorganize the LB config for readability
Just move some locations around to make the configuration more readable.
2023-02-15 11:48:56 -03:00
Blockstream Satellite
74e12c5903 tf: Drop the auth, gossip and btc-src servers
With the multichannel support, the handling of auth, gossip, and btc-src
messages has been migrated to the single shared production Satellite API
server. There are separate logical channels now for these streams.
Hence, the previous dedicated servers used for them are no longer
required.
2023-02-15 11:48:56 -03:00
Blockstream Satellite
5ea4f2f6ce Update sorting of /orders/retransmitting results
Sort by the time of the order's most recent retransmission attempt.
2023-02-10 16:03:04 -03:00
Blockstream Satellite
7529e0c7ce Speed up the max size upload error test 2023-02-10 14:57:45 -03:00
Blockstream Satellite
5efcbd2418 Extend the states returned by /orders/:state
Previously, the /orders/:state endpoint only returned the "pending",
"queued", and "sent" states. This patch adds the following new states:
"paid", "transmitting", "confirming", "rx-pending", "retransmitting",
and "received". These are mapped directly to the order status, except
for the "rx-pending" and "retransmitting" states, which are inferred
based on other information. The "rx-pending" state returns orders with
sent status only, as opposed to the call to /orders/sent, which returns
orders with sent and received status. The "retransmitting" state returns
any order with entries on the retransmission database.
2023-02-10 14:40:32 -03:00
Blockstream Satellite
432334b2eb Add parameters to filter orders in date range
Previously, it was possible to filter orders before an ISO date only.
With this patch, it is now possible to filter before and after ISO
dates, so a window can be defined (with start and end datetimes). Also,
it is now possible to specify the start and end times of the filtering
window with deltas in seconds relative to the current UTC time. For
instance, with before_delta=60 and after_delta=120, the filtered window
starts 2 min ago and ends 1 min ago.
2023-02-10 10:15:20 -03:00
Blockstream Satellite
31b0d5fa17 Remove uuid from /order/<uuid>/bump response
The uuid is already a request parameter, so no need to include it in the
response.
2023-02-09 17:34:46 -03:00
Blockstream Satellite
73f7254c6a tf: Upgrade lightningd to v0.12.1 2023-02-06 14:02:18 -03:00
Blockstream Satellite
616584da8a tf: Increase the max body size on /admin 2023-02-06 13:07:15 -03:00
Blockstream Satellite
ef6074785e Define distinct maximum message sizes per channel 2023-02-06 13:02:32 -03:00
Blockstream Satellite
b2a7c7f394 Drop unused option from test order generation util
The option is not used on tests.
2023-02-02 17:16:12 -03:00
Blockstream Satellite
c10126b7ec Consider different Tx rates per logical channel
Consider these distinct rates when computing the timeout interval for
messages transmitted on each channel.
2023-02-02 17:16:12 -03:00
Blockstream Satellite
b3454d7340 Return more information on GET /admin/order
In addition to the info returned by the regular /order endpoint, return
a few more admin-only fields.
2023-02-02 17:16:12 -03:00
Blockstream Satellite
895d9f785f Bump flask version to 1.1.4 2023-02-02 17:16:12 -03:00
Blockstream Satellite
f2058ac3f8 Add admin route for SSE on get-protected channels
The auth channel does not allow users to get messages (access them over
the internet). Hence, a regular SSE client should not be able to monitor
the events generated on the auth channel. In contrast, an admin host
should be able to monitor the auth events. For that, this patch adds an
/admin/subscribe endpoint that is SSL-authenticated in production, so
only the admin hosts can connect to it.
2023-02-02 17:16:12 -03:00
Blockstream Satellite
50df236d6b Support multiple parallel logical message channels
The same server now can handle multiple logical channels, on which the
transmitter logic runs independently. That is, while previously a single
message would be in transmitting state at a time, now multiple messages
can be in transmitting state as long as they belong to distinct logical
channels.

The supported channels each have different permissions. The user channel
is where users can post, get, and delete messages as needed. In
contrast, the other channels do not grant all permissions to users. Some
are read-only (users can get but not post) and there is a channel (the
auth channel) on which users have no permissions (neither get nor post).

For the channels on which users do not have all permissions (get, post,
and delete), this patch adds admin-specific routes, which are prefixed
by /admin/. The /admin/ route is protected via SSL in production and
allows the admin host to send GET/POST/DELETE requests normally. Hence,
for instance, the admin host can post a message on the auth channel
(with POST /admin/order) and read it (with GET /admin/order) for
transmission over satellite, whereas regulars cannot. With this scheme,
the auth channel messages are accessible exclusively over satellite (and
not over the internet).

The admin routes were added to the following endpoints:
- /order/<uuid> (GET and DELETE requests)
- /order (POST request)
- /orders/<state> (GET request)
- /message/<tx_seq_num> (GET request)

The messages posted by the admin are not paid, so this patch removes the
requirement of invoice generation and payment. Only paid orders now
generate an invoice. Thus, the POST request to the /order/ endpoint does
not return an invoice for non-paid (admin-only) messages.

Also, this patch updates the queue page to display the orders separately
for each channel. The query string channel parameter determines which
channel the page shows.

Finally, this patch updates the events published into the Redis db on
transmission. The event includes the corresponding logical channel so
that SSE events can be subscribed independently for each channel.
2023-02-02 17:16:12 -03:00
Chase Sillevis
f7695da16c
terraform fmt + update DNS description 2022-11-29 16:20:28 +01:00
nitramiz
570cb12571 CI: update dind image 2022-03-10 09:50:05 -08:00
nitramiz
b4ccd902d3 TF: make staging deploys proactive/prod opportunistic + don't create tor backend service on staging 2022-01-06 09:18:30 -08:00
nitramiz
ead897b77c TF: update tor + clightning
turn on chunked_transfer_encoding on the LB for SSE subscribers
2022-01-06 08:16:30 -08:00
nitramiz
f84e11fa85 TF: fix hidden service 2022-01-05 13:09:53 -08:00
Blockstream Satellite
99a5784a0a tf: Fix API workers service with old daemon script
The former daemon.sh script was replaced by the workers.sh script in
2cfc398. Update on the terraform setup and also rename the service now
that it no longer consists of only Tx-related daemon workers.
2022-01-05 16:45:45 -03:00
Blockstream Satellite
76a51eec52 Add missing blank lines around class methods
This verification was added on yapf 0.32 and it follows the pep8
specification.
2021-12-28 12:22:58 -03:00
Blockstream Satellite
da31d10916 Fix error dictionary returned as string
Flask-RESTful returns a JSON response by default when returning a
dictionary. It's not necessary to dump the returning dictionary into a
JSON-serialized string. Otherwise, the client will see a string response
instead of a JSON response.
2021-12-28 11:27:25 -03:00