Skip to content

Commit b44ed8a

Browse files
carlosvdrgusinacio
andauthored
Invalid receipt fix: when all receipts are invalid (#282)
* refactor: replace ethers with alloy Signed-off-by: Gustavo Inacio <[email protected]> * fix: handle when all receipts are invalid * fix: avoid crashing if all receipts are invalid * chore: run cargo sqlx prepare * fix: remove unnecesary imports * fix: better handling of result for expected_Rav * chore: update cargo * style: ran cargo fmt * fix: simplify error path * fix: issue with sender account message * chore: runc argo sqlx * style: cargo fmt * fix: implemented calulcation of unnagregatedfees after AllInvalidReceiptsForRAVRequest error * fix: look for min/max values of timestamps * fix: obtain min and max timestamps * fix: Add more filters to receipt deletion * fix: Implement thiserror for rav_requester_single * fix: custom error use * style: rename custom error * test: clean test * chore: update tap-core * fix: typo --------- Signed-off-by: Gustavo Inacio <[email protected]> Co-authored-by: Gustavo Inacio <[email protected]>
1 parent 20bae14 commit b44ed8a

8 files changed

+408
-89
lines changed

.sqlx/query-0e91bdaef6302f57fbea7b4f55ca1f84f9555e6b55d9dcf9a5a3305d0e239126.json

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-56c3678866ffe0ec2eed7290394d07007990cc244f598b763ec5470515efe019.json

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-64b7845ee52e44b795b05d9e3cbe02890d741c023b812484520641b570528ee2.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.lock

Lines changed: 20 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sqlx = { version = "0.7.2", features = [
3838
tracing = { version = "0.1.40", default-features = false }
3939
bigdecimal = "0.4.3"
4040
build-info = "0.0.38"
41-
tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "b5f2135", default-features = false }
41+
tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "9e1915b", default-features = false }
4242
tracing-subscriber = { version = "0.3", features = [
4343
"json",
4444
"env-filter",

tap-agent/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ruint = { version = "1.12.3", features = [
3535
], default-features = false }
3636
futures-util = { version = "0.3.28", default-features = false }
3737
jsonrpsee = { version = "0.24.0", features = ["http-client", "tracing"] }
38-
tap_aggregator = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "b5f2135" }
38+
tap_aggregator = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "eb8447e" }
3939
ractor = { version = "0.9", features = [
4040
"async-trait",
4141
], default-features = false }

tap-agent/src/agent/sender_account.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,13 @@ pub mod tests {
853853
Self::UpdateInvalidReceiptFees(r0, r1),
854854
) => l0 == r0 && l1 == r1,
855855
(Self::NewAllocationId(l0), Self::NewAllocationId(r0)) => l0 == r0,
856-
(a, b) => unimplemented!("PartialEq not implementated for {a:?} and {b:?}"),
856+
(a, b) => match (
857+
core::mem::discriminant(self),
858+
core::mem::discriminant(other),
859+
) {
860+
(a, b) if a != b => false,
861+
_ => unimplemented!("PartialEq not implementated for {a:?} and {b:?}"),
862+
},
857863
}
858864
}
859865
}

0 commit comments

Comments
 (0)