-
Notifications
You must be signed in to change notification settings - Fork 88
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
LocalTxMonitor: Add support for GetMeasures #4918
base: main
Are you sure you want to change the base?
Conversation
d45e534
to
7398881
Compare
ouroboros-network-protocols/src/Ouroboros/Network/Protocol/LocalTxMonitor/Type.hs
Outdated
Show resolved
Hide resolved
9488451
to
d6eb7bb
Compare
d6eb7bb
to
0a00293
Compare
1007422
to
e415888
Compare
ouroboros-network-protocols/src/Ouroboros/Network/Protocol/LocalTxMonitor/Codec.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-protocols/src/Ouroboros/Network/Protocol/LocalTxMonitor/Codec.hs
Show resolved
Hide resolved
ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalTxMonitor/Examples.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-protocols/src/Ouroboros/Network/Protocol/LocalTxMonitor/Type.hs
Outdated
Show resolved
Hide resolved
e415888
to
48b514c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the function codecLocalTxMonitorId
needs to be updated too. It doesn't handle:
MsgGetMeasures
,MsgReplyGetMeasures
,MsgGetSizes
, andMsgReplyGetSizes
.
Maybe we are missing a test for it, or we don't generate these messages in the appropriate arbitrary instance.
Please also update the network-spec
doc in ./docs/network-specs/miniprotocols.tex
. I added Local Tx-Monitor there recently (you might need to rebase on top of the main branch).
ouroboros-network-protocols/src/Ouroboros/Network/Protocol/LocalTxMonitor/Codec.hs
Show resolved
Hide resolved
76cb305
to
a342b40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fb73a86
to
788630d
Compare
- adds a new pair of LocalTxMonitor messages: GetMeasures and ReplyGetMeasures - add a property test `codecIdM` for `codecLocalTxMonitorId` - "parametrised" -> "parameterised"
788630d
to
a859c04
Compare
80d9606
to
a859c04
Compare
Description
This PR adds a new message to
LocalTxMonitor
,GetMeasures
, which is similar toGetSize
(returning the current mempool transaction count, the size of those transactions, and the total mempool capacity), but returns information about several other metrics in addition to the byte size and capacity of the mempool.GetMeasures
currently returns size and capacity information for transaction byte size, ledger's execution units (both their memory and execution steps), and the reference scripts size, but can easily be extended to support any new metric types in future while remaining backwards compatible.This change works towards ouroboros-consensus#1178, and has a dependent PR in ouroboros-consensus
Checklist
Quality
Maintenance
ouroboros-network
project.