Skip to content

Conversation

darioAnongba
Copy link
Contributor

@darioAnongba darioAnongba commented Sep 12, 2025

Implement timestamp filtering for the AddrReceives RPC endpoint.

Fixes #700

  • Added start_timestamp and end_timestamp fields to AddrReceivesRequest
  • Regenerated all protobuf files
  • Updates AddrReceives function in rpcserver to handle the new timestamp filtering by adding logic to convert the Unix timestamp to a time.Time.
  • Adds --start_timestamp and --end_timestamp flags to the tapcli command.
  • Adds integration test testAddrReceives.

Usage

tapcli addrs receives --addr "addr1..." --start_timestamp 1234567890 --end_timestamp 1234567890
resp, err := client.AddrReceives(ctx, &taprpc.AddrReceivesRequest{
    FilterAddr:                  "addr1...",
    StartTimestamp: uint64(time.Now().Unix() - 3600), // 1 hour ago
    EndTimestamp: uint64(time.Now().Unix()), // now
})

@darioAnongba darioAnongba self-assigned this Sep 12, 2025
@coveralls
Copy link

coveralls commented Sep 12, 2025

Pull Request Test Coverage Report for Build 17738051960

Details

  • 16 of 29 (55.17%) changed or added relevant lines in 5 files are covered.
  • 43 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+0.001%) to 49.615%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/commands/addrs.go 0 3 0.0%
taprpc/taprootassets.pb.go 0 10 0.0%
Files with Coverage Reduction New Missed Lines %
fn/context_guard.go 1 91.94%
tapdb/addrs.go 2 74.09%
tapdb/sqlc/transfers.sql.go 2 82.65%
tapdb/universe.go 2 57.41%
itest/assertions.go 3 89.2%
proof/verifier.go 3 77.79%
tapdb/supply_ignore_checker.go 3 80.77%
tapfreighter/chain_porter.go 6 82.31%
tapdb/assets_store.go 10 77.73%
universe/archive.go 11 79.18%
Totals Coverage Status
Change from base Build 17689967457: 0.001%
Covered Lines: 55523
Relevant Lines: 111908

💛 - Coveralls

@darioAnongba darioAnongba force-pushed the feat/filter-by-timestamp-addr-receives branch 4 times, most recently from ac6a0ab to b75d035 Compare September 12, 2025 14:57
@darioAnongba darioAnongba marked this pull request as ready for review September 12, 2025 15:02
@darioAnongba darioAnongba requested review from GeorgeTsagk and removed request for GeorgeTsagk September 12, 2025 15:02
@darioAnongba darioAnongba force-pushed the feat/filter-by-timestamp-addr-receives branch from 7b5ad0a to 436b3d4 Compare September 15, 2025 11:37
@darioAnongba darioAnongba changed the title rpc: filter AddrReceives by timestamp Filter AddrReceives by timestamp Sep 15, 2025
@darioAnongba darioAnongba force-pushed the feat/filter-by-timestamp-addr-receives branch from 436b3d4 to e69088e Compare September 15, 2025 12:32
@levmi levmi moved this from 🆕 New to 🏗 In progress in Taproot-Assets Project Board Sep 15, 2025
@darioAnongba darioAnongba force-pushed the feat/filter-by-timestamp-addr-receives branch from 518bf0e to 92b9069 Compare September 15, 2025 16:22
@darioAnongba darioAnongba moved this from 🏗 In progress to 👀 In review in Taproot-Assets Project Board Sep 17, 2025
@lightninglabs-deploy
Copy link

@GeorgeTsagk: review reminder
@ffranr: review reminder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

[feature]: Allow filtering by creation_time_unix_seconds in AddrReceives
3 participants