From 7db0a2b9daec9309b776182613af40d77fba1467 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Fri, 17 Nov 2023 10:19:39 -0500 Subject: [PATCH 01/23] protocol: Add block hash to state proof's LightBlockHeader (#589) --- protocol/config/consensus.go | 5 +++++ types/lightBlockHeader.go | 1 + 2 files changed, 6 insertions(+) diff --git a/protocol/config/consensus.go b/protocol/config/consensus.go index 90174faa..40f5557f 100644 --- a/protocol/config/consensus.go +++ b/protocol/config/consensus.go @@ -400,6 +400,11 @@ type ConsensusParams struct { // their account balances. StateProofExcludeTotalWeightWithRewards bool + // StateProofBlockHashInLightHeader specifies that the LightBlockHeader + // committed to by state proofs should contain the BlockHash of each + // block, instead of the seed. + StateProofBlockHashInLightHeader bool + // EnableAssetCloseAmount adds an extra field to the ApplyData. The field contains the amount of the remaining // asset that were sent to the close-to address. EnableAssetCloseAmount bool diff --git a/types/lightBlockHeader.go b/types/lightBlockHeader.go index c427b1b1..7e4951d6 100644 --- a/types/lightBlockHeader.go +++ b/types/lightBlockHeader.go @@ -11,6 +11,7 @@ type LightBlockHeader struct { _struct struct{} `codec:",omitempty,omitemptyarray"` Seed Seed `codec:"0"` + BlockHash Digest `codec:"1"` RoundNumber Round `codec:"r"` GenesisHash Digest `codec:"gh"` Sha256TxnCommitment Digest `codec:"tc,allocbound=Sha256Size"` From 4853b84c0928286ce6707a38d0210eae869d5339 Mon Sep 17 00:00:00 2001 From: Gary <982483+gmalouf@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:34:35 -0500 Subject: [PATCH 02/23] Add period 0 deadline timeout parameter to consensus params. (#618) --- protocol/config/consensus.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/protocol/config/consensus.go b/protocol/config/consensus.go index 40f5557f..408dc9b8 100644 --- a/protocol/config/consensus.go +++ b/protocol/config/consensus.go @@ -143,6 +143,8 @@ type ConsensusParams struct { // time for nodes to wait for block proposal headers for period = 0, value should be configured to suit best case // critical path AgreementFilterTimeoutPeriod0 time.Duration + // Duration of the second agreement step for period=0, value should be configured to suit best case critical path + AgreementDeadlineTimeoutPeriod0 time.Duration FastRecoveryLambda time.Duration // time between fast recovery attempts @@ -707,8 +709,9 @@ func initConsensusProtocols() { DownCommitteeSize: 10000, DownCommitteeThreshold: 7750, - AgreementFilterTimeout: 4 * time.Second, - AgreementFilterTimeoutPeriod0: 4 * time.Second, + AgreementFilterTimeout: 4 * time.Second, + AgreementFilterTimeoutPeriod0: 4 * time.Second, + AgreementDeadlineTimeoutPeriod0: Protocol.BigLambda + Protocol.SmallLambda, FastRecoveryLambda: 5 * time.Minute, @@ -1242,11 +1245,20 @@ func initConsensusProtocols() { // ConsensusFuture is used to test features that are implemented // but not yet released in a production protocol version. vFuture := v38 + vFuture.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} vFuture.LogicSigVersion = 10 // When moving this to a release, put a new higher LogicSigVersion here vFuture.EnableLogicSigCostPooling = true + vFuture.AgreementDeadlineTimeoutPeriod0 = 4 * time.Second + + vFuture.StateProofBlockHashInLightHeader = true + + // Setting DynamicFilterTimeout in vFuture will impact e2e test performance + // by reducing round time. Hence, it is commented out for now. + // vFuture.DynamicFilterTimeout = true + Consensus[protocol.ConsensusFuture] = vFuture // vAlphaX versions are an separate series of consensus parameters and versions for alphanet From c41e5775ecf4bb383dabc8b948a1c4f7b2a6fbe0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:40:24 -0500 Subject: [PATCH 03/23] Regenerate code from specification file (#620) Co-authored-by: Algorand Generation Bot --- .../common/models/simulation_transaction_exec_trace.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/v2/common/models/simulation_transaction_exec_trace.go b/client/v2/common/models/simulation_transaction_exec_trace.go index ca300a5f..068fe03e 100644 --- a/client/v2/common/models/simulation_transaction_exec_trace.go +++ b/client/v2/common/models/simulation_transaction_exec_trace.go @@ -19,6 +19,16 @@ type SimulationTransactionExecTrace struct { // a clear state program. ClearStateProgramTrace []SimulationOpcodeTraceUnit `json:"clear-state-program-trace,omitempty"` + // ClearStateRollback if true, indicates that the clear state program failed and + // any persistent state changes it produced should be reverted once the program + // exits. + ClearStateRollback bool `json:"clear-state-rollback,omitempty"` + + // ClearStateRollbackError the error message explaining why the clear state program + // failed. This field will only be populated if clear-state-rollback is true and + // the failure was due to an execution error. + ClearStateRollbackError string `json:"clear-state-rollback-error,omitempty"` + // InnerTrace an array of SimulationTransactionExecTrace representing the execution // trace of any inner transactions executed. InnerTrace []SimulationTransactionExecTrace `json:"inner-trace,omitempty"` From e8cb3044fca7f76dfe6d3bb0d2b578881f3f03cd Mon Sep 17 00:00:00 2001 From: Gary <982483+gmalouf@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:11:20 -0500 Subject: [PATCH 04/23] Consensus: Update consensus files for v39 along with types sync. (#621) * Update consensus files for v39 along with types sync. * Remove unused / linter violating msgp annotation in consensus.go. --- protocol/config/consensus.go | 86 +++++++++++++++++++++++++++++++----- protocol/consensus.go | 8 +++- types/applications.go | 2 +- types/asset.go | 6 +-- types/block.go | 15 +++---- types/genesis.go | 3 +- types/statedelta.go | 5 ++- 7 files changed, 96 insertions(+), 29 deletions(-) diff --git a/protocol/config/consensus.go b/protocol/config/consensus.go index 408dc9b8..94ce41be 100644 --- a/protocol/config/consensus.go +++ b/protocol/config/consensus.go @@ -588,6 +588,42 @@ var MaxAvailableAppProgramLen int // to be taken offline, that would be proposed to be taken offline. var MaxProposedExpiredOnlineAccounts int +// MaxAppTotalArgLen is the maximum number of bytes across all arguments of an application +// max sum([len(arg) for arg in txn.ApplicationArgs]) +var MaxAppTotalArgLen int + +// MaxAssetNameBytes is the maximum asset name length in bytes +var MaxAssetNameBytes int + +// MaxAssetUnitNameBytes is the maximum asset unit name length in bytes +var MaxAssetUnitNameBytes int + +// MaxAssetURLBytes is the maximum asset URL length in bytes +var MaxAssetURLBytes int + +// MaxAppBytesValueLen is the maximum length of a bytes value used in an application's global or +// local key/value store +var MaxAppBytesValueLen int + +// MaxAppBytesKeyLen is the maximum length of a key used in an application's global or local +// key/value store +var MaxAppBytesKeyLen int + +// StateProofTopVoters is a bound on how many online accounts get to +// participate in forming the state proof, by including the +// top StateProofTopVoters accounts (by normalized balance) into the +// vector commitment. +var StateProofTopVoters int + +// MaxTxnBytesPerBlock determines the maximum number of bytes +// that transactions can take up in a block. Specifically, +// the sum of the lengths of encodings of each transaction +// in a block must not exceed MaxTxnBytesPerBlock. +var MaxTxnBytesPerBlock int + +// MaxAppTxnForeignApps is the max number of foreign apps per txn across all consensus versions +var MaxAppTxnForeignApps int + func checkSetMax(value int, curMax *int) { if value > *curMax { *curMax = value @@ -625,6 +661,19 @@ func checkSetAllocBounds(p ConsensusParams) { checkSetMax(p.MaxAppProgramLen, &MaxLogCalls) checkSetMax(p.MaxInnerTransactions*p.MaxTxGroupSize, &MaxInnerTransactionsPerDelta) checkSetMax(p.MaxProposedExpiredOnlineAccounts, &MaxProposedExpiredOnlineAccounts) + + // These bounds are exported to make them available to the msgp generator for calculating + // maximum valid message size for each message going across the wire. + checkSetMax(p.MaxAppTotalArgLen, &MaxAppTotalArgLen) + checkSetMax(p.MaxAssetNameBytes, &MaxAssetNameBytes) + checkSetMax(p.MaxAssetUnitNameBytes, &MaxAssetUnitNameBytes) + checkSetMax(p.MaxAssetURLBytes, &MaxAssetURLBytes) + checkSetMax(p.MaxAppBytesValueLen, &MaxAppBytesValueLen) + checkSetMax(p.MaxAppKeyLen, &MaxAppBytesKeyLen) + checkSetMax(int(p.StateProofTopVoters), &StateProofTopVoters) + checkSetMax(p.MaxTxnBytesPerBlock, &MaxTxnBytesPerBlock) + + checkSetMax(p.MaxAppTxnForeignApps, &MaxAppTxnForeignApps) } // DeepCopy creates a deep copy of a consensus protocols map. @@ -669,6 +718,9 @@ func (cp ConsensusProtocols) Merge(configurableConsensus ConsensusProtocols) Con return staticConsensus } +// initConsensusProtocols defines the consensus protocol values and how values change across different versions of the protocol. +// +// These are the only valid and tested consensus values and transitions. Other settings are not tested and may lead to unexpected behavior. func initConsensusProtocols() { // WARNING: copying a ConsensusParams by value into a new variable // does not copy the ApprovedUpgrades map. Make sure that each new @@ -1242,22 +1294,34 @@ func initConsensusProtocols() { // for the sake of future manual calculations, we'll round that down a bit : v37.ApprovedUpgrades[protocol.ConsensusV38] = 10000 - // ConsensusFuture is used to test features that are implemented - // but not yet released in a production protocol version. - vFuture := v38 + v39 := v38 + v39.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} - vFuture.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} + v39.LogicSigVersion = 10 + v39.EnableLogicSigCostPooling = true + + v39.AgreementDeadlineTimeoutPeriod0 = 4 * time.Second + + v39.DynamicFilterTimeout = true - vFuture.LogicSigVersion = 10 // When moving this to a release, put a new higher LogicSigVersion here - vFuture.EnableLogicSigCostPooling = true + v39.StateProofBlockHashInLightHeader = true - vFuture.AgreementDeadlineTimeoutPeriod0 = 4 * time.Second + // For future upgrades, round times will likely be shorter so giving ourselves some buffer room + v39.MaxUpgradeWaitRounds = 250000 - vFuture.StateProofBlockHashInLightHeader = true + Consensus[protocol.ConsensusV39] = v39 + + // v38 can be upgraded to v39, with an update delay of 7d: + // 157000 = (7 * 24 * 60 * 60 / 3.3 round times currently) + // but our current max is 150000 so using that : + v38.ApprovedUpgrades[protocol.ConsensusV39] = 150000 + + // ConsensusFuture is used to test features that are implemented + // but not yet released in a production protocol version. + vFuture := v39 + vFuture.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} - // Setting DynamicFilterTimeout in vFuture will impact e2e test performance - // by reducing round time. Hence, it is commented out for now. - // vFuture.DynamicFilterTimeout = true + vFuture.LogicSigVersion = 11 // When moving this to a release, put a new higher LogicSigVersion here Consensus[protocol.ConsensusFuture] = vFuture diff --git a/protocol/consensus.go b/protocol/consensus.go index 3a9e525d..aad06796 100644 --- a/protocol/consensus.go +++ b/protocol/consensus.go @@ -195,6 +195,12 @@ const ConsensusV38 = ConsensusVersion( "https://github.com/algorandfoundation/specs/tree/abd3d4823c6f77349fc04c3af7b1e99fe4df699f", ) +// ConsensusV39 enables dynamic filter timeouts, a deadline timeout of 4 seconds, +// TEAL v10 logicSig opcode budget pooling along with elliptic curve ops on some pairing friendly curves. +const ConsensusV39 = ConsensusVersion( + "https://github.com/algorandfoundation/specs/tree/925a46433742afb0b51bb939354bd907fa88bf95", +) + // ConsensusFuture is a protocol that should not appear in any production // network, but is used to test features before they are released. const ConsensusFuture = ConsensusVersion( @@ -224,7 +230,7 @@ const ConsensusVAlpha5 = ConsensusVersion("alpha5") // ConsensusCurrentVersion is the latest version and should be used // when a specific version is not provided. -const ConsensusCurrentVersion = ConsensusV38 +const ConsensusCurrentVersion = ConsensusV39 // Error is used to indicate that an unsupported protocol has been detected. type Error ConsensusVersion diff --git a/types/applications.go b/types/applications.go index fb9a5a94..b398f7cf 100644 --- a/types/applications.go +++ b/types/applications.go @@ -105,7 +105,7 @@ type ApplicationCallTxnFields struct { ApplicationID AppIndex `codec:"apid"` OnCompletion OnCompletion `codec:"apan"` - ApplicationArgs [][]byte `codec:"apaa,allocbound=encodedMaxApplicationArgs"` + ApplicationArgs [][]byte `codec:"apaa,allocbound=encodedMaxApplicationArgs,maxtotalbytes=config.MaxAppTotalArgLen"` Accounts []Address `codec:"apat,allocbound=encodedMaxAccounts"` ForeignApps []AppIndex `codec:"apfa,allocbound=encodedMaxForeignApps"` ForeignAssets []AssetIndex `codec:"apas,allocbound=encodedMaxForeignAssets"` diff --git a/types/asset.go b/types/asset.go index 3fa226ca..89e28426 100644 --- a/types/asset.go +++ b/types/asset.go @@ -40,14 +40,14 @@ type AssetParams struct { // UnitName specifies a hint for the name of a unit of // this asset. - UnitName string `codec:"un"` + UnitName string `codec:"un,allocbound=config.MaxAssetUnitNameBytes"` // AssetName specifies a hint for the name of the asset. - AssetName string `codec:"an"` + AssetName string `codec:"an,allocbound=config.MaxAssetNameBytes"` // URL specifies a URL where more information about the asset can be // retrieved - URL string `codec:"au"` + URL string `codec:"au,allocbound=config.MaxAssetURLBytes"` // MetadataHash specifies a commitment to some unspecified asset // metadata. The format of this metadata is up to the application. diff --git a/types/block.go b/types/block.go index 2e2a1f6c..213fa86c 100644 --- a/types/block.go +++ b/types/block.go @@ -23,7 +23,7 @@ type ( TimeStamp int64 `codec:"ts"` // Genesis ID to which this block belongs. - GenesisID string `codec:"gen"` + GenesisID string `codec:"gen,allocbound=config.MaxGenesisIDLen"` // Genesis hash to which this block belongs. GenesisHash Digest `codec:"gh"` @@ -79,14 +79,9 @@ type ( UpgradeState UpgradeVote - // TxnCounter counts the number of transactions committed in the - // ledger, from the time at which support for this feature was - // introduced. - // - // Specifically, TxnCounter is the number of the next transaction - // that will be committed after this block. It is 0 when no - // transactions have ever been committed (since TxnCounter - // started being supported). + // TxnCounter is the number of the next transaction that will be + // committed after this block. Genesis blocks can start at either + // 0 or 1000, depending on a consensus parameter (AppForbidLowResources). TxnCounter uint64 `codec:"tc"` // StateProofTracking tracks the status of the state proofs, potentially @@ -205,7 +200,7 @@ type ( // A Block contains the Payset and metadata corresponding to a given Round. Block struct { BlockHeader - Payset Payset `codec:"txns"` + Payset Payset `codec:"txns,maxtotalbytes=config.MaxTxnBytesPerBlock"` } // A Payset represents a common, unforgeable, consistent, ordered set of SignedTxn objects. diff --git a/types/genesis.go b/types/genesis.go index 7939b644..4e6ab066 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -70,8 +70,9 @@ type Account struct { Status byte `codec:"onl"` MicroAlgos uint64 `codec:"algo"` VoteID [32]byte `codec:"vote"` - SelectionID [32]byte `codec:"sel"` StateProofID [64]byte `codec:"stprf"` + SelectionID [32]byte `codec:"sel"` + VoteFirstValid uint64 `codec:"voteFst"` VoteLastValid uint64 `codec:"voteLst"` VoteKeyDilution uint64 `codec:"voteKD"` } diff --git a/types/statedelta.go b/types/statedelta.go index 54c71fb5..84c3a00c 100644 --- a/types/statedelta.go +++ b/types/statedelta.go @@ -313,8 +313,9 @@ type LedgerStateDelta struct { // new block header; read-only Hdr *BlockHeader - // next round for which we expect a state proof. - // zero if no state proof is expected. + // StateProofNext represents modification on StateProofNextRound field in the block header. If the block contains + // a valid state proof transaction, this field will contain the next round for state proof. + // otherwise it will be set to 0. StateProofNext Round // previous block timestamp From b8e04a7cf6d10a2522e325e5de035b678f840539 Mon Sep 17 00:00:00 2001 From: gmalouf Date: Fri, 15 Dec 2023 18:24:49 +0000 Subject: [PATCH 05/23] bump up version to v2.4.0 --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7315c10..43467b22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +# v2.4.0 + + + +## What's Changed +### Enhancements +* protocol: Add block hash to state proof's LightBlockHeader by @zeldovich in https://github.com/algorand/go-algorand-sdk/pull/589 +* Consensus Config: Add period 0 deadline timeout parameter to consensus params. by @gmalouf in https://github.com/algorand/go-algorand-sdk/pull/618 +* Consensus: Update consensus files for v39 along with types sync. by @gmalouf in https://github.com/algorand/go-algorand-sdk/pull/621 +### Other +* Regenerate code with the latest specification file (b5adad95) by @github-actions in https://github.com/algorand/go-algorand-sdk/pull/620 + +## New Contributors +* @zeldovich made their first contribution in https://github.com/algorand/go-algorand-sdk/pull/589 + +**Full Changelog**: https://github.com/algorand/go-algorand-sdk/compare/v2.3.0...v2.4.0 + # v2.3.0 ## What's Changed From 9ba609b21879b27b81baaaf939381631f8617c8c Mon Sep 17 00:00:00 2001 From: Jason Paulos Date: Tue, 27 Feb 2024 16:40:50 -0500 Subject: [PATCH 06/23] Fix: Fix indexer sync issue in cucumber tests (#628) --- test/applications_integration_test.go | 36 ++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/test/applications_integration_test.go b/test/applications_integration_test.go index 88a4e6da..02466f86 100644 --- a/test/applications_integration_test.go +++ b/test/applications_integration_test.go @@ -36,6 +36,7 @@ var transientAccount crypto.Account var applicationId uint64 var applicationIds []uint64 var txComposerMethodResults []transaction.ABIMethodResult +var lastTxConfirmedRound uint64 func anAlgodVClientConnectedToPortWithToken(v int, host string, port int, token string) error { var err error @@ -238,10 +239,11 @@ func iSignAndSubmitTheTransactionSavingTheTxidIfThereIsAnErrorItIs(expectedErr s } func iWaitForTheTransactionToBeConfirmed() error { - _, err := transaction.WaitForConfirmation(algodV2client, txid, 1, context.Background()) + res, err := transaction.WaitForConfirmation(algodV2client, txid, 1, context.Background()) if err != nil { return err } + lastTxConfirmedRound = res.ConfirmedRound return nil } @@ -867,8 +869,34 @@ func currentApplicationShouldHaveFollowingBoxes(fromClient, encodedBoxesRaw stri return nil } -func sleptForNMilliSecsForIndexer(n int) error { - time.Sleep(time.Duration(n) * time.Millisecond) +func waitForIndexerToCatchUp() error { + const maxAttempts = 30 + + roundToWaitFor := lastTxConfirmedRound + indexerRound := uint64(0) + attempts := 0 + + for { + res, err := indexerV2client.HealthCheck().Do(context.Background()) + if err != nil { + return err + } + indexerRound = res.Round + if indexerRound >= roundToWaitFor { + // Success + break + } + + // Sleep for 1 second and try again + time.Sleep(time.Second) + attempts++ + + if attempts > maxAttempts { + // Failsafe to prevent infinite loop + return fmt.Errorf("timeout waiting for indexer to catch up to round %d. It is currently on %d", roundToWaitFor, indexerRound) + } + } + return nil } @@ -963,5 +991,5 @@ func ApplicationsContext(s *godog.Suite) { s.Step(`^according to "([^"]*)", the current application should have the following boxes "([^"]*)"\.$`, currentApplicationShouldHaveFollowingBoxes) s.Step(`^according to "([^"]*)", with (\d+) being the parameter that limits results, the current application should have (\d+) boxes\.$`, currentApplicationShouldHaveBoxNum) s.Step(`^according to indexer, with (\d+) being the parameter that limits results, and "([^"]*)" being the parameter that sets the next result, the current application should have the following boxes "([^"]*)"\.$`, indexerSaysCurrentAppShouldHaveTheseBoxes) - s.Step(`^I sleep for (\d+) milliseconds for indexer to digest things down\.$`, sleptForNMilliSecsForIndexer) + s.Step(`^I wait for indexer to catch up to the round where my most recent transaction was confirmed\.$`, waitForIndexerToCatchUp) } From b04b078250ccd7ef03c605719fed6601b8bc28e0 Mon Sep 17 00:00:00 2001 From: Gary <982483+gmalouf@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:29:56 -0500 Subject: [PATCH 07/23] Bump go version for builds/workflows to 1.20.14. (#629) --- .circleci/config.yml | 2 +- .github/workflows/reviewdog.yml | 4 ++-- test/docker/Dockerfile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5fb9a5b9..85d2e3cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ workflows: name: 'test_go_<< matrix.go_version >>' matrix: parameters: - go_version: ['1.20.5'] + go_version: ['1.20.14'] jobs: test: diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 2f3845da..4cb4b7b5 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -12,7 +12,7 @@ jobs: - name: Install specific golang uses: actions/setup-go@v4.0.1 with: - go-version: '1.20.5' + go-version: '1.20.14' - name: Check format run: test -z `go fmt ./...` - name: Vet @@ -22,7 +22,7 @@ jobs: with: golangci_lint_version: "v1.53.2" golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners" - go_version: "1.20.5" + go_version: "1.20.14" reporter: "github-pr-review" tool_name: "Lint Errors" level: "error" diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 610e5c7e..ad11856f 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_IMAGE=golang:1.20.5 +ARG GO_IMAGE=golang:1.20.14 FROM $GO_IMAGE # Copy SDK code into the container From fdcedea4f7c664f4677cb5bf36504ec2d3ebfa90 Mon Sep 17 00:00:00 2001 From: John Jannotti Date: Wed, 24 Apr 2024 11:18:47 -0400 Subject: [PATCH 08/23] Incentives: Add fields in block header for proposer and fees collected. (#617) * Add fields in block header for proposer and fees collected. * Add payouts related fields to Account * update consensus.go * Add absent participation accounts --- protocol/config/consensus.go | 122 +++++++++++++++++++++++++++++++++-- types/block.go | 23 +++++++ types/statedelta.go | 4 ++ 3 files changed, 145 insertions(+), 4 deletions(-) diff --git a/protocol/config/consensus.go b/protocol/config/consensus.go index 94ce41be..6719f10f 100644 --- a/protocol/config/consensus.go +++ b/protocol/config/consensus.go @@ -428,8 +428,8 @@ type ConsensusParams struct { EnableExtraPagesOnAppUpdate bool - // MaxProposedExpiredOnlineAccounts is the maximum number of online accounts, which need - // to be taken offline, that would be proposed to be taken offline. + // MaxProposedExpiredOnlineAccounts is the maximum number of online accounts + // that a proposer can take offline for having expired voting keys. MaxProposedExpiredOnlineAccounts int // EnableAccountDataResourceSeparation enables the support for extended application and asset storage @@ -510,6 +510,101 @@ type ConsensusParams struct { // arrival times or is set to a static value. Even if this flag disables the // dynamic filter, it will be calculated and logged (but not used). DynamicFilterTimeout bool + + // Payouts contains parameters for amounts and eligibility for block proposer + // payouts. It excludes information about the "unsustainable" payouts + // described in BonusPlan. + Payouts ProposerPayoutRules + + // Bonus contains parameters related to the extra payout made to block + // proposers, unrelated to the fees paid in that block. For it to actually + // occur, extra funds need to be put into the FeeSink. The bonus amount + // decays exponentially. + Bonus BonusPlan +} + +// ProposerPayoutRules puts several related consensus parameters in one place. The same +// care for backward compatibility with old blocks must be taken. +type ProposerPayoutRules struct { + // Enabled turns on several things needed for paying block incentives, + // including tracking of the proposer and fees collected. + Enabled bool + + // GoOnlineFee imparts a small cost on moving from offline to online. This + // will impose a cost to running unreliable nodes that get suspended and + // then come back online. + GoOnlineFee uint64 + + // Percent specifies the percent of fees paid in a block that go to the + // proposer instead of the FeeSink. + Percent uint64 + + // MinBalance is the minimum balance an account must have to be eligible for + // incentives. It ensures that smaller accounts continue to operate for the + // same motivations they had before block incentives were + // introduced. Without that assurance, it is difficult to model their + // behaviour - might many participants join for the hope of easy financial + // rewards, but without caring enough to run a high-quality node? + MinBalance uint64 + + // MaxBalance is the maximum balance an account can have to be eligible for + // incentives. It encourages large accounts to split their stake to add + // resilience to consensus in the case of outages. Nothing in protocol can + // prevent such accounts from running nodes that share fate (same machine, + // same data center, etc), but this serves as a gentle reminder. + MaxBalance uint64 + + // MaxMarkAbsent is the maximum number of online accounts, that a proposer + // can suspend for not proposing "lately" (In 10x expected interval, or + // within a grace period from being challenged) + MaxMarkAbsent int + + // Challenges occur once every challengeInterval rounds. + ChallengeInterval uint64 + // Suspensions happen between 1 and 2 grace periods after a challenge. Must + // be less than half MaxTxnLife to ensure the Block header will be cached + // and less than half ChallengeInterval to avoid overlapping challenges. A larger + // grace period means larger stake nodes will probably propose before they + // need to consider an active heartbeat. + ChallengeGracePeriod uint64 + // An account is challenged if the first challengeBits match the start of + // the account address. An online account will be challenged about once + // every interval*2^bits rounds. + ChallengeBits int +} + +// BonusPlan describes how the "extra" proposer payouts are to be made. It +// specifies an exponential decay in which the bonus decreases by 1% every n +// rounds. If we need to change the decay rate (only), we would create a new +// plan like: +// +// BaseAmount: 0, DecayInterval: XXX +// +// by using a zero baseAmount, the amount not affected. +// For a bigger change, we'd use a plan like: +// +// BaseRound: , BaseAmount: , DecayInterval: +// +// or just +// +// BaseAmount: , DecayInterval: +// +// the new decay rate would go into effect at upgrade time, and the new +// amount would be set at baseRound or at upgrade time. +type BonusPlan struct { + // BaseRound is the earliest round this plan can apply. Of course, the + // consensus update must also have happened. So using a low value makes it + // go into effect immediately upon upgrade. + BaseRound uint64 + // BaseAmount is the bonus to be paid when this plan first applies (see + // baseRound). If it is zero, then no explicit change is made to the bonus + // (useful for only changing the decay rate). + BaseAmount uint64 + // DecayInterval is the time in rounds between 1% decays. For simplicity, + // decay occurs based on round % BonusDecayInterval, so a decay can happen right + // after going into effect. The BonusDecayInterval goes into effect at upgrade + // time, regardless of `baseRound`. + DecayInterval uint64 } // PaysetCommitType enumerates possible ways for the block header to commit to @@ -584,10 +679,14 @@ var MaxExtraAppProgramLen int // supported supported by any of the consensus protocols. used for decoding purposes. var MaxAvailableAppProgramLen int -// MaxProposedExpiredOnlineAccounts is the maximum number of online accounts, which need -// to be taken offline, that would be proposed to be taken offline. +// MaxProposedExpiredOnlineAccounts is the maximum number of online accounts +// that a proposer can take offline for having expired voting keys. var MaxProposedExpiredOnlineAccounts int +// MaxMarkAbsent is the maximum number of online accounts that a proposer can +// suspend for not proposing "lately" +var MaxMarkAbsent int + // MaxAppTotalArgLen is the maximum number of bytes across all arguments of an application // max sum([len(arg) for arg in txn.ApplicationArgs]) var MaxAppTotalArgLen int @@ -661,6 +760,7 @@ func checkSetAllocBounds(p ConsensusParams) { checkSetMax(p.MaxAppProgramLen, &MaxLogCalls) checkSetMax(p.MaxInnerTransactions*p.MaxTxGroupSize, &MaxInnerTransactionsPerDelta) checkSetMax(p.MaxProposedExpiredOnlineAccounts, &MaxProposedExpiredOnlineAccounts) + checkSetMax(p.Payouts.MaxMarkAbsent, &MaxMarkAbsent) // These bounds are exported to make them available to the msgp generator for calculating // maximum valid message size for each message going across the wire. @@ -1323,6 +1423,20 @@ func initConsensusProtocols() { vFuture.LogicSigVersion = 11 // When moving this to a release, put a new higher LogicSigVersion here + vFuture.Payouts.Enabled = true + vFuture.Payouts.Percent = 75 + vFuture.Payouts.GoOnlineFee = 2_000_000 // 2 algos + vFuture.Payouts.MinBalance = 30_000_000_000 // 30,000 algos + vFuture.Payouts.MaxBalance = 70_000_000_000_000 // 70M algos + vFuture.Payouts.MaxMarkAbsent = 32 + vFuture.Payouts.ChallengeInterval = 1000 + vFuture.Payouts.ChallengeGracePeriod = 200 + vFuture.Payouts.ChallengeBits = 5 + + vFuture.Bonus.BaseAmount = 10_000_000 // 10 Algos + // 2.9 sec rounds gives about 10.8M rounds per year. + vFuture.Bonus.DecayInterval = 250_000 // .99^(10.8/0.25) ~ .648. So 35% decay per year + Consensus[protocol.ConsensusFuture] = vFuture // vAlphaX versions are an separate series of consensus parameters and versions for alphanet diff --git a/types/block.go b/types/block.go index 213fa86c..dcddb468 100644 --- a/types/block.go +++ b/types/block.go @@ -28,6 +28,25 @@ type ( // Genesis hash to which this block belongs. GenesisHash Digest `codec:"gh"` + // Proposer is the proposer of this block. Like the Seed, agreement adds + // this after the block is assembled by the transaction pool, so that the same block can be prepared + // for multiple participating accounts in the same node. Populated if proto.Payouts.Enabled + Proposer Address `codec:"prp"` + + // FeesCollected is the sum of all fees paid by transactions in this + // block. Populated if proto.EnableMining. + FeesCollected MicroAlgos `codec:"fc"` + + // Bonus is the bonus incentive to be paid for proposing this block. It + // begins as a consensus parameter value, and decays periodically. + Bonus MicroAlgos `codec:"bi"` + + // ProposerPayout is the amount that should be moved from the FeeSink to + // the Proposer at the start of the next block. It is basically the + // bonus + the payouts percent of FeesCollected, but may be zero'd by + // proposer ineligibility. + ProposerPayout MicroAlgos `codec:"pp"` + // Rewards. // // When a block is applied, some amount of rewards are accrued to @@ -115,6 +134,10 @@ type ( // that needs to be converted to offline since their // participation key expired. ExpiredParticipationAccounts []Address `codec:"partupdrmv"` + + // AbsentParticipationAccounts contains a list of online accounts that + // needs to be converted to offline since they are not proposing. + AbsentParticipationAccounts []Address `codec:"partupdabs"` } // RewardsState represents the global parameters controlling the rate diff --git a/types/statedelta.go b/types/statedelta.go index 84c3a00c..405b8d92 100644 --- a/types/statedelta.go +++ b/types/statedelta.go @@ -159,6 +159,7 @@ type AccountBaseData struct { RewardsBase uint64 RewardedMicroAlgos MicroAlgos AuthAddr Address + IncentiveEligible bool TotalAppSchema StateSchema // Totals across created globals, and opted in locals. TotalExtraAppPages uint32 // Total number of extra pages across all created apps @@ -168,6 +169,9 @@ type AccountBaseData struct { TotalAssets uint64 // Total of asset creations and optins (i.e. number of holdings) TotalBoxes uint64 // Total number of boxes associated to this account TotalBoxBytes uint64 // Total bytes for this account's boxes. keys _and_ values count + + LastProposed Round // The last round that this account proposed the winning block. + LastHeartbeat Round // The last round that this account sent a heartbeat to show it was online. } // AccountData provides users of the Balances interface per-account data (like basics.AccountData) From 9194408dd0b25dab6b33be6ed261fc36795ad7bf Mon Sep 17 00:00:00 2001 From: tianzedavid <168427849+tianzedavid@users.noreply.github.com> Date: Wed, 1 May 2024 22:39:13 +0800 Subject: [PATCH 09/23] chore: fix function names (#632) Signed-off-by: tianzedavid --- client/v2/algod/algod.go | 2 +- client/v2/indexer/indexer.go | 2 +- transaction/transaction.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/v2/algod/algod.go b/client/v2/algod/algod.go index 48deecf4..3e27a010 100644 --- a/client/v2/algod/algod.go +++ b/client/v2/algod/algod.go @@ -27,7 +27,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers) } -// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response +// getRaw performs a GET request to the specific path against the server, assumes msgpack response func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) { return (*common.Client)(c).GetRaw(ctx, path, body, headers) } diff --git a/client/v2/indexer/indexer.go b/client/v2/indexer/indexer.go index e0e5cf2c..d35e503b 100644 --- a/client/v2/indexer/indexer.go +++ b/client/v2/indexer/indexer.go @@ -26,7 +26,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers) } -// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response +// getRaw performs a GET request to the specific path against the server, assumes msgpack response func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) { return (*common.Client)(c).GetRaw(ctx, path, body, headers) } diff --git a/transaction/transaction.go b/transaction/transaction.go index b7d40715..46c06c65 100644 --- a/transaction/transaction.go +++ b/transaction/transaction.go @@ -556,7 +556,7 @@ func byte32FromBase64(in string) (out [32]byte, err error) { return } -// byte32FromBase64 decodes the input base64 string and outputs a +// byte64FromBase64 decodes the input base64 string and outputs a // 64 byte array, erroring if the input is the wrong length. func byte64FromBase64(in string) (out [64]byte, err error) { slice, err := base64.StdEncoding.DecodeString(in) From ce9fe60261649e534b220a8dce423c23aab58f19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 10:50:40 -0400 Subject: [PATCH 10/23] Regenerate code from specification file (#631) Co-authored-by: Algorand Generation Bot --- client/v2/algod/algod.go | 4 ++ client/v2/algod/getBlockLogs.go | 23 +++++++++ client/v2/common/models/account.go | 48 +++++++++++-------- .../v2/common/models/account_participation.go | 16 +++---- client/v2/common/models/app_call_logs.go | 14 ++++++ client/v2/common/models/application.go | 4 +- .../common/models/application_local_state.go | 4 +- .../v2/common/models/application_log_data.go | 2 +- client/v2/common/models/application_params.go | 12 ++--- .../common/models/application_state_schema.go | 4 +- client/v2/common/models/asset_holding.go | 4 +- client/v2/common/models/asset_params.go | 39 ++++++++------- client/v2/common/models/block.go | 12 +++++ .../v2/common/models/block_logs_response.go | 13 +++++ .../v2/common/models/participation_updates.go | 4 ++ client/v2/common/models/teal_value.go | 6 +-- 16 files changed, 144 insertions(+), 65 deletions(-) create mode 100644 client/v2/algod/getBlockLogs.go create mode 100644 client/v2/common/models/app_call_logs.go create mode 100644 client/v2/common/models/block_logs_response.go diff --git a/client/v2/algod/algod.go b/client/v2/algod/algod.go index 3e27a010..1c631e7a 100644 --- a/client/v2/algod/algod.go +++ b/client/v2/algod/algod.go @@ -110,6 +110,10 @@ func (c *Client) GetTransactionProof(round uint64, txid string) *GetTransactionP return &GetTransactionProof{c: c, round: round, txid: txid} } +func (c *Client) GetBlockLogs(round uint64) *GetBlockLogs { + return &GetBlockLogs{c: c, round: round} +} + func (c *Client) Supply() *Supply { return &Supply{c: c} } diff --git a/client/v2/algod/getBlockLogs.go b/client/v2/algod/getBlockLogs.go new file mode 100644 index 00000000..c0f9354d --- /dev/null +++ b/client/v2/algod/getBlockLogs.go @@ -0,0 +1,23 @@ +package algod + +import ( + "context" + "fmt" + + "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" +) + +// GetBlockLogs get all of the logs from outer and inner app calls in the given +// round +type GetBlockLogs struct { + c *Client + + round uint64 +} + +// Do performs the HTTP request +func (s *GetBlockLogs) Do(ctx context.Context, headers ...*common.Header) (response models.BlockLogsResponse, err error) { + err = s.c.get(ctx, &response, fmt.Sprintf("/v2/blocks/%s/logs", common.EscapeParams(s.round)...), nil, headers) + return +} diff --git a/client/v2/common/models/account.go b/client/v2/common/models/account.go index c394ca61..6556868f 100644 --- a/client/v2/common/models/account.go +++ b/client/v2/common/models/account.go @@ -7,44 +7,44 @@ type Account struct { // Address the account public key Address string `json:"address"` - // Amount (algo) total number of MicroAlgos in the account + // Amount total number of MicroAlgos in the account Amount uint64 `json:"amount"` // AmountWithoutPendingRewards specifies the amount of MicroAlgos in the account, // without the pending rewards. AmountWithoutPendingRewards uint64 `json:"amount-without-pending-rewards"` - // AppsLocalState (appl) applications local data stored in this account. + // AppsLocalState application local data stored in this account. // Note the raw object uses `map[int] -> AppLocalState` for this type. AppsLocalState []ApplicationLocalState `json:"apps-local-state,omitempty"` - // AppsTotalExtraPages (teap) the sum of all extra application program pages for - // this account. + // AppsTotalExtraPages the sum of all extra application program pages for this + // account. AppsTotalExtraPages uint64 `json:"apps-total-extra-pages,omitempty"` - // AppsTotalSchema (tsch) stores the sum of all of the local schemas and global - // schemas in this account. + // AppsTotalSchema the sum of all of the local schemas and global schemas in this + // account. // Note: the raw account uses `StateSchema` for this type. AppsTotalSchema ApplicationStateSchema `json:"apps-total-schema,omitempty"` - // Assets (asset) assets held by this account. + // Assets assets held by this account. // Note the raw object uses `map[int] -> AssetHolding` for this type. Assets []AssetHolding `json:"assets,omitempty"` - // AuthAddr (spend) the address against which signing should be checked. If empty, - // the address of the current account is used. This field can be updated in any + // AuthAddr the address against which signing should be checked. If empty, the + // address of the current account is used. This field can be updated in any // transaction by setting the RekeyTo field. AuthAddr string `json:"auth-addr,omitempty"` // ClosedAtRound round during which this account was most recently closed. ClosedAtRound uint64 `json:"closed-at-round,omitempty"` - // CreatedApps (appp) parameters of applications created by this account including - // app global data. + // CreatedApps parameters of applications created by this account including app + // global data. // Note: the raw account uses `map[int] -> AppParams` for this type. CreatedApps []Application `json:"created-apps,omitempty"` - // CreatedAssets (apar) parameters of assets created by this account. + // CreatedAssets parameters of assets created by this account. // Note: the raw account uses `map[int] -> Asset` for this type. CreatedAssets []Asset `json:"created-assets,omitempty"` @@ -54,6 +54,17 @@ type Account struct { // Deleted whether or not this account is currently closed. Deleted bool `json:"deleted,omitempty"` + // IncentiveEligible can the account receive block incentives if its balance is in + // range at proposal time. + IncentiveEligible bool `json:"incentive-eligible,omitempty"` + + // LastHeartbeat the round in which this account last went online, or explicitly + // renewed their online status. + LastHeartbeat uint64 `json:"last-heartbeat,omitempty"` + + // LastProposed the round in which this account last proposed the block. + LastProposed uint64 `json:"last-proposed,omitempty"` + // Participation accountParticipation describes the parameters used by this account // in consensus protocol. Participation AccountParticipation `json:"participation,omitempty"` @@ -61,26 +72,25 @@ type Account struct { // PendingRewards amount of MicroAlgos of pending rewards in this account. PendingRewards uint64 `json:"pending-rewards"` - // RewardBase (ebase) used as part of the rewards computation. Only applicable to - // accounts which are participating. + // RewardBase used as part of the rewards computation. Only applicable to accounts + // which are participating. RewardBase uint64 `json:"reward-base,omitempty"` - // Rewards (ern) total rewards of MicroAlgos the account has received, including - // pending rewards. + // Rewards total rewards of MicroAlgos the account has received, including pending + // rewards. Rewards uint64 `json:"rewards"` // Round the round for which this information is relevant. Round uint64 `json:"round"` - // SigType indicates what type of signature is used by this account, must be one - // of: + // SigType the type of signature used by this account, must be one of: // * sig // * msig // * lsig // * or null if unknown SigType string `json:"sig-type,omitempty"` - // Status (onl) delegation status of the account's MicroAlgos + // Status voting status of the account's MicroAlgos // * Offline - indicates that the associated account is delegated. // * Online - indicates that the associated account used as part of the delegation // pool. diff --git a/client/v2/common/models/account_participation.go b/client/v2/common/models/account_participation.go index f7f51b82..a94dbd7b 100644 --- a/client/v2/common/models/account_participation.go +++ b/client/v2/common/models/account_participation.go @@ -3,23 +3,23 @@ package models // AccountParticipation accountParticipation describes the parameters used by this // account in consensus protocol. type AccountParticipation struct { - // SelectionParticipationKey (sel) Selection public key (if any) currently - // registered for this round. + // SelectionParticipationKey selection public key (if any) currently registered for + // this round. SelectionParticipationKey []byte `json:"selection-participation-key"` - // StateProofKey (stprf) Root of the state proof key (if any) + // StateProofKey root of the state proof key (if any) StateProofKey []byte `json:"state-proof-key,omitempty"` - // VoteFirstValid (voteFst) First round for which this participation is valid. + // VoteFirstValid first round for which this participation is valid. VoteFirstValid uint64 `json:"vote-first-valid"` - // VoteKeyDilution (voteKD) Number of subkeys in each batch of participation keys. + // VoteKeyDilution number of subkeys in each batch of participation keys. VoteKeyDilution uint64 `json:"vote-key-dilution"` - // VoteLastValid (voteLst) Last round for which this participation is valid. + // VoteLastValid last round for which this participation is valid. VoteLastValid uint64 `json:"vote-last-valid"` - // VoteParticipationKey (vote) root participation public key (if any) currently - // registered for this round. + // VoteParticipationKey root participation public key (if any) currently registered + // for this round. VoteParticipationKey []byte `json:"vote-participation-key"` } diff --git a/client/v2/common/models/app_call_logs.go b/client/v2/common/models/app_call_logs.go new file mode 100644 index 00000000..dd48f389 --- /dev/null +++ b/client/v2/common/models/app_call_logs.go @@ -0,0 +1,14 @@ +package models + +// AppCallLogs the logged messages from an app call along with the app ID and outer +// transaction ID. Logs appear in the same order that they were emitted. +type AppCallLogs struct { + // ApplicationIndex the application from which the logs were generated + ApplicationIndex uint64 `json:"application-index"` + + // Logs an array of logs + Logs [][]byte `json:"logs"` + + // Txid the transaction ID of the outer app call that lead to these logs + Txid string `json:"txId"` +} diff --git a/client/v2/common/models/application.go b/client/v2/common/models/application.go index 0d7acdf1..9cc8db00 100644 --- a/client/v2/common/models/application.go +++ b/client/v2/common/models/application.go @@ -11,9 +11,9 @@ type Application struct { // DeletedAtRound round when this application was deleted. DeletedAtRound uint64 `json:"deleted-at-round,omitempty"` - // Id (appidx) application index. + // Id application index. Id uint64 `json:"id"` - // Params (appparams) application parameters. + // Params application parameters. Params ApplicationParams `json:"params"` } diff --git a/client/v2/common/models/application_local_state.go b/client/v2/common/models/application_local_state.go index 397a8fdd..3d5d71d0 100644 --- a/client/v2/common/models/application_local_state.go +++ b/client/v2/common/models/application_local_state.go @@ -12,12 +12,12 @@ type ApplicationLocalState struct { // Id the application which this local state is for. Id uint64 `json:"id"` - // KeyValue (tkv) storage. + // KeyValue storage. KeyValue []TealKeyValue `json:"key-value,omitempty"` // OptedInAtRound round when the account opted into the application. OptedInAtRound uint64 `json:"opted-in-at-round,omitempty"` - // Schema (hsch) schema. + // Schema schema. Schema ApplicationStateSchema `json:"schema"` } diff --git a/client/v2/common/models/application_log_data.go b/client/v2/common/models/application_log_data.go index 0bf569a2..28e39621 100644 --- a/client/v2/common/models/application_log_data.go +++ b/client/v2/common/models/application_log_data.go @@ -2,7 +2,7 @@ package models // ApplicationLogData stores the global information associated with an application. type ApplicationLogData struct { - // Logs (lg) Logs for the application being executed by the transaction. + // Logs logs for the application being executed by the transaction. Logs [][]byte `json:"logs"` // Txid transaction ID diff --git a/client/v2/common/models/application_params.go b/client/v2/common/models/application_params.go index 4eed80aa..f40c3c75 100644 --- a/client/v2/common/models/application_params.go +++ b/client/v2/common/models/application_params.go @@ -2,25 +2,25 @@ package models // ApplicationParams stores the global information associated with an application. type ApplicationParams struct { - // ApprovalProgram (approv) approval program. + // ApprovalProgram approval program. ApprovalProgram []byte `json:"approval-program"` - // ClearStateProgram (clearp) approval program. + // ClearStateProgram clear state program. ClearStateProgram []byte `json:"clear-state-program"` // Creator the address that created this application. This is the address where the // parameters and global state for this application can be found. Creator string `json:"creator,omitempty"` - // ExtraProgramPages (epp) the amount of extra program pages available to this app. + // ExtraProgramPages the number of extra program pages available to this app. ExtraProgramPages uint64 `json:"extra-program-pages,omitempty"` - // GlobalState [\gs) global schema + // GlobalState global state GlobalState []TealKeyValue `json:"global-state,omitempty"` - // GlobalStateSchema [\gsch) global schema + // GlobalStateSchema global schema GlobalStateSchema ApplicationStateSchema `json:"global-state-schema,omitempty"` - // LocalStateSchema [\lsch) local schema + // LocalStateSchema local schema LocalStateSchema ApplicationStateSchema `json:"local-state-schema,omitempty"` } diff --git a/client/v2/common/models/application_state_schema.go b/client/v2/common/models/application_state_schema.go index 4040aacf..f6b7b36e 100644 --- a/client/v2/common/models/application_state_schema.go +++ b/client/v2/common/models/application_state_schema.go @@ -3,9 +3,9 @@ package models // ApplicationStateSchema specifies maximums on the number of each type that may be // stored. type ApplicationStateSchema struct { - // NumByteSlice (nbs) num of byte slices. + // NumByteSlice number of byte slices. NumByteSlice uint64 `json:"num-byte-slice"` - // NumUint (nui) num of uints. + // NumUint number of uints. NumUint uint64 `json:"num-uint"` } diff --git a/client/v2/common/models/asset_holding.go b/client/v2/common/models/asset_holding.go index 033750a2..34f1a102 100644 --- a/client/v2/common/models/asset_holding.go +++ b/client/v2/common/models/asset_holding.go @@ -4,7 +4,7 @@ package models // Definition: // data/basics/userBalance.go : AssetHolding type AssetHolding struct { - // Amount (a) number of units held. + // Amount number of units held. Amount uint64 `json:"amount"` // AssetId asset ID of the holding. @@ -13,7 +13,7 @@ type AssetHolding struct { // Deleted whether or not the asset holding is currently deleted from its account. Deleted bool `json:"deleted,omitempty"` - // IsFrozen (f) whether or not the holding is frozen. + // IsFrozen whether or not the holding is frozen. IsFrozen bool `json:"is-frozen"` // OptedInAtRound round during which the account opted into this asset holding. diff --git a/client/v2/common/models/asset_params.go b/client/v2/common/models/asset_params.go index 6dbf7a0a..7fdba068 100644 --- a/client/v2/common/models/asset_params.go +++ b/client/v2/common/models/asset_params.go @@ -5,8 +5,8 @@ package models // Definition: // data/transactions/asset.go : AssetParams type AssetParams struct { - // Clawback (c) Address of account used to clawback holdings of this asset. If - // empty, clawback is not permitted. + // Clawback address of account used to clawback holdings of this asset. If empty, + // clawback is not permitted. Clawback string `json:"clawback,omitempty"` // Creator the address that created this asset. This is the address where the @@ -14,51 +14,50 @@ type AssetParams struct { // asset units can be sent in the worst case. Creator string `json:"creator"` - // Decimals (dc) The number of digits to use after the decimal point when - // displaying this asset. If 0, the asset is not divisible. If 1, the base unit of - // the asset is in tenths. If 2, the base unit of the asset is in hundredths, and - // so on. This value must be between 0 and 19 (inclusive). + // Decimals the number of digits to use after the decimal point when displaying + // this asset. If 0, the asset is not divisible. If 1, the base unit of the asset + // is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This + // value must be between 0 and 19 (inclusive). Decimals uint64 `json:"decimals"` - // DefaultFrozen (df) Whether holdings of this asset are frozen by default. + // DefaultFrozen whether holdings of this asset are frozen by default. DefaultFrozen bool `json:"default-frozen,omitempty"` - // Freeze (f) Address of account used to freeze holdings of this asset. If empty, + // Freeze address of account used to freeze holdings of this asset. If empty, // freezing is not permitted. Freeze string `json:"freeze,omitempty"` - // Manager (m) Address of account used to manage the keys of this asset and to - // destroy it. + // Manager address of account used to manage the keys of this asset and to destroy + // it. Manager string `json:"manager,omitempty"` - // MetadataHash (am) A commitment to some unspecified asset metadata. The format of - // this metadata is up to the application. + // MetadataHash a commitment to some unspecified asset metadata. The format of this + // metadata is up to the application. MetadataHash []byte `json:"metadata-hash,omitempty"` - // Name (an) Name of this asset, as supplied by the creator. Included only when the + // Name name of this asset, as supplied by the creator. Included only when the // asset name is composed of printable utf-8 characters. Name string `json:"name,omitempty"` // NameB64 base64 encoded name of this asset, as supplied by the creator. NameB64 []byte `json:"name-b64,omitempty"` - // Reserve (r) Address of account holding reserve (non-minted) units of this asset. + // Reserve address of account holding reserve (non-minted) units of this asset. Reserve string `json:"reserve,omitempty"` - // Total (t) The total number of units of this asset. + // Total the total number of units of this asset. Total uint64 `json:"total"` - // UnitName (un) Name of a unit of this asset, as supplied by the creator. Included - // only when the name of a unit of this asset is composed of printable utf-8 - // characters. + // UnitName name of a unit of this asset, as supplied by the creator. Included only + // when the name of a unit of this asset is composed of printable utf-8 characters. UnitName string `json:"unit-name,omitempty"` // UnitNameB64 base64 encoded name of a unit of this asset, as supplied by the // creator. UnitNameB64 []byte `json:"unit-name-b64,omitempty"` - // Url (au) URL where more information about the asset can be retrieved. Included - // only when the URL is composed of printable utf-8 characters. + // Url uRL where more information about the asset can be retrieved. Included only + // when the URL is composed of printable utf-8 characters. Url string `json:"url,omitempty"` // UrlB64 base64 encoded URL where more information about the asset can be diff --git a/client/v2/common/models/block.go b/client/v2/common/models/block.go index 425c40f7..abd3621b 100644 --- a/client/v2/common/models/block.go +++ b/client/v2/common/models/block.go @@ -4,6 +4,12 @@ package models // Definition: // data/bookkeeping/block.go : Block type Block struct { + // Bonus the potential bonus payout for this block. + Bonus uint64 `json:"bonus,omitempty"` + + // FeesCollected the sum of all fees paid by transactions in this block. + FeesCollected uint64 `json:"fees-collected,omitempty"` + // GenesisHash (gh) hash to which this block belongs. GenesisHash []byte `json:"genesis-hash"` @@ -17,6 +23,12 @@ type Block struct { // PreviousBlockHash (prev) Previous block hash. PreviousBlockHash []byte `json:"previous-block-hash"` + // Proposer the proposer of this block. + Proposer string `json:"proposer,omitempty"` + + // ProposerPayout the actual amount transferred to the proposer from the fee sink. + ProposerPayout uint64 `json:"proposer-payout,omitempty"` + // Rewards fields relating to rewards, Rewards BlockRewards `json:"rewards,omitempty"` diff --git a/client/v2/common/models/block_logs_response.go b/client/v2/common/models/block_logs_response.go new file mode 100644 index 00000000..d5d1e140 --- /dev/null +++ b/client/v2/common/models/block_logs_response.go @@ -0,0 +1,13 @@ +package models + +// BlockLogsResponse all logs emitted in the given round. Each app call, whether +// top-level or inner, that contains logs results in a separate AppCallLogs object. +// Therefore there may be multiple AppCallLogs with the same application ID and +// outer transaction ID in the event of multiple inner app calls to the same app. +// App calls with no logs are not included in the response. AppCallLogs are +// returned in the same order that their corresponding app call appeared in the +// block (pre-order traversal of inner app calls) +type BlockLogsResponse struct { + // Logs + Logs []AppCallLogs `json:"logs"` +} diff --git a/client/v2/common/models/participation_updates.go b/client/v2/common/models/participation_updates.go index 74c97fab..06dfe762 100644 --- a/client/v2/common/models/participation_updates.go +++ b/client/v2/common/models/participation_updates.go @@ -3,6 +3,10 @@ package models // ParticipationUpdates participation account data that needs to be checked/acted // on by the network. type ParticipationUpdates struct { + // AbsentParticipationAccounts (partupabs) a list of online accounts that need to + // be suspended. + AbsentParticipationAccounts []string `json:"absent-participation-accounts,omitempty"` + // ExpiredParticipationAccounts (partupdrmv) a list of online accounts that needs // to be converted to offline since their participation key expired. ExpiredParticipationAccounts []string `json:"expired-participation-accounts,omitempty"` diff --git a/client/v2/common/models/teal_value.go b/client/v2/common/models/teal_value.go index 40003898..21594c4a 100644 --- a/client/v2/common/models/teal_value.go +++ b/client/v2/common/models/teal_value.go @@ -2,13 +2,13 @@ package models // TealValue represents a TEAL value. type TealValue struct { - // Bytes (tb) bytes value. + // Bytes bytes value. Bytes string `json:"bytes"` - // Type (tt) value type. Value `1` refers to **bytes**, value `2` refers to + // Type type of the value. Value `1` refers to **bytes**, value `2` refers to // **uint** Type uint64 `json:"type"` - // Uint (ui) uint value. + // Uint uint value. Uint uint64 `json:"uint"` } From 101b412ae9d406d413827847f4d48f822f6dc34c Mon Sep 17 00:00:00 2001 From: Jason Paulos Date: Wed, 8 May 2024 14:34:08 -0400 Subject: [PATCH 11/23] Fix funding for cucumber tests by rotating sender accounts (#630) --- test/applications_integration_test.go | 16 ++++++++++++--- test/steps_test.go | 28 ++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/test/applications_integration_test.go b/test/applications_integration_test.go index 02466f86..9003f4a4 100644 --- a/test/applications_integration_test.go +++ b/test/applications_integration_test.go @@ -60,11 +60,17 @@ func iCreateANewTransientAccountAndFundItWithMicroalgos(microalgos int) error { } params.Fee = types.MicroAlgos(fee) - ltxn, err := transaction.MakePaymentTxn(accounts[1], transientAccount.Address.String(), uint64(microalgos), note, close, params) + + funder, err := fundingAccount(algodV2client, uint64(microalgos)) + if err != nil { + return err + } + + ltxn, err := transaction.MakePaymentTxn(funder, transientAccount.Address.String(), uint64(microalgos), note, close, params) if err != nil { return err } - lsk, err := kcl.ExportKey(handle, walletPswd, accounts[1]) + lsk, err := kcl.ExportKey(handle, walletPswd, funder) if err != nil { return err } @@ -91,7 +97,11 @@ func iFundTheCurrentApplicationsAddress(microalgos int) error { return err } - txn, err := transaction.MakePaymentTxn(accounts[0], address.String(), uint64(microalgos), nil, "", params) + funder, err := fundingAccount(algodV2client, uint64(microalgos)) + if err != nil { + return err + } + txn, err := transaction.MakePaymentTxn(funder, address.String(), uint64(microalgos), nil, "", params) if err != nil { return err } diff --git a/test/steps_test.go b/test/steps_test.go index 85779912..bd5dbd80 100644 --- a/test/steps_test.go +++ b/test/steps_test.go @@ -10,6 +10,7 @@ import ( "encoding/json" "flag" "fmt" + "math/rand" "os" "path" "reflect" @@ -148,13 +149,38 @@ func waitForAlgodInDevMode() { time.Sleep(500 * time.Millisecond) } +// fundingAccount finds an account with enough funds to fund the given amount +func fundingAccount(client *algodV2.Client, amount uint64) (string, error) { + // Random shuffle to spread the load + shuffledAccounts := make([]string, len(accounts)) + copy(shuffledAccounts, accounts) + rand.Shuffle(len(shuffledAccounts), func(i, j int) { + shuffledAccounts[i], shuffledAccounts[j] = shuffledAccounts[j], shuffledAccounts[i] + }) + for _, accountAddress := range shuffledAccounts { + res, err := client.AccountInformation(accountAddress).Do(context.Background()) + if err != nil { + return "", err + } + if res.Amount < amount+100_000 { // 100,000 microalgos is default account min balance + continue + } + return accountAddress, nil + } + return "", fmt.Errorf("no account has enough to fund %d microalgos", amount) +} + func initializeAccount(accountAddress string) error { params, err := aclv2.SuggestedParams().Do(context.Background()) if err != nil { return err } - txn, err = transaction.MakePaymentTxn(accounts[0], accountAddress, devModeInitialAmount, []byte{}, "", params) + funder, err := fundingAccount(aclv2, devModeInitialAmount) + if err != nil { + return err + } + txn, err = transaction.MakePaymentTxn(funder, accountAddress, devModeInitialAmount, []byte{}, "", params) if err != nil { return err } From 5796da3afc7ae8fb8afdc8801f1299e8f3cc886e Mon Sep 17 00:00:00 2001 From: Gary <982483+gmalouf@users.noreply.github.com> Date: Wed, 8 May 2024 15:19:12 -0400 Subject: [PATCH 12/23] Build: Bump golang version to 1.21.10 (#636) * Bump golang version to 1.21.10 * Address new linter warnings. --- .circleci/config.yml | 4 ++-- .github/workflows/reviewdog.yml | 8 ++++---- go.mod | 4 +++- go.sum | 1 + test/docker/Dockerfile | 2 +- test/helpers.go | 4 ++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 85d2e3cf..ebdc0f6d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - go: circleci/go@1.7.3 + go: circleci/go@1.11.0 workflows: circleci_build_and_test: @@ -10,7 +10,7 @@ workflows: name: 'test_go_<< matrix.go_version >>' matrix: parameters: - go_version: ['1.20.14'] + go_version: ['1.21.10'] jobs: test: diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 4cb4b7b5..a595b8bf 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -12,17 +12,17 @@ jobs: - name: Install specific golang uses: actions/setup-go@v4.0.1 with: - go-version: '1.20.14' + go-version: '1.21.10' - name: Check format run: test -z `go fmt ./...` - name: Vet run: go vet ./... - name: reviewdog-golangci-lint - uses: reviewdog/action-golangci-lint@v2.3.1 + uses: reviewdog/action-golangci-lint@v2.6.1 with: - golangci_lint_version: "v1.53.2" + golangci_lint_version: "v1.58.0" golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners" - go_version: "1.20.14" + go_version: "1.21.10" reporter: "github-pr-review" tool_name: "Lint Errors" level: "error" diff --git a/go.mod b/go.mod index 37b32c8f..7040cd37 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/algorand/go-algorand-sdk/v2 -go 1.20 +go 1.21 + +toolchain go1.21.10 require ( github.com/algorand/avm-abi v0.1.1 diff --git a/go.sum b/go.sum index 960ca0a0..e8b1fb2b 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,7 @@ github.com/algorand/avm-abi v0.1.1/go.mod h1:+CgwM46dithy850bpTeHh9MC99zpn2Snirb github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbnDfiVa+5QA= github.com/algorand/go-codec/codec v1.1.10/go.mod h1:YkEx5nmr/zuCeaDYOIhlDg92Lxju8tj2d2NrYqP7g7k= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e h1:CHPYEbz71w8DqJ7DRIq+MXyCQsdibK08vdcQTY4ufas= +github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e/go.mod h1:6Xhs0ZlsRjXLIiSMLKafbZxML/j30pg9Z1priLuha5s= github.com/cucumber/godog v0.8.1 h1:lVb+X41I4YDreE+ibZ50bdXmySxgRviYFgKY6Aw4XE8= github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index ad11856f..322707f0 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_IMAGE=golang:1.20.14 +ARG GO_IMAGE=golang:1.21.10 FROM $GO_IMAGE # Copy SDK code into the container diff --git a/test/helpers.go b/test/helpers.go index f362be89..0fc05254 100644 --- a/test/helpers.go +++ b/test/helpers.go @@ -52,7 +52,7 @@ func mockHTTPResponsesInLoadedFromHelper(jsonfiles, directory string, status int responseRing.Value = json responseRing = responseRing.Next() } - mockServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + mockServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { json := responseRing.Value.([]byte) if status > 0 { w.WriteHeader(status) @@ -67,7 +67,7 @@ var receivedMethod string var receivedPath string func mockServerRecordingRequestPaths() error { - mockServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + mockServer = httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { receivedMethod = r.Method receivedPath = r.URL.String() })) From 7c890c2ca5b74c8ef8833d1d791c43e9c76b1206 Mon Sep 17 00:00:00 2001 From: gmalouf Date: Wed, 8 May 2024 19:36:44 +0000 Subject: [PATCH 13/23] bump up version to v2.5.0 --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43467b22..8e45f0e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +# v2.5.0 + + + +## What's Changed +### Bugfixes +* Fix: Fix indexer sync issue in cucumber tests by @jasonpaulos in https://github.com/algorand/go-algorand-sdk/pull/628 +* chore: fix function names by @tianzedavid in https://github.com/algorand/go-algorand-sdk/pull/632 +* Tests: Fix funding for cucumber tests by rotating sender accounts by @jasonpaulos in https://github.com/algorand/go-algorand-sdk/pull/630 +### New Features +* Build: Bump golang version to 1.21.10 by @gmalouf in https://github.com/algorand/go-algorand-sdk/pull/636 +### Enhancements +* Build: Bump go version for builds/workflows to 1.20.14 by @gmalouf in https://github.com/algorand/go-algorand-sdk/pull/629 +* Incentives: Add fields in block header for proposer and fees collected. by @jannotti in https://github.com/algorand/go-algorand-sdk/pull/617 +### Other +* Regenerate code with the latest specification file (ff2c7476) by @github-actions in https://github.com/algorand/go-algorand-sdk/pull/631 + +## New Contributors +* @jannotti made their first contribution in https://github.com/algorand/go-algorand-sdk/pull/617 +* @tianzedavid made their first contribution in https://github.com/algorand/go-algorand-sdk/pull/632 + +**Full Changelog**: https://github.com/algorand/go-algorand-sdk/compare/v2.4.0...v2.5.0 + # v2.4.0 From de3609ee82e675c4a0febd23fafe357705ca58c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 13:58:37 -0400 Subject: [PATCH 14/23] Regenerate code from specification file (#635) Co-authored-by: Algorand Generation Bot --- client/v2/algod/algod.go | 2 +- client/v2/common/models/account_asset_holding.go | 13 +++++++++++++ .../models/account_assets_information_response.go | 15 +++++++++++++++ client/v2/indexer/indexer.go | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 client/v2/common/models/account_asset_holding.go create mode 100644 client/v2/common/models/account_assets_information_response.go diff --git a/client/v2/algod/algod.go b/client/v2/algod/algod.go index 1c631e7a..36a6737d 100644 --- a/client/v2/algod/algod.go +++ b/client/v2/algod/algod.go @@ -27,7 +27,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers) } -// getRaw performs a GET request to the specific path against the server, assumes msgpack response +// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) { return (*common.Client)(c).GetRaw(ctx, path, body, headers) } diff --git a/client/v2/common/models/account_asset_holding.go b/client/v2/common/models/account_asset_holding.go new file mode 100644 index 00000000..c3fd4e53 --- /dev/null +++ b/client/v2/common/models/account_asset_holding.go @@ -0,0 +1,13 @@ +package models + +// AccountAssetHolding accountAssetHolding describes the account's asset holding +// and asset parameters (if either exist) for a specific asset ID. +type AccountAssetHolding struct { + // AssetHolding (asset) Details about the asset held by this account. + // The raw account uses `AssetHolding` for this type. + AssetHolding AssetHolding `json:"asset-holding"` + + // AssetParams (apar) parameters of the asset held by this account. + // The raw account uses `AssetParams` for this type. + AssetParams AssetParams `json:"asset-params,omitempty"` +} diff --git a/client/v2/common/models/account_assets_information_response.go b/client/v2/common/models/account_assets_information_response.go new file mode 100644 index 00000000..c7cc30fb --- /dev/null +++ b/client/v2/common/models/account_assets_information_response.go @@ -0,0 +1,15 @@ +package models + +// AccountAssetsInformationResponse accountAssetsInformationResponse contains a +// list of assets held by an account. +type AccountAssetsInformationResponse struct { + // AssetHoldings + AssetHoldings []AccountAssetHolding `json:"asset-holdings,omitempty"` + + // NextToken used for pagination, when making another request provide this token + // with the next parameter. + NextToken string `json:"next-token,omitempty"` + + // Round the round for which this information is relevant. + Round uint64 `json:"round"` +} diff --git a/client/v2/indexer/indexer.go b/client/v2/indexer/indexer.go index d35e503b..e0e5cf2c 100644 --- a/client/v2/indexer/indexer.go +++ b/client/v2/indexer/indexer.go @@ -26,7 +26,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers) } -// getRaw performs a GET request to the specific path against the server, assumes msgpack response +// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) { return (*common.Client)(c).GetRaw(ctx, path, body, headers) } From 54e7e7d14b8390e2fab239c2fa88809f4ed140e0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 13:16:09 -0400 Subject: [PATCH 15/23] Regenerate code from specification file (#640) Co-authored-by: Algorand Generation Bot --- client/v2/algod/algod.go | 2 +- client/v2/indexer/indexer.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/v2/algod/algod.go b/client/v2/algod/algod.go index 36a6737d..cea84f2a 100644 --- a/client/v2/algod/algod.go +++ b/client/v2/algod/algod.go @@ -27,7 +27,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers) } -// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response +// getRaw performs a GET request to the specific path against the server, returning the raw response bytes func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) { return (*common.Client)(c).GetRaw(ctx, path, body, headers) } diff --git a/client/v2/indexer/indexer.go b/client/v2/indexer/indexer.go index e0e5cf2c..d492a4a6 100644 --- a/client/v2/indexer/indexer.go +++ b/client/v2/indexer/indexer.go @@ -26,7 +26,7 @@ func (c *Client) getMsgpack(ctx context.Context, response interface{}, path stri return (*common.Client)(c).GetRawMsgpack(ctx, response, path, body, headers) } -// getMsgpack performs a GET request to the specific path against the server, assumes msgpack response +// getRaw performs a GET request to the specific path against the server, returning the raw response bytes func (c *Client) getRaw(ctx context.Context, path string, body interface{}, headers []*common.Header) ([]byte, error) { return (*common.Client)(c).GetRaw(ctx, path, body, headers) } From ad4f3cada5442129f76bce6fe834539539135b0e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 12:43:30 -0400 Subject: [PATCH 16/23] Regenerate code from specification file (#641) Co-authored-by: Algorand Generation Bot --- client/v2/common/models/account.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/v2/common/models/account.go b/client/v2/common/models/account.go index 6556868f..ffcb3573 100644 --- a/client/v2/common/models/account.go +++ b/client/v2/common/models/account.go @@ -65,6 +65,10 @@ type Account struct { // LastProposed the round in which this account last proposed the block. LastProposed uint64 `json:"last-proposed,omitempty"` + // MinBalance microAlgo balance required by the account. + // The requirement grows based on asset and application usage. + MinBalance uint64 `json:"min-balance"` + // Participation accountParticipation describes the parameters used by this account // in consensus protocol. Participation AccountParticipation `json:"participation,omitempty"` From 24fb3486e115268f2c82edf97037cb471fbb1fd5 Mon Sep 17 00:00:00 2001 From: Gary Malouf <982483+gmalouf@users.noreply.github.com> Date: Mon, 3 Jun 2024 10:51:59 -0400 Subject: [PATCH 17/23] Enable min-balance tests for indexer and algod APIs. (#642) --- test/unit.tags | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit.tags b/test/unit.tags index 29d3b813..bda065cd 100644 --- a/test/unit.tags +++ b/test/unit.tags @@ -24,6 +24,7 @@ @unit.responses.genesis @unit.responses.messagepack @unit.responses.messagepack.231 +@unit.responses.minbalance @unit.responses.participationupdates @unit.responses.sync @unit.responses.timestamp From 953bd1bf4c9284e4cad09ad1b34877028f13da23 Mon Sep 17 00:00:00 2001 From: gmalouf Date: Wed, 5 Jun 2024 17:07:42 +0000 Subject: [PATCH 18/23] bump up version to v2.6.0 --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e45f0e6..2fce8c20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# v2.6.0 + + + +## What's Changed +### Enhancements +* Tests: Enable min-balance tests for indexer and algod APIs. by @gmalouf in https://github.com/algorand/go-algorand-sdk/pull/642 +### Other +* Regenerate code with the latest specification file (6c917476) by @github-actions in https://github.com/algorand/go-algorand-sdk/pull/635 +* Regenerate code with the latest specification file (981aef83) by @github-actions in https://github.com/algorand/go-algorand-sdk/pull/640 +* Regenerate code with the latest specification file (2335b019) by @github-actions in https://github.com/algorand/go-algorand-sdk/pull/641 + + +**Full Changelog**: https://github.com/algorand/go-algorand-sdk/compare/v2.5.0...v2.6.0 + # v2.5.0 From 8f6dc722379bbf301d474d563b8428d4badc8194 Mon Sep 17 00:00:00 2001 From: Gary Malouf <982483+gmalouf@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:22:08 -0400 Subject: [PATCH 19/23] Update .test-env to use Cucumber specs from master (#645) Update .test-env to use Cucumber specs from master rather than the now deprecated V2. --- .test-env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.test-env b/.test-env index a321a7f1..049289d7 100644 --- a/.test-env +++ b/.test-env @@ -1,6 +1,6 @@ # Configs for testing repo download: SDK_TESTING_URL="https://github.com/algorand/algorand-sdk-testing" -SDK_TESTING_BRANCH="V2" +SDK_TESTING_BRANCH="master" SDK_TESTING_HARNESS="test-harness" INSTALL_ONLY=0 From f2acb44dc4543b931dd7e1aad478d87dac65b738 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:34:54 -0400 Subject: [PATCH 20/23] Bump gopkg.in/yaml.v3 from 3.0.0-20200313102051-9f266ea9e77c to 3.0.0 (#605) Bumps gopkg.in/yaml.v3 from 3.0.0-20200313102051-9f266ea9e77c to 3.0.0. --- updated-dependencies: - dependency-name: gopkg.in/yaml.v3 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 7040cd37..2d4c5171 100644 --- a/go.mod +++ b/go.mod @@ -16,5 +16,5 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect + gopkg.in/yaml.v3 v3.0.0 // indirect ) diff --git a/go.sum b/go.sum index e8b1fb2b..94519fbc 100644 --- a/go.sum +++ b/go.sum @@ -44,5 +44,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 481831eb7bebcc41f080034477b60aa8157e7f6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:18:44 -0400 Subject: [PATCH 21/23] build(deps): bump golang.org/x/crypto (#646) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210921155107-089bfa567519 to 0.17.0. - [Commits](https://github.com/golang/crypto/commits/v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 2d4c5171..5d6b86ea 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/cucumber/godog v0.8.1 github.com/google/go-querystring v1.0.0 github.com/stretchr/testify v1.7.1 - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 + golang.org/x/crypto v0.17.0 ) require ( diff --git a/go.sum b/go.sum index 94519fbc..fc55739b 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,9 @@ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMT github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= From d6f716487fdf73cd97c4447e48b8d9172ff6a55d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:45:24 -0400 Subject: [PATCH 22/23] Regenerate code from specification file (#647) Co-authored-by: Algorand Generation Bot --- client/v2/common/models/simulate_request.go | 4 ++++ client/v2/common/models/simulate_transaction_result.go | 4 ++++ client/v2/common/models/simulation_eval_overrides.go | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/client/v2/common/models/simulate_request.go b/client/v2/common/models/simulate_request.go index ad26db77..72e58f7d 100644 --- a/client/v2/common/models/simulate_request.go +++ b/client/v2/common/models/simulate_request.go @@ -19,6 +19,10 @@ type SimulateRequest struct { // transaction group. ExtraOpcodeBudget uint64 `json:"extra-opcode-budget,omitempty"` + // FixSigners if true, signers for transactions that are missing signatures will be + // fixed during evaluation. + FixSigners bool `json:"fix-signers,omitempty"` + // Round if provided, specifies the round preceding the simulation. State changes // through this round will be used to run this simulation. Usually only the 4 most // recent rounds will be available (controlled by the node config value diff --git a/client/v2/common/models/simulate_transaction_result.go b/client/v2/common/models/simulate_transaction_result.go index b5034e9f..5914ec92 100644 --- a/client/v2/common/models/simulate_transaction_result.go +++ b/client/v2/common/models/simulate_transaction_result.go @@ -10,6 +10,10 @@ type SimulateTransactionResult struct { // inner app call trace in a recursive way. ExecTrace SimulationTransactionExecTrace `json:"exec-trace,omitempty"` + // FixedSigner the account that needed to sign this transaction when no signature + // was provided and the provided signer was incorrect. + FixedSigner string `json:"fixed-signer,omitempty"` + // LogicSigBudgetConsumed budget used during execution of a logic sig transaction. LogicSigBudgetConsumed uint64 `json:"logic-sig-budget-consumed,omitempty"` diff --git a/client/v2/common/models/simulation_eval_overrides.go b/client/v2/common/models/simulation_eval_overrides.go index 3a49df7f..ed99de82 100644 --- a/client/v2/common/models/simulation_eval_overrides.go +++ b/client/v2/common/models/simulation_eval_overrides.go @@ -16,6 +16,10 @@ type SimulationEvalOverrides struct { // simulation ExtraOpcodeBudget uint64 `json:"extra-opcode-budget,omitempty"` + // FixSigners if true, signers for transactions that are missing signatures will be + // fixed during evaluation. + FixSigners bool `json:"fix-signers,omitempty"` + // MaxLogCalls the maximum log calls one can make during simulation MaxLogCalls uint64 `json:"max-log-calls,omitempty"` From 384a8e83e56174514e0169518d009089282da149 Mon Sep 17 00:00:00 2001 From: Tasos Bitsios Date: Fri, 30 Aug 2024 01:17:19 +0300 Subject: [PATCH 23/23] fnet consensus version --- _examples/account.go | 8 +++--- _examples/apps.go | 8 +++--- _examples/asa.go | 6 ++--- _examples/atc.go | 6 ++--- _examples/atomic_transfer.go | 6 ++--- _examples/codec.go | 8 +++--- _examples/debug.go | 8 +++--- _examples/indexer.go | 4 +-- _examples/kmd.go | 8 +++--- _examples/lsig.go | 6 ++--- _examples/overview.go | 6 ++--- _examples/participation.go | 4 +-- _examples/util.go | 10 +++---- auction/auction.go | 2 +- client/kmd/common.go | 2 +- client/kmd/kmd.go | 2 +- client/kmd/requests.go | 3 +-- client/kmd/responses.go | 3 +-- client/kmd/wrappers.go | 5 ++-- .../v2/algod/accountApplicationInformation.go | 4 +-- client/v2/algod/accountAssetInformation.go | 4 +-- client/v2/algod/accountInformation.go | 4 +-- client/v2/algod/algod.go | 4 +-- client/v2/algod/blockRaw.go | 2 +- client/v2/algod/dryrun.go | 4 +-- client/v2/algod/getApplicationBoxByName.go | 4 +-- client/v2/algod/getApplicationBoxes.go | 4 +-- client/v2/algod/getApplicationByID.go | 4 +-- client/v2/algod/getAssetByID.go | 4 +-- client/v2/algod/getBlock.go | 6 ++--- client/v2/algod/getBlockHash.go | 4 +-- client/v2/algod/getBlockLogs.go | 4 +-- client/v2/algod/getBlockTimeStampOffset.go | 4 +-- client/v2/algod/getBlockTxids.go | 4 +-- client/v2/algod/getGenesis.go | 2 +- client/v2/algod/getLedgerStateDelta.go | 4 +-- .../getLedgerStateDeltaForTransactionGroup.go | 4 +-- client/v2/algod/getLightBlockHeaderProof.go | 4 +-- client/v2/algod/getPendingTransactions.go | 6 ++--- .../algod/getPendingTransactionsByAddress.go | 6 ++--- client/v2/algod/getReady.go | 2 +- client/v2/algod/getStateProof.go | 4 +-- client/v2/algod/getStatus.go | 4 +-- client/v2/algod/getSupply.go | 4 +-- client/v2/algod/getSyncRound.go | 4 +-- ...ansactionGroupLedgerStateDeltasForRound.go | 4 +-- client/v2/algod/getTransactionProof.go | 4 +-- client/v2/algod/getVersion.go | 4 +-- client/v2/algod/healthCheck.go | 2 +- .../v2/algod/pendingTransactionInformation.go | 6 ++--- client/v2/algod/rawTransaction.go | 4 +-- client/v2/algod/setBlockTimeStampOffset.go | 2 +- client/v2/algod/setSyncRound.go | 2 +- client/v2/algod/simulateTransaction.go | 6 ++--- client/v2/algod/tealCompile.go | 4 +-- client/v2/algod/tealDisassemble.go | 4 +-- client/v2/algod/tealDryrun.go | 6 ++--- client/v2/algod/transactionParams.go | 6 ++--- client/v2/algod/unsetSyncRound.go | 2 +- client/v2/algod/waitForBlock.go | 4 +-- client/v2/common/common.go | 4 +-- client/v2/common/models/block_response.go | 2 +- client/v2/common/models/dryrun_request.go | 2 +- .../models/pending_transaction_response.go | 2 +- .../models/pending_transactions_response.go | 2 +- .../simulate_request_transaction_group.go | 2 +- client/v2/indexer/indexer.go | 2 +- .../v2/indexer/lookupAccountAppLocalStates.go | 4 +-- client/v2/indexer/lookupAccountAssets.go | 4 +-- client/v2/indexer/lookupAccountByID.go | 4 +-- .../lookupAccountCreatedApplications.go | 4 +-- .../v2/indexer/lookupAccountCreatedAssets.go | 4 +-- .../v2/indexer/lookupAccountTransactions.go | 4 +-- .../lookupApplicationBoxByIDAndName.go | 4 +-- client/v2/indexer/lookupApplicationByID.go | 4 +-- .../v2/indexer/lookupApplicationLogsByID.go | 4 +-- client/v2/indexer/lookupAssetBalances.go | 4 +-- client/v2/indexer/lookupAssetByID.go | 4 +-- client/v2/indexer/lookupAssetTransactions.go | 4 +-- client/v2/indexer/lookupBlock.go | 4 +-- client/v2/indexer/lookupTransaction.go | 4 +-- client/v2/indexer/makeHealthCheck.go | 4 +-- client/v2/indexer/searchForAccounts.go | 4 +-- .../v2/indexer/searchForApplicationBoxes.go | 4 +-- client/v2/indexer/searchForApplications.go | 4 +-- client/v2/indexer/searchForAssets.go | 4 +-- client/v2/indexer/searchForTransactions.go | 4 +-- crypto/account.go | 3 +-- crypto/account_test.go | 4 +-- crypto/crypto.go | 5 ++-- crypto/crypto_test.go | 6 ++--- examples/account/main.go | 10 +++---- examples/apps/main.go | 10 +++---- examples/asa/main.go | 8 +++--- examples/atc/main.go | 8 +++--- examples/atomic_transactions/main.go | 8 +++--- examples/codec/main.go | 12 ++++----- examples/debug/main.go | 10 +++---- examples/indexer/main.go | 6 ++--- examples/kmd/main.go | 10 +++---- examples/lsig/main.go | 8 +++--- examples/overview/main.go | 10 +++---- examples/participation/main.go | 4 +-- examples/utils.go | 12 ++++----- go.mod | 2 +- mnemonic/helpers.go | 3 +-- mnemonic/mnemonic_test.go | 4 +-- protocol/config/consensus.go | 5 +++- protocol/consensus.go | 3 +++ test/algodclientv2_test.go | 6 ++--- test/applications_integration_test.go | 16 ++++++------ test/applications_unit_test.go | 6 ++--- test/indexer_unit_test.go | 2 +- test/responses_unit_test.go | 10 +++---- test/steps_test.go | 26 +++++++++---------- test/transactions_test.go | 8 +++--- test/utilities.go | 6 ++--- transaction/atomicTransactionComposer.go | 12 ++++----- transaction/atomicTransactionComposer_test.go | 6 ++--- transaction/dryrun.go | 8 +++--- transaction/transaction.go | 6 ++--- transaction/transactionSigner.go | 6 ++--- transaction/transactionSigner_test.go | 6 ++--- transaction/transaction_test.go | 8 +++--- transaction/waitForConfirmation.go | 6 ++--- types/address_test.go | 2 +- types/basics.go | 3 +-- types/basics_test.go | 2 +- types/blockhash_test.go | 2 +- types/genesis.go | 2 +- types/genesis_test.go | 2 +- 131 files changed, 333 insertions(+), 334 deletions(-) diff --git a/_examples/account.go b/_examples/account.go index 146d7c57..b5cc0dd2 100644 --- a/_examples/account.go +++ b/_examples/account.go @@ -5,10 +5,10 @@ import ( "fmt" "log" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/_examples/apps.go b/_examples/apps.go index f996a15a..af852643 100644 --- a/_examples/apps.go +++ b/_examples/apps.go @@ -7,10 +7,10 @@ import ( "log" "time" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/_examples/asa.go b/_examples/asa.go index e8e28d36..49317d01 100644 --- a/_examples/asa.go +++ b/_examples/asa.go @@ -4,9 +4,9 @@ import ( "context" "log" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/_examples/atc.go b/_examples/atc.go index d4d2cac2..0c278812 100644 --- a/_examples/atc.go +++ b/_examples/atc.go @@ -6,9 +6,9 @@ import ( "io/ioutil" "log" - "github.com/algorand/go-algorand-sdk/v2/abi" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/abi" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/_examples/atomic_transfer.go b/_examples/atomic_transfer.go index 72c989da..3a41d085 100644 --- a/_examples/atomic_transfer.go +++ b/_examples/atomic_transfer.go @@ -5,9 +5,9 @@ import ( "fmt" "log" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/_examples/codec.go b/_examples/codec.go index b0c7159c..ee558519 100644 --- a/_examples/codec.go +++ b/_examples/codec.go @@ -7,10 +7,10 @@ import ( "log" "os" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/_examples/debug.go b/_examples/debug.go index 07f506ef..769e05ef 100644 --- a/_examples/debug.go +++ b/_examples/debug.go @@ -5,10 +5,10 @@ import ( "log" "os" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/_examples/indexer.go b/_examples/indexer.go index 238550f1..91ec6d3f 100644 --- a/_examples/indexer.go +++ b/_examples/indexer.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" ) func main() { diff --git a/_examples/kmd.go b/_examples/kmd.go index 6fa724df..26d22b54 100644 --- a/_examples/kmd.go +++ b/_examples/kmd.go @@ -5,10 +5,10 @@ import ( "fmt" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/kmd" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/kmd" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/_examples/lsig.go b/_examples/lsig.go index f6deb891..5ebbf5f7 100644 --- a/_examples/lsig.go +++ b/_examples/lsig.go @@ -7,9 +7,9 @@ import ( "io/ioutil" "log" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/_examples/overview.go b/_examples/overview.go index c3b64bb0..7c4f9a37 100644 --- a/_examples/overview.go +++ b/_examples/overview.go @@ -6,9 +6,9 @@ import ( "log" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/_examples/participation.go b/_examples/participation.go index 0c5afc10..1c80e013 100644 --- a/_examples/participation.go +++ b/_examples/participation.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/_examples/util.go b/_examples/util.go index 0c9e40b8..1cdd74c2 100644 --- a/_examples/util.go +++ b/_examples/util.go @@ -8,11 +8,11 @@ import ( "log" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/kmd" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/kmd" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // add sandbox and other stuff diff --git a/auction/auction.go b/auction/auction.go index 3d220f8d..2aa2d2ef 100644 --- a/auction/auction.go +++ b/auction/auction.go @@ -1,7 +1,7 @@ package auction import ( - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // MakeBid constructs a bid using the passed parameters. `bidderAddress` and diff --git a/client/kmd/common.go b/client/kmd/common.go index b4c251fc..3c355aab 100644 --- a/client/kmd/common.go +++ b/client/kmd/common.go @@ -1,7 +1,7 @@ package kmd import ( - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // APIV1Wallet is the API's representation of a wallet diff --git a/client/kmd/kmd.go b/client/kmd/kmd.go index 48cc8c5d..bb632293 100644 --- a/client/kmd/kmd.go +++ b/client/kmd/kmd.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - "github.com/algorand/go-algorand-sdk/v2/encoding/json" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" ) const ( diff --git a/client/kmd/requests.go b/client/kmd/requests.go index 94eeedcf..786e1d3d 100644 --- a/client/kmd/requests.go +++ b/client/kmd/requests.go @@ -1,9 +1,8 @@ package kmd import ( + "github.com/tasosbit/go-algorand-sdk/v2/types" "golang.org/x/crypto/ed25519" - - "github.com/algorand/go-algorand-sdk/v2/types" ) // DefaultWalletDriver is the wallet backend that kmd will use by default diff --git a/client/kmd/responses.go b/client/kmd/responses.go index d6ad03f6..910b82bc 100644 --- a/client/kmd/responses.go +++ b/client/kmd/responses.go @@ -3,9 +3,8 @@ package kmd import ( "errors" + "github.com/tasosbit/go-algorand-sdk/v2/types" "golang.org/x/crypto/ed25519" - - "github.com/algorand/go-algorand-sdk/v2/types" ) // APIV1Response is the interface that all API V1 responses must satisfy diff --git a/client/kmd/wrappers.go b/client/kmd/wrappers.go index 255fabaf..6852702f 100644 --- a/client/kmd/wrappers.go +++ b/client/kmd/wrappers.go @@ -1,10 +1,9 @@ package kmd import ( + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/types" "golang.org/x/crypto/ed25519" - - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/types" ) // Version returns a VersionResponse containing a list of kmd API versions diff --git a/client/v2/algod/accountApplicationInformation.go b/client/v2/algod/accountApplicationInformation.go index a6f93d5e..232fa20e 100644 --- a/client/v2/algod/accountApplicationInformation.go +++ b/client/v2/algod/accountApplicationInformation.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // AccountApplicationInformationParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/accountAssetInformation.go b/client/v2/algod/accountAssetInformation.go index 2a28d78c..86455862 100644 --- a/client/v2/algod/accountAssetInformation.go +++ b/client/v2/algod/accountAssetInformation.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // AccountAssetInformationParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/accountInformation.go b/client/v2/algod/accountInformation.go index 4096cded..319fb468 100644 --- a/client/v2/algod/accountInformation.go +++ b/client/v2/algod/accountInformation.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // AccountInformationParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/algod.go b/client/v2/algod/algod.go index cea84f2a..0261f39c 100644 --- a/client/v2/algod/algod.go +++ b/client/v2/algod/algod.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) const authHeader = "X-Algo-API-Token" diff --git a/client/v2/algod/blockRaw.go b/client/v2/algod/blockRaw.go index 3c1e8992..581c39cd 100644 --- a/client/v2/algod/blockRaw.go +++ b/client/v2/algod/blockRaw.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) // GetBlockParams defines parameters for GetBlock. diff --git a/client/v2/algod/dryrun.go b/client/v2/algod/dryrun.go index 96c1807b..e488db22 100644 --- a/client/v2/algod/dryrun.go +++ b/client/v2/algod/dryrun.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // TealDryRun /v2/teal/dryrun diff --git a/client/v2/algod/getApplicationBoxByName.go b/client/v2/algod/getApplicationBoxByName.go index 87c8ed8e..ec91aa1b 100644 --- a/client/v2/algod/getApplicationBoxByName.go +++ b/client/v2/algod/getApplicationBoxByName.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetApplicationBoxByNameParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getApplicationBoxes.go b/client/v2/algod/getApplicationBoxes.go index 70b40f8b..3a2390b8 100644 --- a/client/v2/algod/getApplicationBoxes.go +++ b/client/v2/algod/getApplicationBoxes.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetApplicationBoxesParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getApplicationByID.go b/client/v2/algod/getApplicationByID.go index eb5798e9..69c85980 100644 --- a/client/v2/algod/getApplicationByID.go +++ b/client/v2/algod/getApplicationByID.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetApplicationByID given a application ID, it returns application information diff --git a/client/v2/algod/getAssetByID.go b/client/v2/algod/getAssetByID.go index ab1443d2..9b3e7a18 100644 --- a/client/v2/algod/getAssetByID.go +++ b/client/v2/algod/getAssetByID.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetAssetByID given a asset ID, it returns asset information including creator, diff --git a/client/v2/algod/getBlock.go b/client/v2/algod/getBlock.go index 40f0f1f5..5cd5e003 100644 --- a/client/v2/algod/getBlock.go +++ b/client/v2/algod/getBlock.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // BlockParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getBlockHash.go b/client/v2/algod/getBlockHash.go index 7b9836c6..99f01303 100644 --- a/client/v2/algod/getBlockHash.go +++ b/client/v2/algod/getBlockHash.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetBlockHash get the block hash for the block on the given round. diff --git a/client/v2/algod/getBlockLogs.go b/client/v2/algod/getBlockLogs.go index c0f9354d..d9a63f97 100644 --- a/client/v2/algod/getBlockLogs.go +++ b/client/v2/algod/getBlockLogs.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetBlockLogs get all of the logs from outer and inner app calls in the given diff --git a/client/v2/algod/getBlockTimeStampOffset.go b/client/v2/algod/getBlockTimeStampOffset.go index 34fd37f8..48128d0d 100644 --- a/client/v2/algod/getBlockTimeStampOffset.go +++ b/client/v2/algod/getBlockTimeStampOffset.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetBlockTimeStampOffset gets the current timestamp offset. diff --git a/client/v2/algod/getBlockTxids.go b/client/v2/algod/getBlockTxids.go index 1297d741..1305a424 100644 --- a/client/v2/algod/getBlockTxids.go +++ b/client/v2/algod/getBlockTxids.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetBlockTxids get the top level transaction IDs for the block on the given diff --git a/client/v2/algod/getGenesis.go b/client/v2/algod/getGenesis.go index 0c75975f..7dd4bc8c 100644 --- a/client/v2/algod/getGenesis.go +++ b/client/v2/algod/getGenesis.go @@ -3,7 +3,7 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) // GetGenesis returns the entire genesis file in json. diff --git a/client/v2/algod/getLedgerStateDelta.go b/client/v2/algod/getLedgerStateDelta.go index 866b5d03..07ef3bf0 100644 --- a/client/v2/algod/getLedgerStateDelta.go +++ b/client/v2/algod/getLedgerStateDelta.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // GetLedgerStateDeltaParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getLedgerStateDeltaForTransactionGroup.go b/client/v2/algod/getLedgerStateDeltaForTransactionGroup.go index e81536ae..c40774af 100644 --- a/client/v2/algod/getLedgerStateDeltaForTransactionGroup.go +++ b/client/v2/algod/getLedgerStateDeltaForTransactionGroup.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // GetLedgerStateDeltaForTransactionGroupParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getLightBlockHeaderProof.go b/client/v2/algod/getLightBlockHeaderProof.go index edbdff0e..f51773fa 100644 --- a/client/v2/algod/getLightBlockHeaderProof.go +++ b/client/v2/algod/getLightBlockHeaderProof.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetLightBlockHeaderProof gets a proof for a given light block header inside a diff --git a/client/v2/algod/getPendingTransactions.go b/client/v2/algod/getPendingTransactions.go index 9b0e67b9..229da01e 100644 --- a/client/v2/algod/getPendingTransactions.go +++ b/client/v2/algod/getPendingTransactions.go @@ -3,9 +3,9 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // PendingTransactionsParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getPendingTransactionsByAddress.go b/client/v2/algod/getPendingTransactionsByAddress.go index fd714323..e98b932c 100644 --- a/client/v2/algod/getPendingTransactionsByAddress.go +++ b/client/v2/algod/getPendingTransactionsByAddress.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // PendingTransactionsByAddressParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getReady.go b/client/v2/algod/getReady.go index 998581a0..c039af7f 100644 --- a/client/v2/algod/getReady.go +++ b/client/v2/algod/getReady.go @@ -3,7 +3,7 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) // GetReady returns OK if healthy and fully caught up. diff --git a/client/v2/algod/getStateProof.go b/client/v2/algod/getStateProof.go index 851b626a..f55d2def 100644 --- a/client/v2/algod/getStateProof.go +++ b/client/v2/algod/getStateProof.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetStateProof get a state proof that covers a given round diff --git a/client/v2/algod/getStatus.go b/client/v2/algod/getStatus.go index 2966eeef..7175f3af 100644 --- a/client/v2/algod/getStatus.go +++ b/client/v2/algod/getStatus.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // Status gets the current node status. diff --git a/client/v2/algod/getSupply.go b/client/v2/algod/getSupply.go index dac8aa32..03de7497 100644 --- a/client/v2/algod/getSupply.go +++ b/client/v2/algod/getSupply.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // Supply get the current supply reported by the ledger. diff --git a/client/v2/algod/getSyncRound.go b/client/v2/algod/getSyncRound.go index c92f5b5f..a7b794a4 100644 --- a/client/v2/algod/getSyncRound.go +++ b/client/v2/algod/getSyncRound.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetSyncRound gets the minimum sync round for the ledger. diff --git a/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.go b/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.go index 1bb028fe..bb5a8d84 100644 --- a/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.go +++ b/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetTransactionGroupLedgerStateDeltasForRoundParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getTransactionProof.go b/client/v2/algod/getTransactionProof.go index db65720e..316cc428 100644 --- a/client/v2/algod/getTransactionProof.go +++ b/client/v2/algod/getTransactionProof.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // GetTransactionProofParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/getVersion.go b/client/v2/algod/getVersion.go index ad4484fc..9de15591 100644 --- a/client/v2/algod/getVersion.go +++ b/client/v2/algod/getVersion.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // Versions retrieves the supported API versions, binary build versions, and diff --git a/client/v2/algod/healthCheck.go b/client/v2/algod/healthCheck.go index fbfe2a1f..37117125 100644 --- a/client/v2/algod/healthCheck.go +++ b/client/v2/algod/healthCheck.go @@ -3,7 +3,7 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) // HealthCheck returns OK if healthy. diff --git a/client/v2/algod/pendingTransactionInformation.go b/client/v2/algod/pendingTransactionInformation.go index 671a4474..410cc58b 100644 --- a/client/v2/algod/pendingTransactionInformation.go +++ b/client/v2/algod/pendingTransactionInformation.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // PendingTransactionInformationParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/rawTransaction.go b/client/v2/algod/rawTransaction.go index 8bac7d93..7790d56d 100644 --- a/client/v2/algod/rawTransaction.go +++ b/client/v2/algod/rawTransaction.go @@ -4,8 +4,8 @@ import ( "context" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // SendRawTransaction broadcasts a raw transaction or transaction group to the diff --git a/client/v2/algod/setBlockTimeStampOffset.go b/client/v2/algod/setBlockTimeStampOffset.go index 7487a472..f1823533 100644 --- a/client/v2/algod/setBlockTimeStampOffset.go +++ b/client/v2/algod/setBlockTimeStampOffset.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) // SetBlockTimeStampOffset sets the timestamp offset (seconds) for blocks in dev diff --git a/client/v2/algod/setSyncRound.go b/client/v2/algod/setSyncRound.go index 8f5004a4..85fcb365 100644 --- a/client/v2/algod/setSyncRound.go +++ b/client/v2/algod/setSyncRound.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) // SetSyncRound sets the minimum sync round on the ledger. diff --git a/client/v2/algod/simulateTransaction.go b/client/v2/algod/simulateTransaction.go index cec0944f..7ebc7a6f 100644 --- a/client/v2/algod/simulateTransaction.go +++ b/client/v2/algod/simulateTransaction.go @@ -3,9 +3,9 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" ) // SimulateTransactionParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/tealCompile.go b/client/v2/algod/tealCompile.go index cb9b050d..810c02f9 100644 --- a/client/v2/algod/tealCompile.go +++ b/client/v2/algod/tealCompile.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // TealCompileParams contains all of the query parameters for url serialization. diff --git a/client/v2/algod/tealDisassemble.go b/client/v2/algod/tealDisassemble.go index 2711b1dd..da7d2256 100644 --- a/client/v2/algod/tealDisassemble.go +++ b/client/v2/algod/tealDisassemble.go @@ -3,8 +3,8 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // TealDisassemble given the program bytes, return the TEAL source code in plain diff --git a/client/v2/algod/tealDryrun.go b/client/v2/algod/tealDryrun.go index 7e5538cd..a7fd0a39 100644 --- a/client/v2/algod/tealDryrun.go +++ b/client/v2/algod/tealDryrun.go @@ -3,9 +3,9 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" ) // TealDryrun executes TEAL program(s) in context and returns debugging information diff --git a/client/v2/algod/transactionParams.go b/client/v2/algod/transactionParams.go index 7bf4403c..053ba2a4 100644 --- a/client/v2/algod/transactionParams.go +++ b/client/v2/algod/transactionParams.go @@ -3,9 +3,9 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // SuggestedParams get parameters for constructing a new transaction diff --git a/client/v2/algod/unsetSyncRound.go b/client/v2/algod/unsetSyncRound.go index 70973920..1e4e5d85 100644 --- a/client/v2/algod/unsetSyncRound.go +++ b/client/v2/algod/unsetSyncRound.go @@ -3,7 +3,7 @@ package algod import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) // UnsetSyncRound unset the ledger sync round. diff --git a/client/v2/algod/waitForBlock.go b/client/v2/algod/waitForBlock.go index 0c26ec97..69cc8d38 100644 --- a/client/v2/algod/waitForBlock.go +++ b/client/v2/algod/waitForBlock.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // StatusAfterBlock waits for a block to appear after round {round} and returns the diff --git a/client/v2/common/common.go b/client/v2/common/common.go index 6b9b3f5c..4748f432 100644 --- a/client/v2/common/common.go +++ b/client/v2/common/common.go @@ -9,9 +9,9 @@ import ( "net/http" "net/url" - "github.com/algorand/go-algorand-sdk/v2/encoding/json" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" "github.com/google/go-querystring/query" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" ) // rawRequestPaths is a set of paths where the body should not be urlencoded diff --git a/client/v2/common/models/block_response.go b/client/v2/common/models/block_response.go index 8783c395..187dc301 100644 --- a/client/v2/common/models/block_response.go +++ b/client/v2/common/models/block_response.go @@ -1,6 +1,6 @@ package models -import "github.com/algorand/go-algorand-sdk/v2/types" +import "github.com/tasosbit/go-algorand-sdk/v2/types" // BlockResponse encoded block object. type BlockResponse struct { diff --git a/client/v2/common/models/dryrun_request.go b/client/v2/common/models/dryrun_request.go index f7c50a2b..2e8c0f4e 100644 --- a/client/v2/common/models/dryrun_request.go +++ b/client/v2/common/models/dryrun_request.go @@ -1,6 +1,6 @@ package models -import "github.com/algorand/go-algorand-sdk/v2/types" +import "github.com/tasosbit/go-algorand-sdk/v2/types" // DryrunRequest request data type for dryrun endpoint. Given the Transactions and // simulated ledger state upload, run TEAL scripts and return debugging diff --git a/client/v2/common/models/pending_transaction_response.go b/client/v2/common/models/pending_transaction_response.go index 68bbe7b1..1538b8c5 100644 --- a/client/v2/common/models/pending_transaction_response.go +++ b/client/v2/common/models/pending_transaction_response.go @@ -1,6 +1,6 @@ package models -import "github.com/algorand/go-algorand-sdk/v2/types" +import "github.com/tasosbit/go-algorand-sdk/v2/types" // PendingTransactionResponse details about a pending transaction. If the // transaction was recently confirmed, includes confirmation details like the round diff --git a/client/v2/common/models/pending_transactions_response.go b/client/v2/common/models/pending_transactions_response.go index 951a6275..f90790fe 100644 --- a/client/v2/common/models/pending_transactions_response.go +++ b/client/v2/common/models/pending_transactions_response.go @@ -1,6 +1,6 @@ package models -import "github.com/algorand/go-algorand-sdk/v2/types" +import "github.com/tasosbit/go-algorand-sdk/v2/types" // PendingTransactionsResponse a potentially truncated list of transactions // currently in the node's transaction pool. You can compute whether or not the diff --git a/client/v2/common/models/simulate_request_transaction_group.go b/client/v2/common/models/simulate_request_transaction_group.go index 25126386..77045ee5 100644 --- a/client/v2/common/models/simulate_request_transaction_group.go +++ b/client/v2/common/models/simulate_request_transaction_group.go @@ -1,6 +1,6 @@ package models -import "github.com/algorand/go-algorand-sdk/v2/types" +import "github.com/tasosbit/go-algorand-sdk/v2/types" // SimulateRequestTransactionGroup a transaction group to simulate. type SimulateRequestTransactionGroup struct { diff --git a/client/v2/indexer/indexer.go b/client/v2/indexer/indexer.go index d492a4a6..327ebe18 100644 --- a/client/v2/indexer/indexer.go +++ b/client/v2/indexer/indexer.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" ) const authHeader = "X-Indexer-API-Token" diff --git a/client/v2/indexer/lookupAccountAppLocalStates.go b/client/v2/indexer/lookupAccountAppLocalStates.go index 2a5a0be0..5104c87f 100644 --- a/client/v2/indexer/lookupAccountAppLocalStates.go +++ b/client/v2/indexer/lookupAccountAppLocalStates.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAccountAppLocalStatesParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAccountAssets.go b/client/v2/indexer/lookupAccountAssets.go index be011ef0..185cb536 100644 --- a/client/v2/indexer/lookupAccountAssets.go +++ b/client/v2/indexer/lookupAccountAssets.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAccountAssetsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAccountByID.go b/client/v2/indexer/lookupAccountByID.go index b29ca23f..365617f3 100644 --- a/client/v2/indexer/lookupAccountByID.go +++ b/client/v2/indexer/lookupAccountByID.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAccountByIDParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAccountCreatedApplications.go b/client/v2/indexer/lookupAccountCreatedApplications.go index 7b1dbe5d..2f2d5b6d 100644 --- a/client/v2/indexer/lookupAccountCreatedApplications.go +++ b/client/v2/indexer/lookupAccountCreatedApplications.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAccountCreatedApplicationsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAccountCreatedAssets.go b/client/v2/indexer/lookupAccountCreatedAssets.go index 58fb1332..9d08749b 100644 --- a/client/v2/indexer/lookupAccountCreatedAssets.go +++ b/client/v2/indexer/lookupAccountCreatedAssets.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAccountCreatedAssetsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAccountTransactions.go b/client/v2/indexer/lookupAccountTransactions.go index c8200aed..836db4c5 100644 --- a/client/v2/indexer/lookupAccountTransactions.go +++ b/client/v2/indexer/lookupAccountTransactions.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAccountTransactionsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupApplicationBoxByIDAndName.go b/client/v2/indexer/lookupApplicationBoxByIDAndName.go index f1fada46..e669a1b4 100644 --- a/client/v2/indexer/lookupApplicationBoxByIDAndName.go +++ b/client/v2/indexer/lookupApplicationBoxByIDAndName.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupApplicationBoxByIDAndNameParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupApplicationByID.go b/client/v2/indexer/lookupApplicationByID.go index ab46d64c..a8cb01bd 100644 --- a/client/v2/indexer/lookupApplicationByID.go +++ b/client/v2/indexer/lookupApplicationByID.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupApplicationByIDParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupApplicationLogsByID.go b/client/v2/indexer/lookupApplicationLogsByID.go index be6be0f0..d0319b07 100644 --- a/client/v2/indexer/lookupApplicationLogsByID.go +++ b/client/v2/indexer/lookupApplicationLogsByID.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupApplicationLogsByIDParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAssetBalances.go b/client/v2/indexer/lookupAssetBalances.go index edd55e63..3d7a07cc 100644 --- a/client/v2/indexer/lookupAssetBalances.go +++ b/client/v2/indexer/lookupAssetBalances.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAssetBalancesParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAssetByID.go b/client/v2/indexer/lookupAssetByID.go index 4ffbd674..15a3dd22 100644 --- a/client/v2/indexer/lookupAssetByID.go +++ b/client/v2/indexer/lookupAssetByID.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAssetByIDParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupAssetTransactions.go b/client/v2/indexer/lookupAssetTransactions.go index 071addc2..848552c9 100644 --- a/client/v2/indexer/lookupAssetTransactions.go +++ b/client/v2/indexer/lookupAssetTransactions.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupAssetTransactionsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupBlock.go b/client/v2/indexer/lookupBlock.go index 1f1881c0..1e923f7b 100644 --- a/client/v2/indexer/lookupBlock.go +++ b/client/v2/indexer/lookupBlock.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupBlockParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/lookupTransaction.go b/client/v2/indexer/lookupTransaction.go index af1f69c7..d45d4897 100644 --- a/client/v2/indexer/lookupTransaction.go +++ b/client/v2/indexer/lookupTransaction.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // LookupTransaction lookup a single transaction. diff --git a/client/v2/indexer/makeHealthCheck.go b/client/v2/indexer/makeHealthCheck.go index 2678fded..ccd66461 100644 --- a/client/v2/indexer/makeHealthCheck.go +++ b/client/v2/indexer/makeHealthCheck.go @@ -3,8 +3,8 @@ package indexer import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // HealthCheck returns 200 if healthy. diff --git a/client/v2/indexer/searchForAccounts.go b/client/v2/indexer/searchForAccounts.go index 5d1edf5b..ce180d37 100644 --- a/client/v2/indexer/searchForAccounts.go +++ b/client/v2/indexer/searchForAccounts.go @@ -3,8 +3,8 @@ package indexer import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // SearchAccountsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/searchForApplicationBoxes.go b/client/v2/indexer/searchForApplicationBoxes.go index 6b353f5e..79737812 100644 --- a/client/v2/indexer/searchForApplicationBoxes.go +++ b/client/v2/indexer/searchForApplicationBoxes.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // SearchForApplicationBoxesParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/searchForApplications.go b/client/v2/indexer/searchForApplications.go index 3cfe444d..bad564a0 100644 --- a/client/v2/indexer/searchForApplications.go +++ b/client/v2/indexer/searchForApplications.go @@ -3,8 +3,8 @@ package indexer import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // SearchForApplicationsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/searchForAssets.go b/client/v2/indexer/searchForAssets.go index 0b8383f6..575c7444 100644 --- a/client/v2/indexer/searchForAssets.go +++ b/client/v2/indexer/searchForAssets.go @@ -3,8 +3,8 @@ package indexer import ( "context" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // SearchForAssetsParams contains all of the query parameters for url serialization. diff --git a/client/v2/indexer/searchForTransactions.go b/client/v2/indexer/searchForTransactions.go index fa3b6bd0..75431b4e 100644 --- a/client/v2/indexer/searchForTransactions.go +++ b/client/v2/indexer/searchForTransactions.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "time" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // SearchForTransactionsParams contains all of the query parameters for url serialization. diff --git a/crypto/account.go b/crypto/account.go index 82cc23ea..3c7a137f 100644 --- a/crypto/account.go +++ b/crypto/account.go @@ -5,9 +5,8 @@ import ( "errors" "fmt" + "github.com/tasosbit/go-algorand-sdk/v2/types" "golang.org/x/crypto/ed25519" - - "github.com/algorand/go-algorand-sdk/v2/types" ) // prefix for multisig transaction signing diff --git a/crypto/account_test.go b/crypto/account_test.go index 2af5c840..14b288bd 100644 --- a/crypto/account_test.go +++ b/crypto/account_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/ed25519" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func TestGenerateAccount(t *testing.T) { diff --git a/crypto/crypto.go b/crypto/crypto.go index 156ea4bc..2878f3e6 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -10,10 +10,9 @@ import ( "encoding/binary" "fmt" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/types" "golang.org/x/crypto/ed25519" - - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/types" ) // txidPrefix is prepended to a transaction when computing its txid diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index 8102f275..2704c9f6 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/ed25519" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func makeTestMultisigAccount(t *testing.T) (MultisigAccount, ed25519.PrivateKey, ed25519.PrivateKey, ed25519.PrivateKey) { diff --git a/examples/account/main.go b/examples/account/main.go index 263a0cba..cc67c875 100644 --- a/examples/account/main.go +++ b/examples/account/main.go @@ -5,11 +5,11 @@ import ( "fmt" "log" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/examples/apps/main.go b/examples/apps/main.go index 092c4d6f..f6afbc5f 100644 --- a/examples/apps/main.go +++ b/examples/apps/main.go @@ -7,11 +7,11 @@ import ( "log" "time" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/examples/asa/main.go b/examples/asa/main.go index 2787a7a0..0543d23d 100644 --- a/examples/asa/main.go +++ b/examples/asa/main.go @@ -4,10 +4,10 @@ import ( "context" "log" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/examples/atc/main.go b/examples/atc/main.go index d0184ec0..d3f34805 100644 --- a/examples/atc/main.go +++ b/examples/atc/main.go @@ -6,10 +6,10 @@ import ( "io/ioutil" "log" - "github.com/algorand/go-algorand-sdk/v2/abi" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/abi" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/examples/atomic_transactions/main.go b/examples/atomic_transactions/main.go index 3d0f5815..d7c03a64 100644 --- a/examples/atomic_transactions/main.go +++ b/examples/atomic_transactions/main.go @@ -5,10 +5,10 @@ import ( "fmt" "log" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/examples/codec/main.go b/examples/codec/main.go index b896912b..7662f6d0 100644 --- a/examples/codec/main.go +++ b/examples/codec/main.go @@ -7,12 +7,12 @@ import ( "log" "os" - "github.com/algorand/go-algorand-sdk/v2/abi" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/abi" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/examples/debug/main.go b/examples/debug/main.go index 2d9fda18..8db2a9a9 100644 --- a/examples/debug/main.go +++ b/examples/debug/main.go @@ -5,11 +5,11 @@ import ( "log" "os" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/examples/indexer/main.go b/examples/indexer/main.go index 2a856ac6..6ea6beb6 100644 --- a/examples/indexer/main.go +++ b/examples/indexer/main.go @@ -6,9 +6,9 @@ import ( "fmt" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" - "github.com/algorand/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" + "github.com/tasosbit/go-algorand-sdk/v2/examples" ) func main() { diff --git a/examples/kmd/main.go b/examples/kmd/main.go index acb57aa4..36ba00b4 100644 --- a/examples/kmd/main.go +++ b/examples/kmd/main.go @@ -5,11 +5,11 @@ import ( "fmt" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/kmd" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/kmd" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/examples/lsig/main.go b/examples/lsig/main.go index 528019ee..72c995bd 100644 --- a/examples/lsig/main.go +++ b/examples/lsig/main.go @@ -7,10 +7,10 @@ import ( "io/ioutil" "log" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func main() { diff --git a/examples/overview/main.go b/examples/overview/main.go index b6fc4cda..069535ab 100644 --- a/examples/overview/main.go +++ b/examples/overview/main.go @@ -7,11 +7,11 @@ import ( "net/http" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/examples/participation/main.go b/examples/participation/main.go index fef59af8..4d3897e8 100644 --- a/examples/participation/main.go +++ b/examples/participation/main.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/examples" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/examples" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" ) func main() { diff --git a/examples/utils.go b/examples/utils.go index eaa54e13..8558cb2d 100644 --- a/examples/utils.go +++ b/examples/utils.go @@ -9,12 +9,12 @@ import ( "os" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/kmd" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/transaction" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/kmd" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) var ( diff --git a/go.mod b/go.mod index 5d6b86ea..4c30043a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/algorand/go-algorand-sdk/v2 +module github.com/tasosbit/go-algorand-sdk/v2 go 1.21 diff --git a/mnemonic/helpers.go b/mnemonic/helpers.go index d320c7e8..66902a8d 100644 --- a/mnemonic/helpers.go +++ b/mnemonic/helpers.go @@ -1,9 +1,8 @@ package mnemonic import ( + "github.com/tasosbit/go-algorand-sdk/v2/types" "golang.org/x/crypto/ed25519" - - "github.com/algorand/go-algorand-sdk/v2/types" ) // FromPrivateKey is a helper that converts an ed25519 private key to a diff --git a/mnemonic/mnemonic_test.go b/mnemonic/mnemonic_test.go index 23e0c71e..9ab1c0de 100644 --- a/mnemonic/mnemonic_test.go +++ b/mnemonic/mnemonic_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func TestGenerateAndRecovery(t *testing.T) { diff --git a/protocol/config/consensus.go b/protocol/config/consensus.go index 6719f10f..ad2ad42c 100644 --- a/protocol/config/consensus.go +++ b/protocol/config/consensus.go @@ -3,7 +3,7 @@ package config import ( "time" - "github.com/algorand/go-algorand-sdk/v2/protocol" + "github.com/tasosbit/go-algorand-sdk/v2/protocol" ) // ConsensusParams specifies settings that might vary based on the @@ -1469,6 +1469,9 @@ func initConsensusProtocols() { vAlpha5.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} Consensus[protocol.ConsensusVAlpha5] = vAlpha5 vAlpha4.ApprovedUpgrades[protocol.ConsensusVAlpha5] = 10000 + + vFnet1 := vFuture + Consensus[protocol.ConsensusVFnet1] = vFnet1 } // Global defines global Algorand protocol parameters which should not be overridden. diff --git a/protocol/consensus.go b/protocol/consensus.go index aad06796..a719a960 100644 --- a/protocol/consensus.go +++ b/protocol/consensus.go @@ -224,6 +224,9 @@ const ConsensusVAlpha4 = ConsensusVersion("alpha4") // ConsensusVAlpha5 uses the same parameters as ConsensusV36. const ConsensusVAlpha5 = ConsensusVersion("alpha5") +// ConsensusVFnet1 has frozen future parameters at first incentives iteration +const ConsensusVFnet1 = ConsensusVersion("fnet1") + // !!! ********************* !!! // !!! *** Please update ConsensusCurrentVersion when adding new protocol versions *** !!! // !!! ********************* !!! diff --git a/test/algodclientv2_test.go b/test/algodclientv2_test.go index 21b26eab..f2f98796 100644 --- a/test/algodclientv2_test.go +++ b/test/algodclientv2_test.go @@ -6,9 +6,9 @@ import ( "encoding/base64" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - modelsV2 "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + modelsV2 "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/types" "github.com/cucumber/godog" ) diff --git a/test/applications_integration_test.go b/test/applications_integration_test.go index 9003f4a4..6a7d0bf4 100644 --- a/test/applications_integration_test.go +++ b/test/applications_integration_test.go @@ -16,17 +16,17 @@ import ( "strings" "time" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" "github.com/cucumber/godog" - "github.com/algorand/go-algorand-sdk/v2/abi" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" - "github.com/algorand/go-algorand-sdk/v2/crypto" - sdkJson "github.com/algorand/go-algorand-sdk/v2/encoding/json" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/abi" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + sdkJson "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) var algodV2client *algod.Client diff --git a/test/applications_unit_test.go b/test/applications_unit_test.go index 6fd19d8c..e4fda455 100644 --- a/test/applications_unit_test.go +++ b/test/applications_unit_test.go @@ -6,9 +6,9 @@ import ( "github.com/cucumber/godog" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" ) func feeFieldIsInTxn() error { diff --git a/test/indexer_unit_test.go b/test/indexer_unit_test.go index 4e9f915e..289b94e9 100644 --- a/test/indexer_unit_test.go +++ b/test/indexer_unit_test.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" "github.com/cucumber/godog" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" ) func IndexerUnitTestContext(s *godog.Suite) { diff --git a/test/responses_unit_test.go b/test/responses_unit_test.go index ad299696..e6064cb9 100644 --- a/test/responses_unit_test.go +++ b/test/responses_unit_test.go @@ -8,11 +8,11 @@ import ( "github.com/cucumber/godog" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" - "github.com/algorand/go-algorand-sdk/v2/encoding/json" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) var algodC *algod.Client diff --git a/test/steps_test.go b/test/steps_test.go index bd5dbd80..25208bc1 100644 --- a/test/steps_test.go +++ b/test/steps_test.go @@ -19,24 +19,24 @@ import ( "testing" "time" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" "golang.org/x/crypto/ed25519" - "github.com/algorand/go-algorand-sdk/v2/abi" - "github.com/algorand/go-algorand-sdk/v2/auction" - "github.com/algorand/go-algorand-sdk/v2/client/kmd" - algodV2 "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - commonV2 "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - modelsV2 "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - indexerV2 "github.com/algorand/go-algorand-sdk/v2/client/v2/indexer" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/logic" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" "github.com/cucumber/godog" "github.com/cucumber/godog/colors" + "github.com/tasosbit/go-algorand-sdk/v2/abi" + "github.com/tasosbit/go-algorand-sdk/v2/auction" + "github.com/tasosbit/go-algorand-sdk/v2/client/kmd" + algodV2 "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + commonV2 "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + modelsV2 "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + indexerV2 "github.com/tasosbit/go-algorand-sdk/v2/client/v2/indexer" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/logic" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) var txn types.Transaction diff --git a/test/transactions_test.go b/test/transactions_test.go index 8d8925ce..c547e0dd 100644 --- a/test/transactions_test.go +++ b/test/transactions_test.go @@ -4,14 +4,14 @@ import ( "bytes" "encoding/base64" "fmt" - "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/tasosbit/go-algorand-sdk/v2/transaction" "strconv" "strings" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" "github.com/cucumber/godog" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" "golang.org/x/crypto/ed25519" ) diff --git a/test/utilities.go b/test/utilities.go index fb68cc35..34d2dfd9 100644 --- a/test/utilities.go +++ b/test/utilities.go @@ -13,9 +13,9 @@ import ( "sort" "strings" - sdk_json "github.com/algorand/go-algorand-sdk/v2/encoding/json" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/types" + sdk_json "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // VerifyResponse compares the actual response to the expected response. diff --git a/transaction/atomicTransactionComposer.go b/transaction/atomicTransactionComposer.go index 2a1a9eb5..9349463a 100644 --- a/transaction/atomicTransactionComposer.go +++ b/transaction/atomicTransactionComposer.go @@ -6,12 +6,12 @@ import ( "errors" "fmt" - "github.com/algorand/go-algorand-sdk/v2/abi" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/abi" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // abiReturnHash is the 4-byte prefix for logged return values, from https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0004.md#standard-format diff --git a/transaction/atomicTransactionComposer_test.go b/transaction/atomicTransactionComposer_test.go index 6982a6e3..8fece91b 100644 --- a/transaction/atomicTransactionComposer_test.go +++ b/transaction/atomicTransactionComposer_test.go @@ -3,10 +3,10 @@ package transaction import ( "testing" - "github.com/algorand/go-algorand-sdk/v2/abi" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/types" "github.com/stretchr/testify/require" + "github.com/tasosbit/go-algorand-sdk/v2/abi" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func TestMakeAtomicTransactionComposer(t *testing.T) { diff --git a/transaction/dryrun.go b/transaction/dryrun.go index d0a92308..adc59876 100644 --- a/transaction/dryrun.go +++ b/transaction/dryrun.go @@ -9,10 +9,10 @@ import ( "strings" "text/tabwriter" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) const ( diff --git a/transaction/transaction.go b/transaction/transaction.go index 46c06c65..5a7f09a0 100644 --- a/transaction/transaction.go +++ b/transaction/transaction.go @@ -5,9 +5,9 @@ import ( "encoding/base64" "fmt" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // MinTxnFee is v5 consensus params, in microAlgos diff --git a/transaction/transactionSigner.go b/transaction/transactionSigner.go index 951d945d..fc13bd16 100644 --- a/transaction/transactionSigner.go +++ b/transaction/transactionSigner.go @@ -3,9 +3,9 @@ package transaction import ( "encoding/json" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/types" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) // TransactionSigner represents a function which can sign transactions from an atomic transaction group. diff --git a/transaction/transactionSigner_test.go b/transaction/transactionSigner_test.go index e1340b30..31a8ffae 100644 --- a/transaction/transactionSigner_test.go +++ b/transaction/transactionSigner_test.go @@ -4,10 +4,10 @@ import ( "crypto/ed25519" "testing" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" "github.com/stretchr/testify/require" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func TestMakeBasicAccountTransactionSigner(t *testing.T) { diff --git a/transaction/transaction_test.go b/transaction/transaction_test.go index d7e1d5e9..6dd28ed6 100644 --- a/transaction/transaction_test.go +++ b/transaction/transaction_test.go @@ -4,11 +4,11 @@ import ( "encoding/base64" "testing" - "github.com/algorand/go-algorand-sdk/v2/crypto" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" - "github.com/algorand/go-algorand-sdk/v2/mnemonic" - "github.com/algorand/go-algorand-sdk/v2/types" "github.com/stretchr/testify/require" + "github.com/tasosbit/go-algorand-sdk/v2/crypto" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/mnemonic" + "github.com/tasosbit/go-algorand-sdk/v2/types" ) func byteFromBase64(s string) []byte { diff --git a/transaction/waitForConfirmation.go b/transaction/waitForConfirmation.go index af445a76..cb41c59c 100644 --- a/transaction/waitForConfirmation.go +++ b/transaction/waitForConfirmation.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common" - "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/algod" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common" + "github.com/tasosbit/go-algorand-sdk/v2/client/v2/common/models" ) // WaitForConfirmation waits for a pending transaction to be accepted by the network diff --git a/types/address_test.go b/types/address_test.go index 11205a0e..4b9e17a0 100644 --- a/types/address_test.go +++ b/types/address_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - json2 "github.com/algorand/go-algorand-sdk/v2/encoding/json" + json2 "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" ) func randomBytes(s []byte) { diff --git a/types/basics.go b/types/basics.go index 2ac21430..68a5a3bb 100644 --- a/types/basics.go +++ b/types/basics.go @@ -7,9 +7,8 @@ import ( "fmt" "math" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" "golang.org/x/crypto/ed25519" - - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" ) // TxType identifies the type of the transaction diff --git a/types/basics_test.go b/types/basics_test.go index ad91de34..8f1ab5bc 100644 --- a/types/basics_test.go +++ b/types/basics_test.go @@ -4,7 +4,7 @@ import ( "testing" "encoding/base64" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" "github.com/stretchr/testify/require" ) diff --git a/types/blockhash_test.go b/types/blockhash_test.go index dc9a36f7..803d7657 100644 --- a/types/blockhash_test.go +++ b/types/blockhash_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - json2 "github.com/algorand/go-algorand-sdk/v2/encoding/json" + json2 "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" ) func TestUnmarshalBlockHash(t *testing.T) { diff --git a/types/genesis.go b/types/genesis.go index 4e6ab066..6e2e459a 100644 --- a/types/genesis.go +++ b/types/genesis.go @@ -4,7 +4,7 @@ import ( "crypto/sha512" "fmt" - "github.com/algorand/go-algorand-sdk/v2/encoding/msgpack" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/msgpack" ) // GenesisHashID is the Genesis HashID defined in go-algorand/protocol/hash.go diff --git a/types/genesis_test.go b/types/genesis_test.go index e6537d7c..031777d3 100644 --- a/types/genesis_test.go +++ b/types/genesis_test.go @@ -6,9 +6,9 @@ import ( "io/ioutil" "testing" - "github.com/algorand/go-algorand-sdk/v2/encoding/json" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tasosbit/go-algorand-sdk/v2/encoding/json" ) func TestEncodeDecodeGenesis(t *testing.T) {