-
Notifications
You must be signed in to change notification settings - Fork 0
singular batch from op-node is log without the transaction info
#392
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
Changes from 6 commits
8758aca
c72656e
77f7ecc
4e9484b
8e167f6
52a972f
23c8dd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ import ( | |
| "github.com/ethereum-optimism/optimism/espresso" | ||
|
|
||
| "github.com/ethereum/go-ethereum/common" | ||
| "github.com/ethereum/go-ethereum/core/types" | ||
| "github.com/ethereum/go-ethereum/log" | ||
|
|
||
| "github.com/ethereum-optimism/optimism/op-node/rollup" | ||
|
|
@@ -196,7 +197,18 @@ func (aq *AttributesQueue) NextAttributes(ctx context.Context, parent eth.L2Bloc | |
| } | ||
| aq.batch = batch | ||
| aq.concluding = concluding | ||
| aq.log.Info("singular batch from op-node is ", "batch", aq.batch, "concluding", concluding) | ||
| // Log tx hashes instead of raw bytes, since hashes are compact whereas raw tx bytes can | ||
| // be large and truncated by DataDog. | ||
| txHashes := make([]common.Hash, 0, len(aq.batch.Transactions)) | ||
| for i, rawTx := range aq.batch.Transactions { | ||
| var tx types.Transaction | ||
| if err := tx.UnmarshalBinary(rawTx); err == nil { | ||
| txHashes = append(txHashes, tx.Hash()) | ||
| } else { | ||
| aq.log.Warn("failed to unmarshal transaction", "index", i, "err", err) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could that not spam a lot of logs if there are errors?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wouldn't be too spammy since there would be just one log for each malformed transaction, but on second thought, it doesn't make much sense to log a malformed transaction anyway, so I've removed it! |
||
| } | ||
|
shenkeyao marked this conversation as resolved.
|
||
| } | ||
| aq.batch.LogContext(aq.log).Info("singular batch from op-node", "tx_hashes", txHashes, "concluding", concluding) | ||
|
shenkeyao marked this conversation as resolved.
|
||
| } | ||
|
|
||
| // Actually generate the next attributes | ||
|
|
||
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.
Little nit: we can simplify this comment.
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.
Simplified! 23c8dd0