Skip to content

Commit d2fad80

Browse files
authored
feat: TAP Agent (#83)
* feat: TAP Agent Signed-off-by: Alexis Asseman <[email protected]> * chore: silence one clippy::too_many_arguments Signed-off-by: Alexis Asseman <[email protected]> * ci: add postgres/sqlx to clippy job Signed-off-by: Alexis Asseman <[email protected]> * refactor(tap_agent): trim_start_matches addresses Signed-off-by: Alexis Asseman <[email protected]> * fix: table name `scalar_tap_ravs` discrepancy Was `scalar_tap_latest_ravs` everywhere except in the down migration. Opted for the shorter of the 2 everywhere. Signed-off-by: Alexis Asseman <[email protected]> * refactor: dashes in bin and crate names Instead of underscores. Signed-off-by: Alexis Asseman <[email protected]> * style: fix spaces in macro call Signed-off-by: Alexis Asseman <[email protected]> * refactor: rename Account to SenderAllocationRelationship Signed-off-by: Alexis Asseman <[email protected]> * refactor: simplify update_unaggregated_fees_static In particular, simplify handling of NULL results from the DB. Signed-off-by: Alexis Asseman <[email protected]> * refactor: cleanup config Signed-off-by: Alexis Asseman <[email protected]> * docs: importance of receipt's SERIAL id in DB Signed-off-by: Alexis Asseman <[email protected]> * feat: add timeout config for RAV request Signed-off-by: Alexis Asseman <[email protected]> * fix: state-based receipt notification rejection Signed-off-by: Alexis Asseman <[email protected]> * refactor: cleanup Signed-off-by: Alexis Asseman <[email protected]> * fix: duration conversions Signed-off-by: Alexis Asseman <[email protected]> * feat: rav trigger config in GRT instead of wei Signed-off-by: Alexis Asseman <[email protected]> * refactor: rename "gateway" to "sender" Signed-off-by: Alexis Asseman <[email protected]> * refactor: rename `is_last` col to `final` in `scalar_tap_ravs` table Signed-off-by: Alexis Asseman <[email protected]> --------- Signed-off-by: Alexis Asseman <[email protected]>
1 parent 7e3595b commit d2fad80

File tree

35 files changed

+4610
-788
lines changed

35 files changed

+4610
-788
lines changed

.github/workflows/tests.yml

+18
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,22 @@ jobs:
2121
clippy:
2222
name: cargo clippy
2323
runs-on: ubuntu-latest
24+
services:
25+
postgres:
26+
image: postgres:15
27+
env:
28+
POSTGRES_HOST_AUTH_METHOD: trust
29+
options: >-
30+
--health-cmd pg_isready
31+
--health-interval 10s
32+
--health-timeout 5s
33+
--health-retries 5
34+
ports:
35+
- 5432:5432
2436
container:
2537
image: rust:latest
38+
env:
39+
DATABASE_URL: postgres://postgres@postgres:5432
2640
steps:
2741
- uses: actions/checkout@v3
2842
- uses: actions/cache@v3
@@ -34,6 +48,10 @@ jobs:
3448
~/.cargo/git/db/
3549
target/
3650
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
51+
- name: Install sqlx
52+
run: cargo install sqlx-cli --no-default-features --features postgres
53+
- name: Run the test sqlx migrations
54+
run: cargo sqlx migrate run
3755
- run: |
3856
rustup component add clippy
3957
# Temporarily allowing dead-code, while denying all other warnings

.sqlx/query-1fdec6cc247605be5d1991db42d0a64bf03831f535c6f8766f9ebea7b26d18dc.json

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-276ccf58e47495578a7d6448e75f952e980b713a79b197f1fe17ea1c6c9d07ec.json

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-500a0fe538960d8e455537a6591eee486bfc78faac6376100e4b3fbe54cdbeb2.json

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-6d2f5eecfd846d8f1e2db87e1a79c73af715e64ea63132d4768731b222ad672b.json

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-7a48651e528b87c6a618534806e70c2c494f3ba0774097652df984248869c20d.json

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-8e0a94a7385212c8bd515a77671159932331aaf7fe2fd7fdbb5df04485ec91ec.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-aede274abf6f8fabe510f7765fc4315bab48aeb9ddd1ed80486f22511c39c92e.json

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-b977d0e0ce35557f5829e797975da79d651c366e54ed95687e546be1906dc48a.json

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-bdb90bbff5d073cee9665a99601623b86576e4338009ec2fb4cd1e4b64e9f368.json

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-17c73722e03764f1bd30f11d6918c0e4df41a5504a3acc779d82fcdf7fdd4e79.json renamed to .sqlx/query-be914423c719351af8ec785671d8446de1cc6b352f33825ebc4ae2de03da4263.json

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-c3e88c5a56db17eb8e1f8056c58f5c57d44af2722c379e4528596e9b041242d4.json

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-dc8cea825babfaadfc1845481c1a24471d24c11c957f986144ed04694024e922.json

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-f0569836ad31081ca3cf7406ef5d397ad89619d6e111741254864e3a1eaeaa7a.json

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)