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

Add funds that have left FilReserve to circ supply #4160

Merged
merged 2 commits into from Oct 6, 2020

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented Oct 5, 2020

Yields the following numbers at height 130000 (after the v2 actors upgrade)

FilVested 13429543.811411839397160646 FIL
FilCirculating 5961737.242508608156582553

@arajasek arajasek requested a review from zixuanzh October 5, 2020 01:54
@arajasek arajasek mentioned this pull request Oct 5, 2020
21 tasks
@arajasek arajasek force-pushed the asr/reserve-funds-cric-supply branch from 8761e24 to caf7c18 Compare October 5, 2020 08:01
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Looks good, but @zixuanzh should approve too

@@ -55,6 +55,7 @@ var (

FilBase uint64 = 2_000_000_000
FilAllocStorageMining uint64 = 1_400_000_000
FilReserved uint64 = 1_400_000_000
Copy link

Choose a reason for hiding this comment

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

Lets use 300_000_000 for testing too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

// continue to use preIgnitionGenInfos, nothing changed at the Ignition epoch
vf = big.Add(vf, sm.preIgnitionGenInfos.genesisMarketFunds)
if height <= build.UpgradeActorsV2Height {
// continue to use preIgnitionGenInfos, nothing changed at the Ignition epoch
Copy link

Choose a reason for hiding this comment

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

Why do we not need to add genesisPledge after Ignition epoch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I might be wrong, but I assumed that these funds will now be accounted for in "what's missing from FilReserve", since that's where they came from originally? Is that not the case?

}

// If money enters the reserve actor, this could lead to a negative term
vf = big.Add(vf, big.Sub(big.NewFromGo(build.InitialFilReserved), ract.Balance))
Copy link

Choose a reason for hiding this comment

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

Let's call this ReserveDisbursed as a separate term.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@arajasek arajasek force-pushed the asr/reserve-funds-cric-supply branch from caf7c18 to f55b18e Compare October 6, 2020 03:55
Copy link

@zixuanzh zixuanzh left a comment

Choose a reason for hiding this comment

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

one last minor comment, lgtm

}

// If money enters the reserve actor, this could lead to a negative term
return big.Sub(big.NewFromGo(build.InitialFilReserved), ract.Balance), nil
Copy link

Choose a reason for hiding this comment

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

It is unclear which variable (there are two of the same name) InitialFilReserved refers to in build, lets make sure we are using the right precision.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's using the right one (the other one will be used for testground).

@arajasek
Copy link
Contributor Author

arajasek commented Oct 6, 2020

Good to be merged into next after #3936 lands

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Still looks good

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Breaks consensus on master, rt.TotalFilCircSupply() returns >0 where it used to return 0

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

(fixed with the last commit)

Base automatically changed from asr/spec-v1 to next October 6, 2020 21:34
@arajasek arajasek merged commit 282c99b into next Oct 6, 2020
@arajasek arajasek deleted the asr/reserve-funds-cric-supply branch October 6, 2020 21:39
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

3 participants