Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for measures to LocalTxMonitor #1191

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fraser-iohk
Copy link
Contributor

@fraser-iohk fraser-iohk commented Jul 26, 2024

Description

This PR fixes #1178 and builds on #1175 by adding support for arbitrary measures to the LocalTxMonitor server in ouroboros-consensus. Relevant changes to ouroboros-network are required to build these changes, since the LocalTxMonitor protocol has been changed to add a new GetMeasures message.

Remaining work required before this can be merged:

  • Consolidate TxLimits #1175 needs to be merged
  • corresponding ouroboros-network PR needs to be merged
  • version change needs to be implemented somewhere
  • clean up the commit history
  • deal with fromByteSize being very likely to silently overflow the new numeric type

@nfrisby nfrisby force-pushed the nfrisby/consolidate-txlimits branch 4 times, most recently from f15f603 to a7bd1c5 Compare August 28, 2024 18:07
@fraser-iohk fraser-iohk force-pushed the fraser-iohk/localtxmonitor-measures branch from 16e7267 to 159d33f Compare September 3, 2024 12:24
@nfrisby nfrisby force-pushed the nfrisby/consolidate-txlimits branch 6 times, most recently from 6ad371d to 9c022f3 Compare September 4, 2024 13:40
Base automatically changed from nfrisby/consolidate-txlimits to main September 4, 2024 15:26
@fraser-iohk fraser-iohk force-pushed the fraser-iohk/localtxmonitor-measures branch 4 times, most recently from 2cc7f85 to b1a95e9 Compare February 12, 2025 12:06
add `fromByteSize :: Num a => ByteSize -> a`, with a WARNING that it will likely explode due to overflow

add TxMeasureMetrics

{Semigroup, Monoid} instances for {AlonzoMeasure, ConwayMeasure}

add TxMeasureMetrics class and instances

ByteSize -> TxMeasure blk in LocalTxMonitor.Server

respond with TxMeasureMetrics info inside a map of measures

stylish

merge changes from nick's branch

add patterns for MeasureName constructors that are no longer provided in network
@fraser-iohk fraser-iohk force-pushed the fraser-iohk/localtxmonitor-measures branch from df3eac7 to 06161c5 Compare February 13, 2025 12:09
@fraser-iohk fraser-iohk marked this pull request as ready for review February 13, 2025 12:12
@@ -24,3 +24,4 @@ nodeToClientVersionToQueryVersion x = case x of
NodeToClientV_17 -> QueryVersion2
NodeToClientV_18 -> QueryVersion2
NodeToClientV_19 -> QueryVersion2
NodeToClientV_20 -> QueryVersion2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I introduced a new query in #1373 that should make use of NodeToClientV_20 too. Just FYI.

@fraser-iohk fraser-iohk force-pushed the fraser-iohk/localtxmonitor-measures branch from 06161c5 to b05cacf Compare February 13, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enrich LocalTxMonitor to report other tx size dimensions
2 participants