Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Filecoin.StateVMCirculatingSupplyInternal #4080

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

elmattic
Copy link
Contributor

@elmattic elmattic commented Mar 19, 2024

Summary of changes

Our get_fil_vested function returned an incorrect amount compared to Lotus, leading to the failure of this RPC method on calibnet.

The get_fil_vested uses the Liftoff upgrade height in its computation, but height 0 was taken instead of -5.
This is likely a regression coming from PR (#3950).

Changes introduced in this pull request:

  • Add back Liftoff entry in calibnet schedule
$ RUST_LOG=forest_filecoin::rpc_client=debug ./target/debug/forest-tool api compare --lotus /ip4/127.0.0.1/tcp/1234/http --forest /ip4/127.0.0.1/tcp/2345/http forest_snapshot_calibnet_2024-03-18_height_1448006.forest.car.zst --filter StateVMCirculatingSupplyInternal -n 1
2024-03-19T12:18:47.742155Z DEBUG forest_filecoin::rpc_client: Using JSON-RPC v2 HTTP URL: http://127.0.0.1:2345/rpc/v0
2024-03-19T12:18:47.783726Z DEBUG forest_filecoin::rpc_client: Response: Ok(Object {"FilBurnt": String("20555702562594323948168455"), "FilCirculating": String("0"), "FilLocked": String("4706597217484266841020906"), "FilMined": String("43307448964516467687004662"), "FilReserveDisbursed": String("-588918721553697398377127137"), "FilVested": String("233968326957429128619273255")})
2024-03-19T12:18:47.784084Z DEBUG forest_filecoin::rpc_client: Using JSON-RPC v2 HTTP URL: http://127.0.0.1:1234/rpc/v0
2024-03-19T12:18:47.789922Z DEBUG forest_filecoin::rpc_client: Response: Ok(Object {"FilBurnt": String("20555702562594323948168455"), "FilCirculating": String("0"), "FilLocked": String("4706597217484266841020906"), "FilMined": String("43307448964516467687004662"), "FilReserveDisbursed": String("-588918721553697398377127137"), "FilVested": String("233968326957429128619273255")})
| RPC Method                                | Forest | Lotus |
|-------------------------------------------|--------|-------|
| Filecoin.StateVMCirculatingSupplyInternal | Valid  | Valid |

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@elmattic elmattic changed the title Add back Liftoff height Fix Filecoin.StateVMCirculatingSupplyInternal Mar 19, 2024
@elmattic elmattic marked this pull request as ready for review March 19, 2024 14:44
@elmattic elmattic requested a review from a team as a code owner March 19, 2024 14:44
@elmattic elmattic requested review from ruseinov and sudo-shashank and removed request for a team March 19, 2024 14:44
@aatifsyed aatifsyed added this pull request to the merge queue Mar 19, 2024
Merged via the queue into main with commit fb2734d Mar 19, 2024
32 checks passed
@aatifsyed aatifsyed deleted the elmattic/fix-state-vm-circulating-supply-internal branch March 19, 2024 15:21
@elmattic elmattic mentioned this pull request Mar 21, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants