ethereum-optimism / ethereum-optimism/optimism
op-challenger: : invalid memory address or nil pointer dereference
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 145
Description
The may reason is if the L1 is not support the blobBaseFee, it will painc. ? maybe need add some logic.
```
INFO [12-15|10:22:27.608] Resolving claims game=0x258fC01BBab02f9b5fb9FEA90387397C20Cd4E06 numClaims=1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x553572]
goroutine 28 [running]:
math/big.(*Int).Float64(0xc001aa81c0?)
/usr/local/go/src/math/big/int.go:460 +0x12
github.com/ethereum-optimism/optimism/op-service/txmgr/metrics.(*TxMetrics).RecordBlobBaseFee(0xc0003e4270, 0xc001a9a770?)
/home/project/github.com/ethereum-optimism/optimism/op-service/txmgr/metrics/tx_metrics.go:183 +0x1b
github.com/ethereum-optimism/optimism/op-service/txmgr.(*SimpleTxManager).SuggestGasPriceCaps(0xc0003ea6c0, {0x160b7f8?, 0xc001306e70?})
/home/project/github.com/ethereum-optimism/optimism/op-service/txmgr/txmgr.go:945 +0x22d
github.com/ethereum-optimism/optimism/op-service/txmgr.(*SimpleTxManager).craftTx(0xc0003ea6c0, {0x160b7f8, 0xc001306e70}, {{0xc00171e230, 0x44, 0x50}, {0x0, 0x0, 0x0}, 0xc001002368, ...})
/home/project/github.com/ethereum-optimism/optimism/op-service/txmgr/txmgr.go:351 +0x165
github.com/ethereum-optimism/optimism/op-service/txmgr.(*SimpleTxManager).prepare.func1()
/home/project/github.com/ethereum-optimism/optimism/op-service/txmgr/txmgr.go:332 +0x67
github.com/ethereum-optimism/optimism/op-service/retry.Do[...].func1()
/home/project/github.com/ethereum-optimism/optimism/op-service/retry/operation.go:44 +0x22
github.com/ethereum-optimism/optimism/op-service/retry.Do0({0x160b7f8, 0xc001306e70}, 0x1e, {0x16015c0, 0xc0012fb750}, 0xc001283258)
/home/project/github.com/ethereum-optimism/optimism/op-service/retry/operation.go:67 +0x16b
github.com/ethereum-optimism/optimism/op-service/retry.Do[...]({0x160b7f8?, 0xc001306e70?}, 0xc001580b70?, {0x16015c0?, 0xc0012fb750?}, 0x0?)
/home/project/github.com/ethereum-optimism/optimism/op-service/retry/operation.go:47 +0x6e
github.com/ethereum-optimism/optimism/op-service/txmgr.(*SimpleTxManager).prepare(0xc0003ea6c0, {0x160b7f8, 0xc001306e70}, {{0xc00171e230, 0x44, 0x50}, {0x0, 0x0, 0x0}, 0xc001002368, ...})
/home/project/github.com/ethereum-optimism/optimism/op-service/txmgr/txmgr.go:328 +0x110
github.com/ethereum-optimism/optimism/op-service/txmgr.(*SimpleTxManager).SendAsync(0xc0003ea6c0, {0x160b788, 0xc000cdc8c0}, {{0xc00171e230, 0x44, 0x50}, {0x0, 0x0, 0x0}, 0xc001002368, ...}, ...)
/home/project/github.com/ethereum-optimism/optimism/op-service/txmgr/txmgr.go:298 +0x10d
github.com/ethereum-optimism/optimism/op-service/txmgr.(*Queue[...]).Send(0x1614820, 0x0, {{0xc00171e230, 0x44, 0x50}, {0x0, 0x0, 0x0}, 0xc001002368, 0x0, ...}, ...)
/home/project/github.com/ethereum-optimism/optimism/op-service/txmgr/queue.go:83 +0x176
github.com/ethereum-optimism/optimism/op-challenger/sender.(*TxSender).SendAndWaitDetailed(0xc0002d01e0, {0x125dcb1, 0xd}, {0xc000cdc870, 0x1, 0x0?})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/sender/sender.go:39 +0x114
github.com/ethereum-optimism/optimism/op-challenger/sender.(*TxSender).SendAndWaitSimple(0x0?, {0x125dcb1?, 0x0?}, {0xc000cdc870?, 0x0?, 0x0?})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/sender/sender.go:60 +0x2f
github.com/ethereum-optimism/optimism/op-challenger/game/fault/responder.(*FaultResponder).ResolveClaims(0xc000a13db0, {0xc0010c6758, 0x1, 0xc001376080?})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/fault/responder/responder.go:87 +0x26b
github.com/ethereum-optimism/optimism/op-challenger/game/fault.(*Agent).tryResolveClaims(0xc000c366e0, {0x160b788, 0xc00069fcc0})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/fault/agent.go:214 +0x834
github.com/ethereum-optimism/optimism/op-challenger/game/fault.(*Agent).resolveClaims(0xc000c366e0, {0x160b788, 0xc00069fcc0})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/fault/agent.go:226 +0xa5
github.com/ethereum-optimism/optimism/op-challenger/game/fault.(*Agent).tryResolve(0xc000c366e0, {0x160b788, 0xc00069fcc0})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/fault/agent.go:154 +0x26
github.com/ethereum-optimism/optimism/op-challenger/game/fault.(*Agent).Act(0xc000c366e0, {0x160b788, 0xc00069fcc0})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/fault/agent.go:80 +0x4f
github.com/ethereum-optimism/optimism/op-challenger/game/fault.(*GamePlayer).ProgressGame(0xc00072f980, {0x160b788, 0xc00069fcc0})
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/fault/player.go:192 +0x1bb
github.com/ethereum-optimism/optimism/op-challenger/game/scheduler.progressGames({0x160b788, 0xc00069fcc0}, 0xc00068f0a0, 0xc00068f110, 0x0?, 0xc00062c0b0, 0xc00062c0d0)
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/scheduler/worker.go:19 +0xf1
created by github.com/ethereum-optimism/optimism/op-challenger/game/scheduler.(*Scheduler).Start in goroutine 1
/home/project/github.com/ethereum-optimism/optimism/op-challenger/game/scheduler/scheduler.go:80 +0x7b
```
Contributor guide
Research direction
Start with op-service/txmgr/metrics/tx_metrics.go at RecordBlobBaseFee and then inspect SuggestGasPriceCaps in op-service/txmgr/txmgr.go, using the stack trace as the call path. Reproduce the op-challenger claim-resolution flow against an L1 that does not support blobBaseFee. Done means the flow no longer panics and its behavior for the missing fee is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, blockchain
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100