optimism icon indicating copy to clipboard operation
optimism copied to clipboard

batcher refactor: flatten out go routines

Open geoknee opened this issue 1 year ago • 2 comments

This is a refactor to try and make the two goroutines spawned by the driver equally clear.

  • Names the previously anonymous receiptsLoop
  • Adds some godoc comments about what each loop does
  • Tries to be a little more idiomatic about passing contexts in to functions

geoknee avatar Oct 10 '24 14:10 geoknee

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.

semgrep-app[bot] avatar Oct 11 '24 10:10 semgrep-app[bot]

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: https://github.com/golang/go/issues/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.

semgrep-app[bot] avatar Oct 18 '24 16:10 semgrep-app[bot]

This looks like it needs a rebase now before we can merge it

tynes avatar Nov 18 '24 10:11 tynes

This looks like it needs a rebase now before we can merge it

Yes, I'll do that now.

geoknee avatar Nov 18 '24 11:11 geoknee