penumbra-zone / cuiloa

Block explorer for the Penumbra Zone network
https://cuiloa.testnet.penumbra.zone
Apache License 2.0
6 stars 1 forks source link

Helper Views #106

Open ejmg opened 3 weeks ago

ejmg commented 3 weeks ago

Summary

Some of Cuiloa's most important API endpoints rely on very hefty psql queries that can be cleaned up by pulling out common patterns into views.

Description

Aggregating data across transactions and IBC identifiers currently requires heavy self-joining of the cometbft schema used by the cometbft indexer. This results in large sql queries that can be messy and with poor performance. While Penumbra's builtin indexer should significantly improve this situation, it may still be useful to spin out helper views to improve query readability and performance until the builtin indexer lands.