-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use proto with settlement status * add table for pending data transfer burns Check the status of a data transfer session event and store in the corresponding table * add simple test for pending data transfer sessions that are pending * update to helium-proto with pending data transfer message * use timestamp columns that let us know when a session occurred for settlement first and last timestamp makes sense for burning because we try and do that as often as possible. But for something that may be sitting around for a long time... A settlement message will come in and try to pick up all sessions within a window (`recv_timestamp`). `inserted_at` is for us to help with debugging. * break out process_file for readability cargo fmt really does not like lots of code inside tokio::select! macros * Write pending data transfer sessions to s3 * allow all the arguments * Use consistent timestamp granularity within a single message * go back to proto master
- Loading branch information
1 parent
ca12bb6
commit e6adffc
Showing
9 changed files
with
312 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
mobile_packet_verifier/migrations/7_pending_data_transfer_sessions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CREATE TABLE pending_data_transfer_sessions ( | ||
pub_key TEXT NOT NULL, | ||
payer TEXT NOT NULL, | ||
event_id TEXT NOT NULL, | ||
uploaded_bytes BIGINT NOT NULL, | ||
downloaded_bytes BIGINT NOT NULL, | ||
rewardable_bytes BIGINT NOT NULL, | ||
recv_timestamp TIMESTAMPTZ NOT NULL, | ||
inserted_at TIMESTAMPTZ NOT NULL, | ||
PRIMARY KEY(pub_key, payer, recv_timestamp) | ||
); |
Oops, something went wrong.