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 gas units more granular #1245

Merged
merged 16 commits into from
Aug 3, 2023
Merged

Make gas units more granular #1245

merged 16 commits into from
Aug 3, 2023

Conversation

jmcardon
Copy link
Member

@jmcardon jmcardon commented Jun 27, 2023

This is a change primarily to our units of gas, wherein 1 Gas = 1000 MilliGas. With our current gas metering, we have 1 Gas = 2500 ns, thus, 1 MilliGas = 2.5 ns.

PR checklist:

  • Test coverage for the proposed changes
  • PR description contains example output from repl interaction or a snippet from unit test output
  • Documentation has been updated if new natives or FV properties have been added. To generate new documentation, issue cabal run tests. If they pass locally, docs are generated.
  • Any changes that could be relevant to users have been recorded in the changelog
  • In case of changes to the Pact trace output (pact -t), make sure pact-lsp is in sync.

Additionally, please justify why you should or should not do the following:

  • Confirm replay/back compat
  • Benchmark regressions
  • (For Kadena engineers) Run integration-tests against a Chainweb built with this version of Pact

Copy link
Contributor

@0xd34df00d 0xd34df00d left a comment

Choose a reason for hiding this comment

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

Just some very minor nits, please feel free to ignore any of them!

@@ -130,7 +130,7 @@ initPureEvalEnv verifyUri = do
initEvalEnv :: LibState -> IO (EvalEnv LibState)
initEvalEnv ls = do
mv <- newMVar ls
gasRef <- newIORef 0
gasRef <- newIORef mempty
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is because it's newtype-wrapped, then ignore this and all related comments.

@jmcardon jmcardon marked this pull request as ready for review July 26, 2023 22:30
@jmcardon jmcardon requested a review from sirlensalot as a code owner July 26, 2023 22:30
Copy link
Member

@emilypi emilypi left a comment

Choose a reason for hiding this comment

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

Epic work, small comment on last pass, but optional. LGTM.

@jmcardon jmcardon merged commit 20ce37f into master Aug 3, 2023
@jmcardon jmcardon deleted the jose/microgas branch May 10, 2024 16:24
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.

5 participants