Skip to content

Commit

Permalink
Merge pull request #866 from ScorexFoundation/restructure-part3
Browse files Browse the repository at this point in the history
Migrate GF classes to Scala (restructure part3)
  • Loading branch information
aslesarenko authored Feb 27, 2023
2 parents 844aa38 + 0f4fa86 commit 3c7a72d
Show file tree
Hide file tree
Showing 22 changed files with 872 additions and 867 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ dynverSonatypeSnapshots in ThisBuild := true
// use "-" instead of default "+"
dynverSeparator in ThisBuild := "-"

val bouncycastleBcprov = "org.bouncycastle" % "bcprov-jdk15on" % "1.64"
val scrypto = "org.scorexfoundation" %% "scrypto" % "2.1.10"
val scorexUtil = "org.scorexfoundation" %% "scorex-util" % "0.1.8"
val debox = "org.scorexfoundation" %% "debox" % "0.9.0"
val bouncycastleBcprov = "org.bouncycastle" % "bcprov-jdk15on" % "1.66"
val scrypto = "org.scorexfoundation" %% "scrypto" % "2.3.0-RC1"
val scorexUtil = "org.scorexfoundation" %% "scorex-util" % "0.2.0"
val debox = "org.scorexfoundation" %% "debox" % "0.10.0"
val spireMacros = "org.typelevel" %% "spire-macros" % "0.17.0-M1"
val fastparse = "com.lihaoyi" %% "fastparse" % "2.3.3"
val guava = "com.google.guava" % "guava" % "30.1.1-jre"
Expand Down
580 changes: 0 additions & 580 deletions sigmastate/src/main/java/gf2t/GF2_192.java

This file was deleted.

247 changes: 0 additions & 247 deletions sigmastate/src/main/java/gf2t/GF2_192_Poly.java

This file was deleted.

2 changes: 1 addition & 1 deletion sigmastate/src/main/scala/org/ergoplatform/ErgoBox.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ErgoBox(
import ErgoBox._

/** Blake2b256 hash of the serialized `bytes`. */
lazy val id: BoxId = ADKey @@ Blake2b256.hash(bytes)
lazy val id: BoxId = ADKey @@@ Blake2b256.hash(bytes)

override def get(identifier: RegisterId): Option[Value[SType]] = {
identifier match {
Expand Down
5 changes: 2 additions & 3 deletions sigmastate/src/main/scala/sigmastate/SigSerializer.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package sigmastate

import com.typesafe.scalalogging.LazyLogging
import gf2t.GF2_192_Poly
import sigmastate.crypto.BigIntegers
import sigmastate.crypto.{BigIntegers, GF2_192_Poly}
import scorex.util.encode.Base16
import sigmastate.Values.SigmaBoolean
import sigmastate.basics.DLogProtocol.{ProveDlog, SecondDLogProverMessage}
Expand All @@ -11,7 +10,7 @@ import sigmastate.basics.{ProveDHTuple, SecondDiffieHellmanTupleProverMessage}
import sigmastate.interpreter.ErgoTreeEvaluator.{fixedCostOp, perItemCostOp}
import sigmastate.interpreter.{CryptoConstants, ErgoTreeEvaluator, NamedDesc, OperationCostInfo}
import sigmastate.lang.exceptions.SerializerException
import sigmastate.serialization.{SigmaSerializer}
import sigmastate.serialization.SigmaSerializer
import sigmastate.util.safeNewArray
import sigmastate.utils.{Helpers, SigmaByteReader, SigmaByteWriter}
import debox.cfor
Expand Down
2 changes: 1 addition & 1 deletion sigmastate/src/main/scala/sigmastate/UncheckedTree.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import java.util.Arrays
import sigmastate.basics.DLogProtocol.{FirstDLogProverMessage, ProveDlog, SecondDLogProverMessage}
import sigmastate.basics.VerifierMessage.Challenge
import sigmastate.Values.SigmaBoolean
import gf2t.GF2_192_Poly
import sigmastate.basics.{FirstDiffieHellmanTupleProverMessage, ProveDHTuple, SecondDiffieHellmanTupleProverMessage}
import sigmastate.crypto.GF2_192_Poly

sealed trait UncheckedTree extends ProofTree

Expand Down
4 changes: 1 addition & 3 deletions sigmastate/src/main/scala/sigmastate/UnprovenTree.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package sigmastate

import java.math.BigInteger

import gf2t.GF2_192_Poly
import sigmastate.Values.{ErgoTree, SigmaBoolean, SigmaPropConstant}
import sigmastate.basics.DLogProtocol.{FirstDLogProverMessage, ProveDlog}
import sigmastate.basics.VerifierMessage.Challenge
Expand All @@ -13,7 +11,7 @@ import sigmastate.serialization.ErgoTreeSerializer.DefaultSerializer
import sigmastate.serialization.SigmaSerializer
import sigmastate.utils.SigmaByteWriter
import debox.cfor

import sigmastate.crypto.GF2_192_Poly
import scala.language.existentials

object ConjectureType extends Enumeration {
Expand Down
Loading

0 comments on commit 3c7a72d

Please sign in to comment.