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

5.0.15 release candidate #2026

Merged
merged 89 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
5ea24d5
unused import, var => val
kushti Sep 25, 2021
95e34fd
proper log levels and minor styling improvs in history & history storage
kushti Sep 25, 2021
61f3d63
script/p2sh back
kushti Sep 27, 2021
69bfc48
minor stylistic improvs
kushti Sep 30, 2021
19bd807
unused inspectAll removed
kushti Oct 2, 2021
5a8eb63
merging w. 4.0.17
kushti Nov 18, 2021
7eda819
Box and Proposition removed
kushti Nov 18, 2021
35c4f80
merging w. 4.0.17
kushti Nov 22, 2021
eeba0da
unused code removed from NetworkController and ModifierSemanticValidity
kushti Nov 22, 2021
2f7f34a
unused code in ApiError removed
kushti Nov 22, 2021
bead758
removing unused code in PeerConnectionHandler
kushti Nov 22, 2021
0934963
verifyInput & verifyOutput
kushti Nov 22, 2021
759a46d
importing verifyAssets
kushti Nov 22, 2021
4ed4051
merging w. 4.0.17
kushti Nov 28, 2021
e5d5fa8
post-merging fixes in ErgoTransaction, improving p2sh tests
kushti Nov 28, 2021
1475ee6
comments for verify* helpers
kushti Nov 28, 2021
c3cee36
merging w. 4.0.20
kushti Jan 4, 2022
136e8fc
avoiding v1SyncInfo recalc
kushti Jan 4, 2022
8edb676
p2sRuleR
kushti Nov 23, 2022
508aba0
Merge branch 'v5.0.6' of github.com:ergoplatform/ergo into p2s-rule
kushti Jan 16, 2023
7f409fd
openapi.yaml updated with /scan/p2srule
kushti Jan 16, 2023
8faca96
true address as an example, no interaction with wallet and not removi…
kushti Jan 16, 2023
3b4db24
5.0.15 version set
kushti Aug 21, 2023
f95da3a
Added API specification
jellymlg Aug 24, 2023
ca410ac
Updated and refactored endpoints
jellymlg Aug 24, 2023
659fd4d
Seq.empty in ErgoValidationSettingsUpdate.empty
kushti Sep 4, 2023
9d0a6d8
simplified upcoming(), validate mempool txs as in next block, Transac…
kushti Sep 4, 2023
21d58bc
merging w. 5.0.15
kushti Sep 6, 2023
84ca2e9
p2sRule test
kushti Sep 6, 2023
5e3d80a
fixing scan
kushti Sep 8, 2023
66c0d99
api method description improved
kushti Sep 8, 2023
a4072cc
Merge pull request #1907 from ergoplatform/p2s-rule
kushti Sep 8, 2023
32d7eb1
Merge branch 'v5.0.15' of github.com:ergoplatform/ergo into i2020
kushti Sep 12, 2023
c713aef
TooHighCostError rework
kushti Sep 12, 2023
2e1a8f0
timestamp fix in simplifiedUpcoming(), ScalaDoc
kushti Sep 12, 2023
f11cc3c
simplifiedUpcoming name back
kushti Sep 12, 2023
373005b
merging w. 5.0.15
kushti Sep 12, 2023
1f23bd6
#1959 Remove lastActivity from ConnectedPeer
ccellado Sep 12, 2023
c235ecc
Merge branch 'master' of github.com:ergoplatform/ergo into v5.0.15
kushti Sep 18, 2023
125a469
Merge pull request #2035 from ccellado/unite_time_delta_info
kushti Sep 18, 2023
285892d
Fixed IndexedErgoBox API schema
jellymlg Sep 19, 2023
f51ebde
[WIP] Separated segment handling logic from IndexedErgoAddress
jellymlg Sep 25, 2023
494dd78
Fixed breaking changes, eliminated bug caused by binary search due to…
jellymlg Sep 25, 2023
d85c20a
[WIP] Added box tracking functionality to tokens
jellymlg Sep 26, 2023
c9e3c51
Added missing clear statements
jellymlg Sep 26, 2023
633b684
merging w. 5.0.15
kushti Sep 26, 2023
6febeb2
validateWithCost args simplification
kushti Sep 26, 2023
b88fd96
Merge pull request #2033 from ergoplatform/i2020
kushti Sep 26, 2023
dbe903a
Merge pull request #2036 from ergoplatform/i2032-IndexedErgoBox-schema
kushti Sep 26, 2023
75636c2
Merge branch 'v5.0.15' of github.com:ergoplatform/ergo into v5.0.15
kushti Sep 26, 2023
343d090
with-sigma-v5.0.12: upgrade code
aslesarenko Sep 26, 2023
d1d312a
Merge branch 'v5.0.15' into api-unconfirmed-boxes
jellymlg Sep 26, 2023
34fea49
Fixed conflicts
jellymlg Sep 26, 2023
a25c718
Small refactor
jellymlg Sep 27, 2023
9cb9b96
Fixed a lot of bugs and reworked tests
jellymlg Sep 27, 2023
e9e146e
with-sigma-v5.0.12: updated sigma
aslesarenko Sep 28, 2023
a48966c
Fixed token detection problems, made some speed improvements by avoid…
jellymlg Sep 29, 2023
8f9a83f
Added API endpoints
jellymlg Sep 29, 2023
8e42b79
Merge pull request #2029 from ergoplatform/api-unconfirmed-boxes
kushti Oct 2, 2023
d9505c0
Merge branch 'v5.0.15' of github.com:ergoplatform/ergo into v5.0.15
kushti Oct 2, 2023
aa9cb7b
fixing test - remove transactions which become invalid
kushti Oct 2, 2023
dc9c0c5
Merge remote-tracking branch 'origin/v5.0.15' into with-sigma-v5.0.12
aslesarenko Oct 2, 2023
1590842
with-sigma-v5.0.12: updated to v5.0.12
aslesarenko Oct 2, 2023
10bba1e
#2037 Add bulk endpoint for mem pool box fetch
ccellado Oct 2, 2023
55e0f0d
#2037 Add bulk endpoint for mem pool box fetch
ccellado Oct 2, 2023
304f13a
#2037 Add bulk endpoint for mem pool box fetch
ccellado Oct 2, 2023
6ea3736
#2039 Add bulk endpoint for full block by header ids fetch
ccellado Oct 3, 2023
5bfc075
Fixed incorrect request type
jellymlg Oct 3, 2023
b09df0c
Merge branch 'v5.0.15' of github.com:ergoplatform/ergo into refactoring2
kushti Oct 3, 2023
acab0d1
Merge pull request #2040 from ergoplatform/with-sigma-v5.0.12
kushti Oct 3, 2023
edaf0e3
Merge pull request #1456 from ergoplatform/refactoring2
kushti Oct 3, 2023
3c995c2
Fixed incorrect id usage in segment lookup
jellymlg Oct 3, 2023
85339a0
Merge remote-tracking branch 'origin/v5.0.15' into i2038-box-by-tokenId
jellymlg Oct 3, 2023
07a68f7
Added includeUnconfirmed option to Token API
jellymlg Oct 3, 2023
722acfc
Merge branch 'v5.0.15' of github.com:ergoplatform/ergo into i2038-box…
kushti Oct 4, 2023
fa3d3ca
Merge branch 'v5.0.15' into bulk_endpoint_headerId
ccellado Oct 4, 2023
5a38141
Merge pull request #2044 from ergoplatform/i2038-box-by-tokenId
kushti Oct 4, 2023
c980071
Merge pull request #2043 from ccellado/bulk_endpoint_headerId
kushti Oct 4, 2023
29b8b0f
#2039 Add bulk endpoint for full block by header ids fetch
ccellado Oct 4, 2023
5429633
pre 5.0.12 sigma import fix
kushti Oct 4, 2023
4fe244f
#2037 Add bulk endpoint for mem pool box fetch
ccellado Oct 4, 2023
61810d3
Merge pull request #2042 from ccellado/bulk_endpoint_withpool
kushti Oct 4, 2023
890bc6f
Fixed BlocksApiRouteSpec
ccellado Oct 4, 2023
727b606
Merge pull request #2046 from ccellado/bulk_endpoint_headerId
kushti Oct 4, 2023
0ebae16
Fixed serializing
ccellado Oct 6, 2023
edd390a
Merge pull request #2048 from ccellado/unite_time_delta_info
kushti Oct 7, 2023
9ab35f6
version increased in openapi-ai
kushti Oct 11, 2023
7980b4a
Merge branch 'v5.0.15' of github.com:ergoplatform/ergo into v5.0.15
kushti Oct 11, 2023
4de322a
lastSeen serialization fix, minor polishing
kushti Oct 17, 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
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ val circeVersion = "0.13.0"
val akkaVersion = "2.6.10"
val akkaHttpVersion = "10.2.4"

val sigmaStateVersion = "5.0.10"
val sigmaStateVersion = "5.0.12"

// for testing current sigmastate build (see sigmastate-ergo-it jenkins job)
val effectiveSigmaStateVersion = Option(System.getenv().get("SIGMASTATE_VERSION")).getOrElse(sigmaStateVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.ergoplatform.ErgoLikeTransaction;
import org.ergoplatform.UnsignedErgoLikeTransaction;
import scala.collection.JavaConverters;
import sigmastate.basics.DLogProtocol;
import sigmastate.crypto.DLogProtocol;
import java.util.Map;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.ergoplatform.{Height, MinerPubkey, Outputs, Self}
import sigmastate.Values.{ByteArrayConstant, ErgoTree, IntConstant, LongConstant, SigmaPropValue, Value}
import sigmastate.utxo._
import sigmastate._
import special.collection.Coll
import sigma.Coll

/**
* Container for re-emission related contracts. Contains re-emission contract and pay-to-reemission contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.ergoplatform.wallet.boxes

import java7.compat.Math
import org.ergoplatform.ErgoBoxCandidate
import special.collection.Extensions._
import sigma.Extensions._

import scala.collection.compat.immutable.ArraySeq
import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.ergoplatform.wallet.serialization.ErgoWalletSerializer
import org.ergoplatform.{ErgoBox, ErgoBoxAssets, ErgoLikeTransaction}
import scorex.util.serialization.{Reader, Writer}
import scorex.util.{ModifierId, bytesToId, idToBytes}
import special.collection.Extensions._
import sigma.Extensions._

/**
* A box tracked by a wallet that contains Ergo box itself as well as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.ergoplatform.wallet.crypto
import org.bouncycastle.util.BigIntegers
import scorex.crypto.hash.Blake2b256
import scorex.util.encode.Base16
import sigmastate.basics.CryptoConstants
import sigmastate.crypto.CryptoConstants
import sigmastate.serialization.GroupElementSerializer

import scala.annotation.tailrec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.ergoplatform.wallet.interpreter

import org.ergoplatform.ErgoLikeContext.Height
import org.ergoplatform.sdk.wallet.protocol.context.ErgoLikeParameters
import org.ergoplatform.sdk.BlockchainParameters
import org.ergoplatform.wallet.protocol.Constants
import org.ergoplatform.{ErgoBox, ErgoBoxCandidate, ErgoLikeContext, ErgoLikeInterpreter}
import scorex.util.ScorexLogging
import sigmastate.Values.ErgoTree
import sigmastate.interpreter.Interpreter.{ScriptEnv, VerificationResult}
import sigmastate.{AvlTreeData, AvlTreeFlags}
import special.collection.Coll
import sigma.Coll

import scala.util.Try

Expand All @@ -18,7 +18,7 @@ import scala.util.Try
*
* @param params - current values of adjustable blockchain settings
*/
class ErgoInterpreter(params: ErgoLikeParameters)
class ErgoInterpreter(params: BlockchainParameters)
extends ErgoLikeInterpreter with ScorexLogging {

/** Override default logging for all Ergo interpreters. */
Expand Down Expand Up @@ -96,7 +96,7 @@ object ErgoInterpreter {
val interpreterInitCost = 10000

/** Creates an interpreter with the given parameters. */
def apply(params: ErgoLikeParameters): ErgoInterpreter =
def apply(params: BlockchainParameters): ErgoInterpreter =
new ErgoInterpreter(params)

/** Create [[AvlTreeData]] with the given digest and all operations enabled. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package org.ergoplatform.wallet.interpreter

import org.ergoplatform._
import org.ergoplatform.sdk.BlockchainParameters
import org.ergoplatform.sdk.utils.ArithUtils.{addExact, multiplyExact}
import org.ergoplatform.sdk.wallet.protocol.context.{ErgoLikeParameters, ErgoLikeStateContext}
import org.ergoplatform.sdk.wallet.protocol.context.BlockchainStateContext
import org.ergoplatform.sdk.wallet.secrets.{ExtendedPublicKey, ExtendedSecretKey, SecretKey}
import org.ergoplatform.validation.{SigmaValidationSettings, ValidationRules}
import org.ergoplatform.wallet.boxes.ErgoBoxAssetExtractor
import scorex.crypto.authds.ADDigest
import scorex.util.encode.Base16
import sigmastate.AvlTreeData
import sigmastate.Values.SigmaBoolean
import sigmastate.basics.SigmaProtocolPrivateInput
import sigmastate.crypto.SigmaProtocolPrivateInput
import sigmastate.interpreter.{ContextExtension, ProverInterpreter}
import special.collection.Coll
import special.sigma.{Header, PreHeader}
import sigma.{Coll, Header, PreHeader}

import java.util
import scala.util.{Failure, Success, Try}
Expand All @@ -39,14 +38,14 @@ import scala.util.{Failure, Success, Try}
* (to not to recompute them)
*/
class ErgoProvingInterpreter(val secretKeys: IndexedSeq[SecretKey],
params: ErgoLikeParameters,
params: BlockchainParameters,
val cachedHdPubKeysOpt: Option[IndexedSeq[ExtendedPublicKey]] = None)
extends ErgoInterpreter(params) with ProverInterpreter {

/**
* Interpreter's secrets, in form of sigma protocols private inputs
*/
val secrets: IndexedSeq[SigmaProtocolPrivateInput[_, _]] = secretKeys.map(_.privateInput)
val secrets: IndexedSeq[SigmaProtocolPrivateInput[_]] = secretKeys.map(_.privateInput)

/**
* Only secrets corresponding to hierarchical deterministic scheme (BIP-32 impl)
Expand Down Expand Up @@ -93,14 +92,14 @@ class ErgoProvingInterpreter(val secretKeys: IndexedSeq[SecretKey],
* @param newParams - updated parameters
* @return modified prover
*/
def withNewParameters(newParams: ErgoLikeParameters): ErgoProvingInterpreter = {
def withNewParameters(newParams: BlockchainParameters): ErgoProvingInterpreter = {
new ErgoProvingInterpreter(this.secretKeys, newParams, this.cachedHdPubKeysOpt)
}

def signInputs(unsignedTx: UnsignedErgoLikeTransaction,
boxesToSpend: IndexedSeq[ErgoBox],
dataBoxes: IndexedSeq[ErgoBox],
stateContext: ErgoLikeStateContext,
stateContext: BlockchainStateContext,
txHints: TransactionHintsBag): Try[(IndexedSeq[Input], Long)] = {
if (unsignedTx.inputs.length != boxesToSpend.length) {
Failure(new Exception("Not enough boxes to spend"))
Expand Down Expand Up @@ -164,7 +163,7 @@ class ErgoProvingInterpreter(val secretKeys: IndexedSeq[SecretKey],
def sign(unsignedTx: UnsignedErgoLikeTransaction,
boxesToSpend: IndexedSeq[ErgoBox],
dataBoxes: IndexedSeq[ErgoBox],
stateContext: ErgoLikeStateContext,
stateContext: BlockchainStateContext,
txHints: TransactionHintsBag = TransactionHintsBag.empty): Try[ErgoLikeTransaction] = {

val signedInputs: Try[(IndexedSeq[Input], Long)] =
Expand All @@ -190,7 +189,7 @@ class ErgoProvingInterpreter(val secretKeys: IndexedSeq[SecretKey],
def generateCommitmentsFor(unsignedTx: UnsignedErgoLikeTransaction,
boxesToSpend: IndexedSeq[ErgoBox],
dataBoxes: IndexedSeq[ErgoBox],
stateContext: ErgoLikeStateContext): Try[TransactionHintsBag] = Try {
stateContext: BlockchainStateContext): Try[TransactionHintsBag] = Try {
val inputCmts = unsignedTx.inputs.zipWithIndex.map { case (unsignedInput, inpIndex) =>

val inputBox = boxesToSpend(inpIndex)
Expand Down Expand Up @@ -230,7 +229,7 @@ class ErgoProvingInterpreter(val secretKeys: IndexedSeq[SecretKey],
def bagForTransaction(tx: ErgoLikeTransaction,
boxesToSpend: IndexedSeq[ErgoBox],
dataBoxes: IndexedSeq[ErgoBox],
stateContext: ErgoLikeStateContext,
stateContext: BlockchainStateContext,
realSecretsToExtract: Seq[SigmaBoolean],
simulatedSecretsToExtract: Seq[SigmaBoolean]): TransactionHintsBag = {
val augmentedInputs = tx.inputs.zipWithIndex.zip(boxesToSpend)
Expand Down Expand Up @@ -262,11 +261,11 @@ class ErgoProvingInterpreter(val secretKeys: IndexedSeq[SecretKey],
object ErgoProvingInterpreter {

def apply(secrets: IndexedSeq[SecretKey],
params: ErgoLikeParameters): ErgoProvingInterpreter =
params: BlockchainParameters): ErgoProvingInterpreter =
new ErgoProvingInterpreter(secrets, params)

def apply(rootSecret: ExtendedSecretKey,
params: ErgoLikeParameters): ErgoProvingInterpreter =
params: BlockchainParameters): ErgoProvingInterpreter =
new ErgoProvingInterpreter(IndexedSeq(rootSecret), params)

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.ergoplatform.wallet.interpreter

import org.ergoplatform.{ErgoLikeTransaction, Input, UnsignedErgoLikeTransaction}
import scorex.util.encode.Base16
import sigmastate.basics.DLogProtocol.DLogProverInput
import sigmastate.crypto.DLogProtocol.DLogProverInput
import sigmastate.interpreter.{ContextExtension, ProverResult}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import scorex.util.{ModifierId, bytesToId}
import sigmastate.eval.Extensions._
import sigmastate.eval._
import sigmastate.utils.Extensions._
import special.collection.Coll
import special.collection.Extensions._
import sigma.Coll
import sigma.Extensions._

import scala.collection.JavaConverters._
import scala.util.Try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.ergoplatform.wallet.transactions.TransactionBuilder;
import org.ergoplatform.wallet.transactions.TransactionBuilder.Payment;
import scorex.util.Random;
import sigmastate.basics.DLogProtocol;
import sigmastate.crypto.DLogProtocol;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import sigmastate.Values.SigmaPropValue
import sigmastate.eval.Extensions._
import sigmastate.helpers.TestingHelpers._
import sigmastate.utils.Extensions._
import special.collection.Extensions._
import sigma.Extensions._

import scala.util.Random

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.ergoplatform.wallet.utils.Generators
import org.scalatest.matchers.should.Matchers
import org.scalatest.propspec.AnyPropSpec
import scorex.util.Random
import sigmastate.basics.DLogProtocol.DLogProverInput
import sigmastate.crypto.DLogProtocol.DLogProverInput

class ErgoSignatureSpec extends AnyPropSpec with Matchers with Generators {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.scalatest.matchers.should.Matchers
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import scorex.util.{ModifierId, Random}
import scorex.util.encode.Base16
import sigma.Colls
import sigmastate.CTHRESHOLD
import sigmastate.Values.{GroupElementConstant, SigmaBoolean}
import sigmastate.interpreter.{ContextExtension, HintsBag}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package org.ergoplatform.wallet.interpreter

import org.ergoplatform.sdk.wallet.protocol.context.{ErgoLikeParameters, ErgoLikeStateContext}
import org.ergoplatform.sdk.BlockchainParameters
import org.ergoplatform.sdk.wallet.protocol.context.BlockchainStateContext
import scorex.util.encode.Base16
import sigmastate.basics.CryptoConstants
import sigmastate.crypto.CryptoConstants
import sigmastate.eval.Extensions.ArrayOps
import sigmastate.eval.{CGroupElement, CPreHeader, Colls}
import special.collection.Coll
import special.sigma.{Header, PreHeader}
import sigmastate.eval.{CGroupElement, CPreHeader}
import sigma.{Coll, Colls, Header, PreHeader}

trait InterpreterSpecCommon {

protected val parameters = new ErgoLikeParameters {
protected val parameters = new BlockchainParameters {

override def storageFeeFactor: Int = 1250000

Expand All @@ -35,7 +35,7 @@ trait InterpreterSpecCommon {
override def blockVersion: Byte = 1
}

protected val stateContext = new ErgoLikeStateContext {
protected val stateContext = new BlockchainStateContext {

override def sigmaLastHeaders: Coll[Header] = Colls.emptyColl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.scalacheck.{Arbitrary, Gen}
import scorex.crypto.authds.ADKey
import scorex.util._
import sigmastate.Values.{ByteArrayConstant, CollectionConstant, ErgoTree, EvaluatedValue, FalseLeaf, TrueLeaf}
import sigmastate.basics.DLogProtocol.ProveDlog
import sigmastate.crypto.DLogProtocol.ProveDlog
import sigmastate.crypto.CryptoFacade.SecretKeyLength
import sigmastate.eval.Extensions._
import sigmastate.eval._
Expand Down
1 change: 1 addition & 0 deletions src/it/scala/org/ergoplatform/it/WalletSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.ergoplatform.{ErgoBox, P2PKAddress}
import org.scalatest.wordspec.AsyncWordSpec
import scorex.util.ModifierId
import scorex.util.encode.Base16
import sigma.Colls
import sigmastate.Values.{ErgoTree, TrueLeaf}

import scala.concurrent.ExecutionContext
Expand Down
Loading