Conversation
pact.cabal
Outdated
| -Wincomplete-record-updates | ||
| -Wincomplete-uni-patterns | ||
| -Wredundant-constraints | ||
| -Wno-missed-extra-shared-lib |
There was a problem hiding this comment.
Quoting Austin in his PR to chainweb-node:
When running Template Haskell, GHC sees that some code it loads has dependent modules that also have a dependency on the zlib shared object via an extra-libraries clause; GHC can't find or load this module, issuing a warning, but it doesn't matter because the Template Haskell code doesn't actually use zlib despite having a transitive dependency on it.
Silence this warning, as it's extremely annoying to see while working on any files that use Template Haskell for any purposes e.g. deriving lenses.
I have been getting this warning on chainweb-node and pact for a while now.
edmundnoble
left a comment
There was a problem hiding this comment.
This needs a change in Pact.Interpreter to disable the new native until Pact 4.11, similar to other natives that are only enabled by a fork.
Added |
Tests
Unit test, Haskell:
tests/HyperlaneSpec.hsRepl test, Pact:
tests/pact/hyperlane-message-id.replGas Benchmark
Gas Benchmark Code
Gas Benchmark Results
Going off of these numbers, assuming 1 milligas is 2.5ns, that means our cost is roughly
1120.8 + 0.4726 * byte_length(x), wherexis theTokenMessagerecipient. To avoid rounding errors due to the small cost per byte, we can cost this per 100 bytes. So ultimately, the proposed cost (in milligas) is:The Milligas constant
1121in practise cannot be included indefaultGasTable, which only contains Gas, not Milligas. We should round up here, so instead of 1 Gas, this is 2 Gas.PR checklist:
cabal run tests. If they pass locally, docs are generated.pact -t), make sure pact-lsp is in sync.Additionally, please justify why you should or should not do the following: