feat: Support latest Synapse SDK in localnet scenarios#107
Open
feat: Support latest Synapse SDK in localnet scenarios#107
Conversation
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates foc-devnet localnet behavior to be compatible with the latest synapse-sdk by aligning the default filecoin-services revision and adding a localnet deployment workaround for the updated PDPVerifier ABI, while also fixing CI to honor caller-provided init flags.
Changes:
- Bump the default
filecoin-servicessource tov1.2.0viaGitTag. - Forward reusable workflow
init_flagsintofoc-devnet initin CI. - Add a predeploy path in the FOC deployer flow to satisfy the
v1.2.0PDPVerifierconstructor dependency shape before running the upstream deployment script.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/config.rs |
Switch default filecoin-services location from pinned commit to v1.2.0 tag. |
src/commands/start/foc_deployer/mod.rs |
Add localnet predeploy logic for the updated PDPVerifier ABI dependencies before running the upstream deploy script. |
.github/workflows/ci_run.yml |
Pass inputs.init_flags through to ./foc-devnet init in both cached and non-cached paths. |
| exit 1 | ||
| fi | ||
| fi | ||
|
|
Comment on lines
+133
to
+137
| # filecoin-services v1.2.0 added three PDPVerifier constructor arguments, but | ||
| # warm-storage-deploy-all.sh still deploys it with only the initializer version. | ||
| # Predeploy the dependencies for that ABI shape and let the upstream script reuse | ||
| # the exported addresses. | ||
| PDP_CONSTRUCTOR_INPUTS="$(jq '[.[] | select(.type == "constructor") | .inputs[]] | length' abi/PDPVerifier.abi.json)" |
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
filecoin-servicestov1.2.0so localnet deploys the FWSS StateView pagination ABI expected by latestsynapse-sdk.init_flagsthrough tofoc-devnet init, so nightly stability/frontier lanes actually use their configured source revisions.v1.2.0PDPVerifier ABI: predeployFilecoinPayV1and the four-argPDPVerifierimplementation, then letwarm-storage-deploy-all.shreuse those addresses.Context
Latest
synapse-sdkcalls paginated FWSS StateView methods such asgetClientDataSets(address,uint256,uint256). The old defaultfilecoin-servicescommit only exposesgetClientDataSets(address), which caused the scenario failure before upload started.Moving to
filecoin-services v1.2.0exposed a second localnet startup issue: that revision has aPDPVerifierABI with four constructor args, butwarm-storage-deploy-all.shstill deploysPDPVerifierwith only the initializer counter.foc-devnetnow detects that ABI shape and supplies the missing USDFC/payment constructor dependencies before running the upstream script.Verification
cargo fmt --checkcargo test --all-targets --all-featurescargo build./target/debug/foc-devnet version --notty | rg 'filecoin-services|foc-devnet'lintcargo-testfoc-devnet-test / foc-start-test