Skip to content

feat(api)!: expose StateGetNetworkParams in Lotus Gateway API and remove SupportedProofTypes#12881

Merged
rjan90 merged 3 commits intomasterfrom
phi/remove-SupportedProofTypes
Feb 10, 2025
Merged

feat(api)!: expose StateGetNetworkParams in Lotus Gateway API and remove SupportedProofTypes#12881
rjan90 merged 3 commits intomasterfrom
phi/remove-SupportedProofTypes

Conversation

@rjan90
Copy link
Copy Markdown
Contributor

@rjan90 rjan90 commented Feb 7, 2025

Related Issues

Resolves: #12873, #12862, #11996

Proposed Changes

  • Remove SupportedProofTypes from StateGetNetworkParams. This field has been overlooked multiple times during proof type updates and doesn't match the FVM's actual supported proofs
  • Expose StateGetNetworkParams in Lotus Gateway API

Additional Info

Before:

curl --silent -X POST -H "Content-Type: application/json" \
>              --data '{"jsonrpc":"2.0","id":2,"method":"Filecoin.StateGetNetworkParams","param":"null"}' \
>              "http://127.0.0.1:34421/rpc/v0"
{"id":2,"jsonrpc":"2.0","result":{"NetworkName":"mainnet","BlockDelaySecs":30,"ConsensusMinerMinPower":"10995116277760","SupportedProofTypes":[3,4],"PreCommitChallengeDelay":150,"ForkUpgradeParams":{"UpgradeSmokeHeight":51000,"UpgradeBreezeHeight":41280,"UpgradeIgnitionHeight":94000,"UpgradeLiftoffHeight":148888,"UpgradeAssemblyHeight":138720,"UpgradeRefuelHeight":130800,"UpgradeTapeHeight":140760,"UpgradeKumquatHeight":170000,"BreezeGasTampingDuration":120,"UpgradeCalicoHeight":265200,"UpgradePersianHeight":272400,"UpgradeOrangeHeight":336458,"UpgradeClausHeight":343200,"UpgradeTrustHeight":550321,"UpgradeNorwegianHeight":665280,"UpgradeTurboHeight":712320,"UpgradeHyperdriveHeight":892800,"UpgradeChocolateHeight":1231620,"UpgradeOhSnapHeight":1594680,"UpgradeSkyrHeight":1960320,"UpgradeSharkHeight":2383680,"UpgradeHyggeHeight":2683348,"UpgradeLightningHeight":2809800,"UpgradeThunderHeight":2870280,"UpgradeWatermelonHeight":3469380,"UpgradeDragonHeight":3855360,"UpgradePhoenixHeight":3855480,"UpgradeWaffleHeight":4154640,"UpgradeTuktukHeight":4461240,"UpgradeTeepHeight":9999999999},"Eip155ChainID":314}}

After:

curl --silent -X POST -H "Content-Type: application/json" \
>              --data '{"jsonrpc":"2.0","id":2,"method":"Filecoin.StateGetNetworkParams","param":"null"}' \
>              "http://127.0.0.1:34421/rpc/v0"
{"id":2,"jsonrpc":"2.0","result":{"NetworkName":"mainnet","BlockDelaySecs":30,"ConsensusMinerMinPower":"10995116277760","PreCommitChallengeDelay":150,"ForkUpgradeParams":{"UpgradeSmokeHeight":51000,"UpgradeBreezeHeight":41280,"UpgradeIgnitionHeight":94000,"UpgradeLiftoffHeight":148888,"UpgradeAssemblyHeight":138720,"UpgradeRefuelHeight":130800,"UpgradeTapeHeight":140760,"UpgradeKumquatHeight":170000,"BreezeGasTampingDuration":120,"UpgradeCalicoHeight":265200,"UpgradePersianHeight":272400,"UpgradeOrangeHeight":336458,"UpgradeClausHeight":343200,"UpgradeTrustHeight":550321,"UpgradeNorwegianHeight":665280,"UpgradeTurboHeight":712320,"UpgradeHyperdriveHeight":892800,"UpgradeChocolateHeight":1231620,"UpgradeOhSnapHeight":1594680,"UpgradeSkyrHeight":1960320,"UpgradeSharkHeight":2383680,"UpgradeHyggeHeight":2683348,"UpgradeLightningHeight":2809800,"UpgradeThunderHeight":2870280,"UpgradeWatermelonHeight":3469380,"UpgradeDragonHeight":3855360,"UpgradePhoenixHeight":3855480,"UpgradeWaffleHeight":4154640,"UpgradeTuktukHeight":4461240,"UpgradeTeepHeight":9999999999},"Eip155ChainID":314}}

Checklist

Before you mark the PR ready for review, please make sure that:

Breaking change: The SupportedProofTypes field has been removed from StateGetNetworkParams. This field was unreliable as it didn't match  the FVM's actual supported proofs and was frequently overlooked during proof type updates
@rjan90 rjan90 requested a review from rvagg February 7, 2025 15:16
feat: expose StateGetNetworkParams in Lotus Gateway API
chore: update changelog
@rjan90 rjan90 force-pushed the phi/remove-SupportedProofTypes branch from a283ae2 to 9580bf3 Compare February 7, 2025 15:24
Copy link
Copy Markdown
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 decisive, ship it

@rjan90 rjan90 merged commit b1376cf into master Feb 10, 2025
@rjan90 rjan90 deleted the phi/remove-SupportedProofTypes branch February 10, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ☑️ Done (Archive)

Development

Successfully merging this pull request may close these issues.

Expose StateGetNetworkParams in Lotus Gateway API to enable verifying the chain

2 participants