Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Make gas units more granular #1245

Merged
jmcardon merged 16 commits intomasterfrom
jose/microgas
Aug 3, 2023
Merged

Make gas units more granular #1245
jmcardon merged 16 commits intomasterfrom
jose/microgas

Conversation

@jmcardon
Copy link
Copy Markdown
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
Copy Markdown
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!

initEvalEnv ls = do
mv <- newMVar ls
gasRef <- newIORef 0
gasRef <- newIORef mempty
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants