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

Interop: Integrate for new input flow #12213

Draft
wants to merge 5 commits into
base: interop-inputs-2
Choose a base branch
from

Conversation

axelKingsley
Copy link
Contributor

@axelKingsley axelKingsley commented Sep 30, 2024

Builds from: #12204
The fixes so far are:

  • New APIs not linked to Server ✅
  • Supervisor client was casting the chainID inappropriately ✅
  • Supervisor Backend had no implementation for
    • Update Local Unsafe ✅
    • Update Local Safe ✅
    • Update Finaliazed L1 ✅
    • Unsafe View ✅
    • Safe View ✅
    • Finalized
  • ChainsDB had no implementation for
    • Update Local Unsafe✅
    • Update Local Safe✅
    • Update Finalized✅
    • Unsafe View✅
    • Safe View✅
    • Finalized

Currently Tracking Down:

Incomplete State when calling HeadPointer()

When attempting to get HeadPointers from the State, I see

failed to check unsafe-level view: failed to share unsafe block view View(local: 0x88b33dd0b4f00107715a99f2f5340f17f6a7214f45611248822367485a90f90e:8, cross: 0xf5afaa7bd6b330fce0251d91c2eb58c94ac421e45d6561a676d2e7b9a04886c7:6) (chain 900200): failed to get unsafe view: cannot provide head pointer while state is incomplete"

To address this, I added logging to the error which shows which flags are still needed.

(note: needs is a set of bitmap flags which signal to the iterator state that it is expecting to infer some data

In all cases, it was reported that the CanonicalHash flag was still set.

Investigating CanonicalHash flag, I see it gets triggered for the iterator state from four locations:

  • During infer after a checkpoint
  • During DB Initialization
  • When a new iterator is created with NewIteratorAt
  • During ProcessEntry

To be honest, I don’t really understand why a canonical hash should be flagged during some of these. I’m spending a little time to try to understand better.

In the meantime, to timebox: I figured that if there was a needed canonical hash in the iterator state, it wasn’t so bad and so for now I’m just jumping over that check.

it’s not clear that jumping over this check is the right thing to do, but given that the cause seems to be unnecessary canonicalHash needs, ignoring that error seems to be safe in the moment.

@axelKingsley axelKingsley changed the title Wire in APIs for new input flow Interop: Wire in APIs for new input flow Sep 30, 2024
@axelKingsley axelKingsley changed the title Interop: Wire in APIs for new input flow Interop: Integrate for new input flow Oct 1, 2024
Copy link
Contributor

semgrep-app bot commented Oct 1, 2024

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 3 dangerous-exec-command findings:

Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.

Ignore this finding from dangerous-exec-command.

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.

1 participant