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

Make virtual gas real #2343

Merged
merged 7 commits into from
Jul 15, 2020
Merged

Make virtual gas real #2343

merged 7 commits into from
Jul 15, 2020

Conversation

Kubuxu
Copy link
Contributor

@Kubuxu Kubuxu commented Jul 9, 2020

TODO:

  • Set correct GasLimit values for our messages
    • Estimate GasLimit automatically in MpoolPushMessage if GasLimit == 0
      • Fix StateCall to esptimate correct gas value

@@ -30,6 +30,10 @@ var EmptyObjectCid cid.Cid

// TryCreateAccountActor creates account actors from only BLS/SECP256K1 addresses.
func TryCreateAccountActor(rt *Runtime, addr address.Address) (*types.Actor, aerrors.ActorError) {
if err := rt.chargeGasSafe(PricelistByEpoch(rt.height).OnCreateActor()); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This reorg is safe because the only way we would end up a different amount of gas is if something failed, and then we would end up charging all the gas.

@Kubuxu Kubuxu changed the base branch from master to next July 10, 2020 13:14
@Kubuxu Kubuxu changed the title Reorg some gas charges Make virtual gas real Jul 10, 2020
@Kubuxu Kubuxu requested a review from magik6k July 10, 2020 13:17
@Kubuxu
Copy link
Contributor Author

Kubuxu commented Jul 10, 2020

This breaks chain val hard.

Jakub Sztandera added 5 commits July 15, 2020 20:01
Signed-off-by: Jakub Sztandera <[email protected]>
Signed-off-by: Jakub Sztandera <[email protected]>
Signed-off-by: Jakub Sztandera <[email protected]>
Signed-off-by: Jakub Sztandera <[email protected]>
Signed-off-by: Jakub Sztandera <[email protected]>
Jakub Sztandera added 2 commits July 15, 2020 21:21
Signed-off-by: Jakub Sztandera <[email protected]>
@Kubuxu
Copy link
Contributor Author

Kubuxu commented Jul 15, 2020

Needs: filecoin-project/storage-fsm#50

@Kubuxu Kubuxu requested a review from arajasek July 15, 2020 20:13
@magik6k magik6k merged commit 4553af5 into next Jul 15, 2020
@magik6k magik6k deleted the feat/more-gas branch July 15, 2020 21:09
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.

2 participants