Conversation
- Add PDPConfig struct with batch size, gas cap, confirmation depth, and polling interval - Wire config into PDPTracker constructor and use polling interval in tracking loop - Add start/stop logging and proof set status change tracking - Add proof set count metrics per run - Add CLI flags: --pdp-batch-size (default 100), --pdp-confirmation-depth (default 5), --pdp-poll-interval (default 30s) - Add config validation with tests - Update all PDPTracker call sites to use new config This is independent config/ops layer work that doesn't touch pdpclient.go integration.
62a59e1 to
fbda561
Compare
|
hmm so the 30s loop made me think... are we correctly WithTimeout'ing eth rpc calls? another issue that came to mind is consistency -- the single pass scan-and-pick is better than per wallet approach for this already but worth thinking about both make me wonder if a getlogs/event driven approach out the gate will save us headaches down the road |
|
so events + multicall to hydrate as needed + cursor in db, something like that? FEVM should support all of these features so replicating the approach from eth L2 indexers might save us a lot of pain what do you think? aside from that the PR looks OK but the above questions do come to the fore at this point even with 1000 proofsets (i.e. 1TiB of data) this is already a crazy number of rpc calls as it stands, single pass will take ~10 mins side note: in a sense this is not our job (indexer needs to be core infra not on client) but the napkin math does not work out |
parkan
left a comment
There was a problem hiding this comment.
approved with the understanding that this is V0 POC and an event-driven approach will follow 👍
|
Thanks all. Per discussion, we are treating the current scan loop as PoC behavior and will follow immediately with a scalable ingestion path. Filed follow-up issue: #615 Plan is events + multicall hydration + durable DB cursor, while keeping current deal update semantics stable. |
Summary
This PR adds the configuration and operations layer for the PDP tracker. This work is independent of the pdpclient.go integration (PR #612) and can proceed in parallel.
Changes
Configuration
PDPConfigstruct inservice/pdptracker/config.gowith:BatchSize— max pieces per AddRoots transactionGasCap— gas limit for PDP transactionsConfirmationDepth— blocks to wait for confirmationPollingInterval— tx status polling frequencyTracker Updates
PDPTrackerto acceptPDPConfigin constructorCLI
cmd/run/pdptracker.go:--pdp-batch-size(default 100)--pdp-confirmation-depth(default 5)--pdp-poll-interval(default 30s)--intervalflagTesting
All tests pass: