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

batcher: add batchSubmitter.checkExpectedProgress #12430

Merged
merged 6 commits into from
Nov 19, 2024

Conversation

geoknee
Copy link
Contributor

@geoknee geoknee commented Oct 11, 2024

towards #12124

@geoknee geoknee changed the title implement batchSubmitter.checkExpectedProgress batcher: batchSubmitter.checkExpectedProgress Oct 11, 2024
@geoknee geoknee added this to the Holocene: Derivation milestone Oct 11, 2024
Copy link
Contributor

semgrep-app bot commented Oct 11, 2024

Semgrep found 1 err-todo finding:

  • op-program/client/l2/engineapi/l2_engine_api.go

TODO in error handling code

Ignore this finding from err-todo.

op-batcher/batcher/driver.go Outdated Show resolved Hide resolved
Copy link
Contributor

semgrep-app bot commented Oct 18, 2024

Semgrep found 3 sol-style-require-reason findings:

require() must include a reason string

Ignore this finding from sol-style-require-reason.

Semgrep found 6 sol-style-input-arg-fmt findings:

Inputs to functions must be prepended with an underscore (_)

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

Semgrep found 4 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 math-random-used finding:

  • op-supervisor/supervisor/backend/source/head_monitor_test.go

Do not use math/rand. Use crypto/rand instead.

Ignore this finding from math-random-used.

Semgrep found 1 marshal-json-pointer-receiver finding:

  • op-supervisor/supervisor/backend/db/heads/types.go

MarshalJSON with a pointer receiver has surprising results: golang/go#22967

Ignore this finding from marshal-json-pointer-receiver.

Semgrep found 1 err-nil-check finding:

superfluous nil err check before return

Ignore this finding from err-nil-check.

@geoknee geoknee linked an issue Oct 30, 2024 that may be closed by this pull request
@geoknee geoknee marked this pull request as ready for review November 12, 2024 22:44
@geoknee geoknee requested review from a team as code owners November 12, 2024 22:44
@geoknee geoknee requested review from protolambda and removed request for a team November 12, 2024 22:44
@geoknee geoknee added the A-op-batcher Area: op-batcher label Nov 12, 2024
@sebastianst sebastianst requested review from sebastianst and removed request for protolambda November 18, 2024 09:21
op-batcher/batcher/driver.go Outdated Show resolved Hide resolved
op-batcher/batcher/driver.go Outdated Show resolved Hide resolved
op-batcher/flags/flags.go Outdated Show resolved Hide resolved
op-batcher/batcher/driver.go Outdated Show resolved Hide resolved
@geoknee geoknee force-pushed the gk/batcher-node-progress branch from fbbf8e4 to d526e42 Compare November 18, 2024 11:27
Copy link
Contributor

semgrep-app bot commented Nov 18, 2024

Semgrep found 7 sol-style-require-reason findings:

require() must include a reason string

Ignore this finding from sol-style-require-reason.

Semgrep found 2 sol-style-notice-over-dev-natspec findings:

  • packages/contracts-bedrock/src/cannon/interfaces/IPreimageOracle.sol
  • packages/contracts-bedrock/scripts/autogen/SemverLock.s.sol

Prefer @notice over @dev in natspec comments

Ignore this finding from sol-style-notice-over-dev-natspec.

Semgrep found 11 sol-style-input-arg-fmt findings:

Inputs to functions must be prepended with an underscore (_)

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

Semgrep found 19 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 ban_non_wraparound_modifiers finding:

  • packages/contracts-bedrock/src/L1/DelayedVetoable.sol

Modifiers that don't do something before and after execution are banned.

Ignore this finding from ban_non_wraparound_modifiers.

Semgrep found 1 no-direct-write-to-responsewriter finding:

  • op-challenger/game/fault/trace/prestates/multi_test.go

Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'.

Ignore this finding from no-direct-write-to-responsewriter.

Semgrep found 1 math-random-used finding:

  • op-e2e/system/conductor/sequencer_failover_setup.go

Do not use math/rand. Use crypto/rand instead.

Ignore this finding from math-random-used.

Semgrep found 1 no-direct-write-to-responsewriter-taint finding:

  • op-challenger/game/fault/trace/prestates/multi_test.go

Untrusted input could be used to tamper with a web page rendering, which can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. For more information, see: Go XSS prevention.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>op-challenger/game/fault/trace/prestates/multi_test.go</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/ethereum-optimism/optimism/blob/3df8d166daaea9e96139c050c390244192766239/op-challenger/game/fault/trace/prestates/multi_test.go#L172 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 172] r.URL</a>"]
        end
        %% Intermediate

        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/ethereum-optimism/optimism/blob/3df8d166daaea9e96139c050c390244192766239/op-challenger/game/fault/trace/prestates/multi_test.go#L172 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 172] w.Write([]byte(r.URL.Path))</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    File0:::invis

    %% Connections

    Source --> Sink

Loading
Ignore this finding from no-direct-write-to-responsewriter-taint.

Semgrep found 5 sprintf-host-port findings:

use net.JoinHostPort instead of fmt.Sprintf(localhost, c.consensusPort)

Ignore this finding from sprintf-host-port.

@geoknee geoknee force-pushed the gk/batcher-node-progress-12124 branch from 3df8d16 to 055e96e Compare November 18, 2024 17:28
@geoknee geoknee changed the title batcher: batchSubmitter.checkExpectedProgress batcher: add batchSubmitter.checkExpectedProgress Nov 19, 2024
Base automatically changed from gk/batcher-node-progress to develop November 19, 2024 10:41
@geoknee geoknee force-pushed the gk/batcher-node-progress-12124 branch from b2ccead to a2ff417 Compare November 19, 2024 13:56
@sebastianst sebastianst added this pull request to the merge queue Nov 19, 2024
Merged via the queue into develop with commit 910c9ad Nov 19, 2024
47 of 49 checks passed
@sebastianst sebastianst deleted the gk/batcher-node-progress-12124 branch November 19, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-batcher Area: op-batcher
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Holocene-D: op-batcher: Periodically check sync status
3 participants