• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-transaction-service / 17238630797
91%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 26 Aug 2025 12:52PM UTC
Jobs 1
Files 210
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Aug 2025 12:48PM UTC coverage: 94.52% (-0.005%) from 94.525%
17238630797

push

github

Uxio0
Optimize out of order query

- Use `(_from, timestamp)` index (already present for ether transfers) and add `id` for `Index Only Scan`
- Use `MAX` instead of sorting and getting the first element, better for the planner.

Old query is quite fast as there are not unprocessed values in the database

sql```
EXPLAIN ANALYZE
SELECT 1 AS a
FROM history_internaltxdecoded
INNER JOIN history_internaltx ON (history_internaltxdecoded.internal_tx_id = history_internaltx.id)
WHERE (history_internaltx._from = '\x<a class=hub.com/safe-global/safe-transaction-service/commit/f00040a635a907ac93924f2d8c36b3e87afef000">f00040a63' :: BYTEA
       AND NOT history_internaltxdecoded.processed
       AND history_internaltx.block_number <
         (SELECT U1. block_number
          FROM history_internaltxdecoded U0
          INNER JOIN history_internaltx U1 ON (U0. internal_tx_id = U1. id)
          WHERE (U1. _from = '\xf00040a635a907ac93924f2d8c36b3e87afef000' :: BYTEA
                 AND U0. processed)
          ORDER BY U1. block_number DESC
          LIMIT 1))
LIMIT 1

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=21170.57..25853.21 rows=1 width=4) (actual time=0.193..0.194 rows=0 loops=1)
   InitPlan 1 (returns $2)
     ->  Limit  (cost=20892.07..21169.61 rows=1 width=4) (never executed)
           ->  Nested Loop  (cost=20892.07..62523.82 rows=150 width=4) (never executed)
                 ->  Gather Merge  (cost=20891.64..21477.35 rows=5029 width=12) (never executed)
                       Workers Planned: 2
                       Workers Launched: 0
                       ->  Sort  (cost=19891.61..19896.85 rows=2095 width=12) (never executed)
                             Sort Key: u1.block_number DESC
                             ->  Parallel Bitmap Heap Scan on history_internaltx u1  (cost=67.54..19776.05 rows=2095 width=12) (never executed)
                                   Recheck Cond: (_from = '... (continued)

2 of 2 new or added lines in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

16351 of 17299 relevant lines covered (94.52%)

0.95 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.82
-0.1% safe_transaction_service/history/models.py
Jobs
ID Job ID Ran Files Coverage
1 17238630797.1 26 Aug 2025 12:52PM UTC 210
94.52
GitHub Action Run
Source Files on build 17238630797
  • Tree
  • List 210
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17238630797
  • 6985857a on github
  • Prev Build on v5.30.0 (#17238098027)
  • Next Build on main (#17238651525)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc