tezos-checker / checker

An in-development "robocoin" system for the Tezos blockchain
24 stars 16 forks source link

Move the calculation of the drift derivative into a separate module #277

Closed gkaracha closed 3 years ago

gkaracha commented 3 years ago

This is only the first step in addressing #261. After this and #272 are merged we can work on the remaining parts:

  1. implementing continuousDriftDerivative.ml, also respecting the signature driftDerivative.mli;
  2. turning continuousDriftDerivative.ml and discreteDriftDerivative.ml (currently driftDerivative.ml) into jinja templates;
  3. allowing the curve parameters for each curve to be determined in checker.yaml.
github-actions[bot] commented 3 years ago
Gas costs 9b59ce4b50781baf78895227a9d4b416e49e8272 e11659de4b9ce7022effbeee96f2be75d12ced64 Diff
checker%touch 30618 30623 5
Entrypoint sizes 9b59ce4b50781baf78895227a9d4b416e49e8272 e11659de4b9ce7022effbeee96f2be75d12ced64 Diff
touch 56559 56563 4
Test coverage 9b59ce4b50781baf78895227a9d4b416e49e8272 e11659de4b9ce7022effbeee96f2be75d12ced64 Diff
driftDerivative.ml None 100 100
github-actions[bot] commented 3 years ago
Gas costs 9b59ce4b50781baf78895227a9d4b416e49e8272 6d91dcd3a375d3d7826ee89236cd7e6e67cbfedf Diff
checker%touch 30618 30623 5
Entrypoint sizes 9b59ce4b50781baf78895227a9d4b416e49e8272 6d91dcd3a375d3d7826ee89236cd7e6e67cbfedf Diff
touch 56559 56563 4
Test coverage 9b59ce4b50781baf78895227a9d4b416e49e8272 6d91dcd3a375d3d7826ee89236cd7e6e67cbfedf Diff
driftDerivative.ml None 100 100
gkaracha commented 3 years ago

Well, adding the inline pragma makes no difference. Not sure why is the LIGO compiler sensitive to this change, but I doubt the +5 gas is of any importance.

gkaracha commented 3 years ago

Very strange about the few extra gas. I'm also not sure what Ligo is doing here.

Yeah, right?! It wouldn't be the first time that the order of definitions changed gas costs and entrypoint sizes, but I am still unclear as to why. If the definition is not inlined I understand that their order matters, since you have to dig into the stack to find them. If they are inlined though, this makes little (actually not at all) sense to me. :shrug:

Too big a discussion for this PR though, I'll go ahead and merge it :smile: