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

Trace transaction requests and replies in txSubmissionOutbound #1688

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

intricate
Copy link
Contributor

@intricate intricate commented Feb 24, 2020

@intricate intricate self-assigned this Feb 24, 2020
@intricate intricate requested a review from mrBliss February 25, 2020 02:15
@intricate intricate marked this pull request as ready for review February 25, 2020 02:15
@mrBliss mrBliss added the consensus issues related to ouroboros-consensus label Feb 25, 2020
data TraceTxSubmissionOutbound txid tx = TraceTxSubmissionOutbound --TODO
data TraceTxSubmissionOutbound txid tx
= TraceTxSubmissionOutboundRecvMsgRequestTxs
![txid]
Copy link
Contributor

Choose a reason for hiding this comment

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

A bang on a list doesn't help that much: just the head of the list is forced to WHNF, not the tail. To be sure the list is forced, you could use forceElemsToWHNF, but I would not bother with that. I'd just leave out the bangs, they give a false impression of what's going on.

It would be more important if the txids are computed lazily, e.g., map txId txs, but that's not the case.

Copy link
Contributor Author

@intricate intricate Feb 25, 2020

Choose a reason for hiding this comment

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

I suppose I've gotten myself into the habit of forcing all fields to WHNF. Of course, as you mentioned, this does not guarantee that the elements of a container are in WHNF, but I've found that it's generally not a bad idea to ensure strictness at the field-level unless laziness would be particularly useful. We also do the same thing for fields of TraceEventMempool.

However, I'm not particularly committed to this idea unless it actually helps to force to WHNF, so I'll remove the bangs and push.

@intricate intricate force-pushed the intricate/txsubout-trace branch from 17dd08b to f12e7c2 Compare February 25, 2020 19:33
@intricate
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 26, 2020

@iohk-bors iohk-bors bot merged commit ba0117e into master Feb 26, 2020
@iohk-bors iohk-bors bot deleted the intricate/txsubout-trace branch February 26, 2020 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus issues related to ouroboros-consensus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants