pdp: resolve provider EVM via on-chain fallback#677
Closed
Conversation
resolveProviderEVMAddress required a pre-populated actors row whose address was the f410 form of the SP. That row is only populated by GetOrCreateActor when a wallet we control signs for the first time, so PDP schedules targeting any externally-registered SP would fail at deal-pusher time with "failed to resolve actor for provider tXXX". Fall back to Filecoin.StateLookupRobustAddress on cache miss and opportunistically write the resolved row for future runs.
createDataSet on calibnet's PDPVerifier was observed at ~79M gas used, which exceeded the previous 30M limit and caused tx reverts (status 0, no logs, hard to diagnose since FEVM masks OOG as a generic revert). Bump to 200M to leave headroom; excess gas is refunded so over-allocating is cheap. Same constant is used by ProposeDataSetStorageProvider, which benefits from the bump as well.
Collaborator
Author
|
superseded, we are using the curio API instead of direct chain interactions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related fixes for the PDP deal-pusher path, both surfaced during end-to-end testing of FWSS PDP on calibnet against an externally-registered SP.
1. Resolve provider EVM address via on-chain fallback (commit 1)
resolveProviderEVMAddressrequired a pre-populatedactorsrow whose address was the f410 form of the SP. That row is only populated byGetOrCreateActorwhen a wallet we control signs for the first time, so PDP schedules targeting any externally-registered SP would fail at deal-pusher time withfailed to resolve actor for provider tXXX.Fall back to
Filecoin.StateLookupRobustAddresson cache miss and opportunistically write the resolved row for future runs.2. Bump default gas limit to 200M (commit 2)
PDPVerifier.createDataSetwas observed at ~79M gas used on calibnet, exceeding the prior 30M limit. The tx reverted withstatus 0, no logs, and an empty return — FEVM masks OOG as a generic revert, which is hard to diagnose with standard EVM tooling. Bump to 200M for headroom; excess gas is refunded.ProposeDataSetStorageProvideruses the same constant and benefits too.Why this matters
Hit during end-to-end testing of FWSS PDP flow on calibnet against an SP we just registered (
providerId=24onServiceProviderRegistryat0x839e5c99…).Before these patches:
gasUsed ≈ gasLimit.After:
EnsureProofSetandProposeTransfer. The deal record reachesproposedstate (deal_id, schedule_id, set_id all populated), at which point further progress is gated on the receiving Curio node having v1.27.4+ schema migrations — orthogonal to this PR.Test plan
go test ./service/dealpusher/ -run TestResolveProviderEVMAddress— 4 new tests pass on sqlite (cache hit, on-chain fallback w/ caching, on-chain RPC failure, non-delegated rejection)./service/dealpusher/...regression — pass