-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Github-Actions: Adding pr title and label checks (#336) * Dev Tools: Source map decoder (#335) * Updated CHANGELOG.md * AVM: Consolidate TEAL and AVM versions (#345) * Testing: Use Dev mode network for cucumber tests (#349) * AVM: Use avm-abi repo (#352) * Updated CHANGELOG.md * Enhancement: Use Sandbox for Testing (#360) Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * Bug-Fix: passthru verbosity (#371) * Enhancement: Deprecating use of langspec (#366) Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> * StateProof: State proof support (#374) * Regenerate client. * Update txn and block objects, cucumber tests passing. * Enable cucumber tests. * Update types/stateproof.go * Add transactions-root-256 * Remove unused code. * Remove unused file * Add txn commitments blockheader fields * Rename signature, add allocbound definitions * Add txn commitment to header * PR comments * Remove unused file Co-authored-by: Will Winder <wwinder.unh@gmail.com> * State Proofs: Use generic type for StateProof txn field. (#378) * Use generic type for StateProof txn field. * Add missing type. * Remove GenericDigest. * fix type assertion on source map version (#370) * let the json package figure out how to decode the elements of the incoming map (#380) * StateProof: State Proof Verification additions (#377) * Regenerate client. * Remove unused file * moved files from stateproof verification repo * now using updated go-stateproof-verification * fixed go mod * moved consts near their usage * added working state proof verifier test * added unit test and resources * now using go 1.15 supported function * changes to avoid dependency of stateproof verification on SDK * added needed types to stateproof.go for message hashing * reverted packages, now using up to date go-stateproof-verification * CR: renamed verification functions * hashing sp message is now in crypto * removed hashing of light block header * CR: now allocating space upfront in hashing state proof message * attempting to use embedded files * CR: using GenericDigest in block.go * CR: Renamed package to match directory * Removed go 1.15 from CI * improved embed usage * CR: removed stateproof verification logic * tidied go mod file Co-authored-by: Will Winder <wwinder.unh@gmail.com> Co-authored-by: Eric Warehime <eric.warehime@gmail.com> * State Proofs: added compute leaf function for light block header to sdk (#382) * added compute leaf function for light block header to sdk * renamed blockheader256 * changed passed type to pointer * reverted back to copying * renamed light block header hash func (#383) * Enable stpf cucumber unit tests (#386) Co-authored-by: Jack <87339414+algojack@users.noreply.github.com> Co-authored-by: Ben Guidarelli <ben.guidarelli@gmail.com> Co-authored-by: Jack Smith <jack.smith@algorand.com> Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com> Co-authored-by: algochoi <86622919+algochoi@users.noreply.github.com> Co-authored-by: Jason Paulos <jasonpaulos@users.noreply.github.com> Co-authored-by: Barbara Poon <barbara.poon@algorand.com> Co-authored-by: Zeph Grunschlag <tzaffi@users.noreply.github.com> Co-authored-by: Eric Warehime <eric.warehime@gmail.com> Co-authored-by: Will Winder <wwinder.unh@gmail.com> Co-authored-by: Almog Tal <107349997+almog-t@users.noreply.github.com>
- Loading branch information
1 parent
42ba3e3
commit b21b064
Showing
55 changed files
with
799 additions
and
1,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Configs for testing repo download: | ||
SDK_TESTING_URL="https://github.com/algorand/algorand-sdk-testing" | ||
SDK_TESTING_BRANCH="feature/box-storage" | ||
SDK_TESTING_HARNESS="test-harness" | ||
|
||
VERBOSE_HARNESS=0 | ||
|
||
# WARNING: If set to 1, new features will be LOST when downloading the test harness. | ||
# REGARDLESS: modified features are ALWAYS overwritten. | ||
REMOVE_LOCAL_FEATURES=0 | ||
|
||
# WARNING: Be careful when turning on the next variable. | ||
# In that case you'll need to provide all variables expected by `algorand-sdk-testing`'s `.env` | ||
OVERWRITE_TESTING_ENVIRONMENT=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,66 @@ | ||
package abi | ||
|
||
import ( | ||
"fmt" | ||
"math" | ||
|
||
"github.com/algorand/go-algorand/data/abi" | ||
avm_abi "github.com/algorand/avm-abi/abi" | ||
) | ||
|
||
type Type = abi.Type | ||
type Type = avm_abi.Type | ||
|
||
func TypeOf(str string) (Type, error) { | ||
return abi.TypeOf(str) | ||
return avm_abi.TypeOf(str) | ||
} | ||
|
||
// MakeTupleType makes tuple ABI type by taking an array of tuple element types as argument. | ||
func MakeTupleType(argumentTypes []Type) (Type, error) { | ||
if len(argumentTypes) == 0 { | ||
return Type{}, fmt.Errorf("tuple must contain at least one type") | ||
} | ||
return avm_abi.MakeTupleType(argumentTypes) | ||
} | ||
|
||
// AnyTransactionType is the ABI argument type string for a nonspecific transaction argument | ||
const AnyTransactionType = avm_abi.AnyTransactionType | ||
|
||
// PaymentTransactionType is the ABI argument type string for a payment transaction argument | ||
const PaymentTransactionType = avm_abi.PaymentTransactionType | ||
|
||
// KeyRegistrationTransactionType is the ABI argument type string for a key registration transaction | ||
// argument | ||
const KeyRegistrationTransactionType = avm_abi.KeyRegistrationTransactionType | ||
|
||
// AssetConfigTransactionType is the ABI argument type string for an asset configuration transaction | ||
// argument | ||
const AssetConfigTransactionType = avm_abi.AssetConfigTransactionType | ||
|
||
// AssetTransferTransactionType is the ABI argument type string for an asset transfer transaction | ||
// argument | ||
const AssetTransferTransactionType = avm_abi.AssetTransferTransactionType | ||
|
||
if len(argumentTypes) >= math.MaxUint16 { | ||
return Type{}, fmt.Errorf("tuple type child type number larger than maximum uint16 error") | ||
} | ||
// AssetFreezeTransactionType is the ABI argument type string for an asset freeze transaction | ||
// argument | ||
const AssetFreezeTransactionType = avm_abi.AssetFreezeTransactionType | ||
|
||
strTuple := "(" + argumentTypes[0].String() | ||
for i := 1; i < len(argumentTypes); i++ { | ||
strTuple += "," + argumentTypes[i].String() | ||
} | ||
strTuple += ")" | ||
// ApplicationCallTransactionType is the ABI argument type string for an application call | ||
// transaction argument | ||
const ApplicationCallTransactionType = avm_abi.ApplicationCallTransactionType | ||
|
||
return TypeOf(strTuple) | ||
// IsTransactionType checks if a type string represents a transaction type | ||
// argument, such as "txn", "pay", "keyreg", etc. | ||
func IsTransactionType(typeStr string) bool { | ||
return avm_abi.IsTransactionType(typeStr) | ||
} | ||
|
||
// AccountReferenceType is the ABI argument type string for account references | ||
const AccountReferenceType = avm_abi.AccountReferenceType | ||
|
||
// AssetReferenceType is the ABI argument type string for asset references | ||
const AssetReferenceType = avm_abi.AssetReferenceType | ||
|
||
// ApplicationReferenceType is the ABI argument type string for application references | ||
const ApplicationReferenceType = avm_abi.ApplicationReferenceType | ||
|
||
// IsReferenceType checks if a type string represents a reference type argument, | ||
// such as "account", "asset", or "application". | ||
func IsReferenceType(typeStr string) bool { | ||
return avm_abi.IsReferenceType(typeStr) | ||
} | ||
|
||
// VoidReturnType is the ABI return type string for a method that does not return any value | ||
const VoidReturnType = avm_abi.VoidReturnType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package algod | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/algorand/go-algorand-sdk/client/v2/common" | ||
"github.com/algorand/go-algorand-sdk/client/v2/common/models" | ||
) | ||
|
||
// GetLightBlockHeaderProof gets a proof for a given light block header inside a | ||
// state proof commitment | ||
type GetLightBlockHeaderProof struct { | ||
c *Client | ||
|
||
round uint64 | ||
} | ||
|
||
// Do performs the HTTP request | ||
func (s *GetLightBlockHeaderProof) Do(ctx context.Context, headers ...*common.Header) (response models.LightBlockHeaderProof, err error) { | ||
err = s.c.get(ctx, &response, fmt.Sprintf("/v2/blocks/%s/lightheader/proof", common.EscapeParams(s.round)...), nil, headers) | ||
return | ||
} |
Oops, something went wrong.