Skip to content
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

Release Candidate v5.0.11 #901

Merged
merged 50 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2f8100e
multisig: rename ErgoLikeParameters -> BlockchainParameters
aslesarenko Jul 10, 2023
de8d477
multisig: rename ErgoLikeStateContext -> BlockchainStateContext
aslesarenko Jul 10, 2023
b067284
multisig: implemented OutBoxBuilder, BlockchainContext
aslesarenko Jul 10, 2023
b1ca88d
multisig: implemented UnsignedTransactionBuilder
aslesarenko Jul 11, 2023
7d41fd2
multisig: creation of ReducedTransaction
aslesarenko Jul 11, 2023
62819c4
refactoring: simplify sigma protocol abstractions
aslesarenko Jul 28, 2023
b853091
refactoring: simplified and renamed SigmaProofOfKnowledgeLeaf => Sigm…
aslesarenko Jul 28, 2023
fbac23a
multisig: challenge to become Coll[Byte] which fixes equality of case…
aslesarenko Jul 30, 2023
49d1255
refactoring: avoided duplicated code in computing response to challenge
aslesarenko Jul 30, 2023
8988532
refactoring: more precise types for ProofTreeLeaf + Hint.image
aslesarenko Jul 30, 2023
a9fe1c5
Merge branch 'tx-builders' into tx-signing-js
aslesarenko Aug 5, 2023
4c5b84c
tx-signing-js: fixed test for isoUnsignedTransaction
aslesarenko Aug 5, 2023
c4369ac
tx-signing-js: implemented Fleet transaction reduction and signing
aslesarenko Aug 5, 2023
964feda
tx-signing-js: fixed tests
aslesarenko Aug 6, 2023
ae39af3
tx-signing-js: fixed tests (2)
aslesarenko Aug 6, 2023
6746d72
tx-signing-js: upgrade fleed-sdk to 0.1.0
aslesarenko Aug 7, 2023
f953e7d
tx-signing-js: upgrade fleed-sdk to 0.1.3
aslesarenko Aug 7, 2023
cf8e3a3
refactoring: removed ScriptCostLimit constant
aslesarenko Aug 9, 2023
39e793b
refactoring: cleanup and updates in docs directory
aslesarenko Aug 9, 2023
b81849e
Merge pull request #896 from ScorexFoundation/refactoring
aslesarenko Aug 11, 2023
2b72f2f
refactoring: addressing review comments
aslesarenko Aug 14, 2023
843777e
Merge remote-tracking branch 'origin/v5.0.11-RC' into tx-signing-js
aslesarenko Aug 14, 2023
b948a31
tx-signing-js: fixes after merge
aslesarenko Aug 14, 2023
4ec1b49
tx-signing-js: ReducedTransaction exported to JS and can be serialise…
aslesarenko Aug 17, 2023
1bdbceb
tx-signing-js: fixed CryptoContextJs.decodePoint
aslesarenko Aug 18, 2023
5fac6e7
tx-signing-js: added js.GroupElement class
aslesarenko Aug 18, 2023
58140c1
tx-signing-js: js tests for GroupElement
aslesarenko Aug 18, 2023
9917c2b
tx-signing-js: implemented fromPointHex for js.SigmaProp
aslesarenko Aug 18, 2023
3d5c498
tx-signing-js: added test for Value of type Coll[SigmaProp]
aslesarenko Aug 18, 2023
748962d
tx-signing-js: fix equality of ValidationSettings
aslesarenko Aug 18, 2023
be32e27
todo-v5.x: removing Char, Float, Double type descriptors
aslesarenko Aug 19, 2023
18c4d1a
todo-v5.x: renamed CosterException
aslesarenko Aug 19, 2023
586104a
todo-v5.x: assign an issue for each TODO v6.0
aslesarenko Aug 19, 2023
99a4081
todo-v5.x: removed SomeValue, NoneValue
aslesarenko Aug 19, 2023
1bf6205
todo-v5.x: fix undeterministic behaviour in JsonCodecs
aslesarenko Aug 20, 2023
b0d6202
todo-v5.x: fix contextExtensionEncoder
aslesarenko Aug 20, 2023
ace1cdb
tx-signing-js: cleanups
aslesarenko Aug 20, 2023
627214f
tx-signing-js: downcastCollType
aslesarenko Aug 21, 2023
fc6fdb0
Merge remote-tracking branch 'origin/tx-signing-js' into todo-v5.x
aslesarenko Aug 21, 2023
71f4b7e
tx-signing-js: removed Signer
aslesarenko Aug 25, 2023
ac3c6b8
tx-signing-js: rollback changes in MapSigmaValidationSettings
aslesarenko Aug 25, 2023
d1f0a6d
tx-signing-js: remove SigningSpec.scala
aslesarenko Aug 25, 2023
ce203cc
tx-signing-js: fix Header props, more ScalaDocs
aslesarenko Aug 26, 2023
98c6f06
Merge pull request #900 from ScorexFoundation/tx-signing-js
aslesarenko Aug 28, 2023
511957e
todo-v5.x: removed maxTreeDepth todos
aslesarenko Aug 28, 2023
80b7f73
todo-v5.x: ensure each remaining TODO v5.x has an issue url
aslesarenko Aug 28, 2023
3ec06e6
todo-v5.x: implemented #911: supply ErgoBox.bytes in deserializer
aslesarenko Aug 28, 2023
49104aa
todo-v5.x: cleanups
aslesarenko Aug 28, 2023
6f322a1
Merge remote-tracking branch 'origin/v5.0.11-RC' into todo-v5.x
aslesarenko Aug 28, 2023
aa41958
Merge pull request #911 from ScorexFoundation/todo-v5.x
aslesarenko Aug 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lazy val commonSettings = Seq(
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) =>
Seq("-Ywarn-unused:_,imports", "-Ywarn-unused:imports", "-release", "8")
Seq("-Ywarn-unused:_,imports", "-Ywarn-unused:imports", "-Wconf:src=src_managed/.*:silent", "-release", "8")
case Some((2, 12)) =>
Seq("-Ywarn-unused:_,imports", "-Ywarn-unused:imports", "-release", "8")
case Some((2, 11)) =>
Expand Down Expand Up @@ -282,7 +282,7 @@ lazy val interpreterJS = interpreter.js
},
Compile / npmDependencies ++= Seq(
"sigmajs-crypto-facade" -> sigmajsCryptoFacadeVersion,
"@fleet-sdk/common" -> "0.1.0-alpha.14"
"@fleet-sdk/common" -> "0.1.3"
)
)

Expand Down
7 changes: 0 additions & 7 deletions common/shared/src/main/scala/scalan/TypeDesc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ object RType {
case ClassTag.Short => ShortType
case ClassTag.Int => IntType
case ClassTag.Long => LongType
case ClassTag.Char => CharType
case ClassTag.Float => FloatType
case ClassTag.Double => DoubleType
case ClassTag.Unit => UnitType
case _ => GeneralType[A](ctA)
}).asInstanceOf[RType[A]]
Expand Down Expand Up @@ -72,10 +69,6 @@ object RType {
implicit val ShortType : RType[Short] = PrimitiveType[Short] (ClassTag.Short, Array.emptyShortArray)
implicit val IntType : RType[Int] = PrimitiveType[Int] (ClassTag.Int, Array.emptyIntArray)
implicit val LongType : RType[Long] = PrimitiveType[Long] (ClassTag.Long, Array.emptyLongArray)
// TODO v5.x: optimize: remove Char, Float, Double types, they are not supported and will never be
implicit val CharType : RType[Char] = PrimitiveType[Char] (ClassTag.Char, Array.emptyCharArray)
implicit val FloatType : RType[Float] = PrimitiveType[Float] (ClassTag.Float, Array.emptyFloatArray)
implicit val DoubleType : RType[Double] = PrimitiveType[Double] (ClassTag.Double, Array.emptyDoubleArray)
implicit val UnitType : RType[Unit] = PrimitiveType[Unit] (ClassTag.Unit, Array[Unit]()(ClassTag.Unit))

implicit case object StringType extends RType[String] {
Expand Down
3 changes: 3 additions & 0 deletions common/shared/src/main/scala/scalan/util/CollectionUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ object CollectionUtil {
}

implicit class AnyOps[A](val x: A) extends AnyVal {
/** Performs a specified action on the source value and returns the result. */
def perform(action: A => A): A = action(x)

/** Traverses the tree structure in a depth-first manner using the provided function to generate child nodes.
*
* @param f a function that takes a node of type A and returns a list of its children
Expand Down
3 changes: 2 additions & 1 deletion common/shared/src/test/scala/scalan/BaseTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ abstract class BaseShouldTests extends AnyFlatSpec with TestUtils {
}
}

protected implicit def convertToInAndIgnoreMethods2(resultOfStringPassedToVerb: ResultOfStringPassedToVerb) =
protected implicit def convertToInAndIgnoreMethods2(
resultOfStringPassedToVerb: ResultOfStringPassedToVerb): InAndIgnoreMethods2 =
new InAndIgnoreMethods2(resultOfStringPassedToVerb)

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@ package object collection {
/** Implicit resolution of `Coll[A]` type descriptor, given a descriptor of `A`. */
implicit def collRType[A](implicit tA: RType[A]): RType[Coll[A]] = CollType[A](tA)

/** Conversion to underlying descriptor class.
* Allows syntax like
*
* ```val tColl: RType[Coll[A]] = ...; tColl.tItem```
*
* where `tItem` is a method of `CollType`, but is not defined on `RType`.
*/
implicit def downcastCollType[A](ct: RType[Coll[A]]): CollType[A] = ct.asInstanceOf[CollType[A]]

implicit val collBuilderRType: RType[CollBuilder] = RType.fromClassTag(classTag[CollBuilder])
}
16 changes: 5 additions & 11 deletions core-lib/shared/src/main/scala/special/sigma/SigmaDsl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ trait BigInt {
def |(that: BigInt): BigInt = or(that)
}

/** Base class for points on elliptic curves.
*/
/** Base class for points on elliptic curves. */
trait GroupElement {
/** Checks if the provided element is an identity element. */
def isIdentity: Boolean
Expand Down Expand Up @@ -381,7 +380,6 @@ trait Box {
trait AvlTree {
/** Returns digest of the state represented by this tree.
* Authenticated tree digest = root hash bytes ++ tree height
* @since 2.0
*/
def digest: Coll[Byte]

Expand Down Expand Up @@ -529,10 +527,8 @@ trait AvlTreeVerifier {
}


/** Only header fields that can be predicted by a miner.
* @since 2.0
*/
trait PreHeader { // Testnet2
/** Only header fields that can be predicted by a miner. */
trait PreHeader {
/** Block version, to be increased on every soft and hardfork. */
def version: Byte

Expand All @@ -556,9 +552,7 @@ trait PreHeader { // Testnet2
def votes: Coll[Byte]
}

/** Represents data of the block header available in Sigma propositions.
* @since 2.0
*/
/** Represents data of the block header available in Sigma propositions. */
trait Header {
/** Bytes representation of ModifierId of this Header */
def id: Coll[Byte]
Expand All @@ -572,7 +566,7 @@ trait Header {
/** Hash of ADProofs for transactions in a block */
def ADProofsRoot: Coll[Byte] // Digest32. Can we build AvlTree out of it?

/** AvlTree) of a state after block application */
/** AvlTree of a state after block application */
def stateRoot: AvlTree

/** Root hash (for a Merkle tree) of transactions in a block. */
Expand Down
4 changes: 2 additions & 2 deletions core-lib/shared/src/test/scala/special/TypesTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class TypesTests extends BaseTests {
def test[A](t: RType[A], n: String) = {
t.name shouldBe n
}
test(tupleRType(Array(IntType, LongType, RType[(String, Double)], RType[Option[Boolean]])),
"(Int, Long, (String, Double), Option[Boolean])")
test(tupleRType(Array(IntType, LongType, RType[(Byte, special.sigma.BigInt)], RType[Option[Boolean]])),
"(Int, Long, (Byte, BigInt), Option[Boolean])")
}

test("RType implements equality") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,24 +433,6 @@ class CollsTests extends AnyPropSpec with ScalaCheckPropertyChecks with Matchers

checkColls(repl, coll)
}
forAll(charGen, indexGen, minSuccess) { (x, n) =>
val repl = builder.replicate(n, x)
val coll = builder.fromArray(Array.fill(n)(x))

checkColls(repl, coll)
}
forAll(floatGen, indexGen, minSuccess) { (x, n) =>
val repl = builder.replicate(n, x)
val coll = builder.fromArray(Array.fill(n)(x))

checkColls(repl, coll)
}
forAll (doubleGen, indexGen, minSuccess) { (x, n) =>
val repl = builder.replicate(n, x)
val coll = builder.fromArray(Array.fill(n)(x))

checkColls(repl, coll)
}
forAll (indexGen, minSuccess) { (n) =>
val replTrue = builder.replicate(n, true)
val collTrue = builder.fromArray(Array.fill(n)(true))
Expand Down Expand Up @@ -479,13 +461,13 @@ class CollsTests extends AnyPropSpec with ScalaCheckPropertyChecks with Matchers

checkColls(repl, coll)
}
forAll (byteGen, doubleGen, intGen, indexGen, minSuccess) { (b, d, i, n) =>
forAll (byteGen, longGen, intGen, indexGen, minSuccess) { (b, d, i, n) =>
val repl = builder.replicate(n, (b, (i, (d, b))))
val coll = builder.fromArray(Array.fill[(Byte, (Int, (Double, Byte)))](n)((b, (i, (d, b)))))
val coll = builder.fromArray(Array.fill[(Byte, (Int, (Long, Byte)))](n)((b, (i, (d, b)))))

checkColls(repl, coll)
}
forAll (byteGen, doubleGen, intGen, indexGen, indexGen, minSuccess) { (b, d, i, n, m) =>
forAll (byteGen, longGen, intGen, indexGen, indexGen, minSuccess) { (b, d, i, n, m) =>
val repl = builder.replicate(n, (b, ((i, (("string", builder.replicate(m, n)), Array(1, 2, 3, 4))), (d, b))))
val coll = builder.fromArray(Array.fill(n)((b, ((i, (("string", builder.fromArray(Array.fill(m)(n))), Array(1, 2, 3, 4))), (d, b)))))

Expand Down
Loading
Loading