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

wip(interop) block dependency graph #10044

Closed

Conversation

hamdiallam
Copy link
Contributor

wip on the superchain backend, implementing a block dependency graph used the asynchronously discern between unsafe/cross-unsafe/safe safety labels

unverifiedMessages := deps.unverifiedExecutingMessages[blockRef.Hash]
remainingUnverifiedMessages := make([]Message, 0, len(unverifiedMessages))
for _, msg := range unverifiedMessages {
safety, err := MessageValidity(context.TODO(), msg.Id, msg.Payload, nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider to use well-defined context

Ignore this finding from context-todo.

return fmt.Errorf("block %s does not build on head %s", blockRef.Hash, head)
}

_, txs, err := chain.InfoAndTxsByHash(context.TODO(), blockRef.Hash)
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider to use well-defined context

Ignore this finding from context-todo.

if IsInboxExecutingMessageTx(tx) {
_, id, payload, err := ParseInboxExecuteMessageTxData(tx.Data())
if err != nil {
// TODO: revisit bad txs to the inbox address
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create a GitHub ticket for this TODO.

Ignore this finding from todos_require_linear.

}
}

// TODO: we need references to the safe head for every chain
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create a GitHub ticket for this TODO.

Ignore this finding from todos_require_linear.

var finalizedL2Timestamp uint64
b.mu.RLock()
finalizedL2Timestamp = b.l2FinalizedBlockRef.Time
b.mu.RUnlock()

// Dependency verification
if id.Timestamp <= finalizedL2Timestamp {
return MessageFinalized, nil
}

// TODO: support for the other safety labels
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create a GitHub ticket for this TODO.

Ignore this finding from todos_require_linear.

if IsInboxExecutingMessageTx(tx) {
_, id, payload, err := ParseInboxExecuteMessageTxData(tx.Data())
if err != nil {
// TODO: revisit bad txs to the inbox address
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO in error handling code

Ignore this finding from err-todo.

Copy link
Contributor

semgrep-app bot commented Apr 4, 2024

Semgrep found 1 sol-style-return-arg-fmt finding:

  • packages/contracts-bedrock/src/libraries/Encoding.sol

Named return arguments to functions must be appended with an underscore (_)

Ignore this finding from sol-style-return-arg-fmt.

Semgrep found 8 golang_fmt_errorf_no_params findings:

No fmt.Errorf invocations without fmt arguments allowed

Ignore this finding from golang_fmt_errorf_no_params.

Semgrep found 1 iterate-over-empty-map finding:

Iteration over a possibly empty map Kinds. This is likely a bug or redundant code

Ignore this finding from iterate-over-empty-map.

Semgrep found 1 todos_require_linear finding:

Please create a GitHub ticket for this TODO.

Ignore this finding from todos_require_linear.

Copy link
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Apr 19, 2024
@github-actions github-actions bot closed this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant