-
Notifications
You must be signed in to change notification settings - Fork 41
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
Preparation refactoring towards v5.0 (part 5) #734
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #734 +/- ##
===========================================
- Coverage 69.08% 66.32% -2.76%
===========================================
Files 245 247 +2
Lines 17567 18596 +1029
Branches 517 548 +31
===========================================
+ Hits 12136 12334 +198
- Misses 5431 6262 +831
Continue to review full report at Codecov.
|
…rpreter into prepare-v5.0-evaluator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no any tests for DataValueComparer.scala, ErgoTreeEvaluator etc
sigmastate/src/main/scala/sigmastate/interpreter/ErgoTreeEvaluator.scala
Show resolved
Hide resolved
sigmastate/src/main/scala/sigmastate/interpreter/ErgoTreeEvaluator.scala
Outdated
Show resolved
Hide resolved
sigmastate/src/main/scala/sigmastate/interpreter/ErgoTreeEvaluator.scala
Outdated
Show resolved
Hide resolved
The tests will be in the next (and probably the last incremental PR). A lot of changes in the tests alone (~2K lines). It will be easier to review, because it will be clear that no implementation code is changed and only tests are added. |
@@ -248,7 +248,7 @@ class ErgoTreeSerializer { | |||
|
|||
def substituteConstants(scriptBytes: Array[Byte], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScalaDoc missed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description of the second output is missed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IR nodes evaluation looks good to me. I'm actually very familiar with this JIT evaluation already since almost all of the sigma-rust interpreter is implemented with this JIT evaluation as a reference (I used direct-tree-eval
branch).
I did not check AOT vs. JIT costing equivalency. I suppose there are(will be) tests for that but I did not find them with a quick search. Since we're about to start costing implementation in sigma-rust these tests would be an excellent reference and we would build our costing tests around it.
Please also check notes/questions I made in the comments.
@@ -72,6 +89,13 @@ object NumericOps { | |||
override def times(x: BigInt, y: BigInt): BigInt = n.times(x, y) | |||
} | |||
|
|||
implicit object BigIntIsExactIntegral extends ExactIntegral[BigInt] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScalaDoc is missed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
sigmastate/src/main/scala/sigmastate/interpreter/ErgoTreeEvaluator.scala
Outdated
Show resolved
Hide resolved
sigmastate/src/main/scala/sigmastate/interpreter/ErgoTreeEvaluator.scala
Outdated
Show resolved
Hide resolved
sigmastate/src/main/scala/sigmastate/interpreter/ErgoTreeEvaluator.scala
Outdated
Show resolved
Hide resolved
sigmastate/src/main/scala/sigmastate/interpreter/ErgoTreeEvaluator.scala
Outdated
Show resolved
Hide resolved
I found commented JitCostingSpecification.scala in #738 - https://github.com/ScorexFoundation/sigmastate-interpreter/pull/738/files#diff-dd46271e18b352136f7afb1216c3651fce6cc1691321b544462dab8ff4000e32 |
@greenhat The AOT and JIT costs are different, so they are not equivalent. For sigma-rust you can look at SigmaDslSpecification in #738 |
c335cbd
to
3c3f6f1
Compare
…ator # Conflicts: # sigmastate/src/main/scala/sigmastate/eval/BigIntegerOps.scala # sigmastate/src/main/scala/sigmastate/utxo/CostTable.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but please check comments
@@ -248,7 +248,7 @@ class ErgoTreeSerializer { | |||
|
|||
def substituteConstants(scriptBytes: Array[Byte], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description of the second output is missed
In this PR:
eval
methods of Value classes (aka ErgoTree operations)