Conversation
|
I will add a test for the eth_client by moving money between wallets and back after a failover (how many lotus nodes, stop). |
|
Reiers testing: |
magik6k
left a comment
There was a problem hiding this comment.
Few minor things to address, looks really great!
There was a problem hiding this comment.
Definitely must do some manual testing on this
There was a problem hiding this comment.
I have no idea how, so review itests/eth_test.go
There was a problem hiding this comment.
This just adds a 'on new insert' handling? Any issue this is fixing?
There was a problem hiding this comment.
AI talked me into something that i should not have been. It thought some test failure was related to this AFTER trigger needing to be a BEFORE, then the test cleaned-up, but I think that line of thinking was garbage: file deleted
Reiers
left a comment
There was a problem hiding this comment.
Nil pointer crash when a config layer omits a *Dynamic[T] field (e.g. ChainApiInfo absent from a layer). Set() and Get() dereference the receiver without nil checks, but GetWithoutLock() already has one.
Startup panic:
panic: runtime error: invalid memory address or nil pointer dereference
config.(*Dynamic[...]).Set()
deps.GetFullNodeAPIV1Curio.func2()
Two suggestions below. SetWithoutLock() and OnChange() need the same guard but aren't in this diff.
| } | ||
|
|
||
| // It locks dynamicLocker, unless we're already in an updating context. | ||
| func (d *Dynamic[T]) Set(value T) { |
There was a problem hiding this comment.
| func (d *Dynamic[T]) Set(value T) { | |
| func (d *Dynamic[T]) Set(value T) { | |
| if d == nil { | |
| return | |
| } |
| @@ -69,19 +80,23 @@ func (d *Dynamic[T]) SetWithoutLock(value T) { | |||
| func (d *Dynamic[T]) Get() T { | |||
There was a problem hiding this comment.
| func (d *Dynamic[T]) Get() T { | |
| func (d *Dynamic[T]) Get() T { | |
| if d == nil { | |
| var zero T | |
| return zero | |
| } |
Reiers
left a comment
There was a problem hiding this comment.
One more dead-code bug from the Dynamic conversion.
| if baseCfg.Apis.ChainApiInfo == nil { | ||
| baseCfg.Apis.ChainApiInfo = append(baseCfg.Apis.ChainApiInfo, chainApiInfo) | ||
| baseCfg.Apis.ChainApiInfo.Set(append(baseCfg.Apis.ChainApiInfo.Get(), chainApiInfo)) |
There was a problem hiding this comment.
Pointer is never nil after NewDynamic([]string{}). Matches the fix already at line 312.
| if baseCfg.Apis.ChainApiInfo == nil { | |
| baseCfg.Apis.ChainApiInfo = append(baseCfg.Apis.ChainApiInfo, chainApiInfo) | |
| baseCfg.Apis.ChainApiInfo.Set(append(baseCfg.Apis.ChainApiInfo.Get(), chainApiInfo)) | |
| if len(baseCfg.Apis.ChainApiInfo.Get()) == 0 { | |
| baseCfg.Apis.ChainApiInfo.Set(append(baseCfg.Apis.ChainApiInfo.Get(), chainApiInfo)) |



This builds atop PR #710 (which implemented P1 items) to implement P2 & P3 items of the following punchlist.
Logic fixes: forgot 'base' changes! Atomic where better.
New component: working with Dynamic[struct{...}] required a new approach.
Misc_Included_Commits
Better testing separation by guaranteeing different databases used.
SQL:
PunchList
The remaining items are P4-5 and "No need"
Subsystems
Fees - all P2, easy, done
Addresses - all P1, hard, done
Proving - all, P4, easy
Http - no need
Market
-- MK12 - all here, P3, easy-ish, done
-- MK2, P3, done
Ingest - P1, done
Seal - No need
APIs->Chain - P2, medium-hard, done
Alerting - P3, easy, done
Batching - P2, easy, done
todo: startup fails?