Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
32d3f3d
Update the Version, BuildNumber, genesistimestamp.data
Algo-devops-service Nov 18, 2021
8590499
Three new globals for to help contract-to-contract usability
jannotti Nov 21, 2021
24055a3
detritis
jannotti Nov 21, 2021
92a26b6
Check error
jannotti Nov 22, 2021
d268300
doc comments
jannotti Nov 22, 2021
116c06e
Support transaction arguments for `goal app method` (#3233)
jasonpaulos Nov 22, 2021
9807eab
CI: use libboost-math-dev instead of libboost-all-dev (#3223)
cce Nov 22, 2021
6cb3a52
testing: fixes to rest-participation-key e2e test (#3238)
algonautshant Nov 23, 2021
52b528b
testing: interactive mode for e2e testing (#3227)
algonautshant Nov 23, 2021
8aa0728
Merge pull request #3231 from Algo-devops-service/relbeta3.2.0
algojohnlee Nov 23, 2021
e5a1e53
Merge remote-tracking branch 'upstream/feature/contract-to-contract' …
jannotti Nov 23, 2021
597fc63
Make dev-mode tests less flaky. (#3252)
winder Nov 29, 2021
5339cf0
adding libtool to ubuntu deps (#3251)
barnjamin Nov 29, 2021
715f511
Fix error shadowing in Eval (#3258)
algorandskiy Nov 30, 2021
54db1c7
Disable flaky test. (#3256)
winder Nov 30, 2021
4e34eba
Merge branch 'master' into relbeta3.2.1
Algo-devops-service Nov 30, 2021
305d7ab
Update the Version, BuildNumber, genesistimestamp.data
Algo-devops-service Nov 30, 2021
2baf39b
Merge pull request #3260 from Algo-devops-service/relbeta3.2.1
algojohnlee Dec 2, 2021
6657c2b
Fix a data race in app tests (#3269)
algorandskiy Dec 2, 2021
b3ac9bd
Fix e2e.sh mixed indent characters. (#3266)
winder Dec 2, 2021
0a6374b
Fix ParticipationKeyResponse type. (#3264)
winder Dec 2, 2021
5456323
disable parallelism for e2e-go tests (#3242)
cce Dec 2, 2021
dc25f10
Updating Readme.md with circleci status badges (#3245)
algojack Dec 2, 2021
e466aa1
Fix formatting for CircleCI badges (#3272)
onetechnical Dec 3, 2021
70ff3c7
Add Custom Scenario for Performance Testing (#3278)
algobarb Dec 6, 2021
b6cbbf3
Merge pull request #3279 from Algo-devops-service/relstable3.2.1
algojohnlee Dec 7, 2021
db80261
Impose limits on the entire "tree" of inner calls.
jannotti Dec 7, 2021
850f7c7
ParticipationRegistry - StateProof loading methods (#3261)
winder Dec 7, 2021
221955f
Op base64 decode (#3220)
tzaffi Dec 8, 2021
d02cb89
Merge remote-tracking branch 'origin/rel/stable' into relstable3.2.1-…
Algo-devops-service Dec 8, 2021
e1b4442
Bump Version, Remove buildnumber.dat and genesistimestamp.dat files.
Algo-devops-service Dec 8, 2021
46eb760
Merge pull request #3290 from Algo-devops-service/relstable3.2.1-remerge
algojohnlee Dec 8, 2021
f51d2d7
Change golang version to 1.16.11 in go-algorand (#2825)
algojack Dec 8, 2021
02f6cac
Compatibility mode for partkeyinfo. (#3291)
winder Dec 9, 2021
5318545
TestEcdsa: fix flaky "tampering" of public key (#3282)
cce Dec 9, 2021
34d35fd
Move appID tracking into EvalContext, out of LedgerForLogic
jannotti Dec 9, 2021
6260b9d
Stupid linter
jannotti Dec 9, 2021
29a10da
Support reference types in `goal app method` (#3275)
jasonpaulos Dec 9, 2021
741d1ea
Add a hash prefix for ARCs-related hashes (#3298)
fabrice102 Dec 10, 2021
94ba758
catchup: suspend the catchup session once the agreement service kicks…
algonautshant Dec 10, 2021
4860375
Compatibility mode for partkeyinfo. (#3291)
winder Dec 9, 2021
4791706
catchup: suspend the catchup session once the agreement service kicks…
algonautshant Dec 10, 2021
3ac5e0e
Bump buildnumber.dat
onetechnical Dec 10, 2021
c4ef818
Merge pull request #3300 from algorand/relbeta3.2.2
algojohnlee Dec 10, 2021
493c2ea
testing: disable flaky test (#3268)
winder Dec 10, 2021
b2ca02f
enumerate conditions that might cause this fetchAndWrite to return fa…
barnjamin Dec 10, 2021
4624e33
Fix unit tests error messages
jannotti Dec 10, 2021
34b3eca
Merge branch 'rel/beta' into relstable3.2.2
Algo-devops-service Dec 10, 2021
18cd6cd
make sure the block service is not attempting to access the ledger af…
tsachiherman Dec 10, 2021
97e8068
Merge pull request #3305 from Algo-devops-service/relstable3.2.2
algojohnlee Dec 13, 2021
6330862
Avoid creating algod process for the sole purpose of retrieving the g…
tsachiherman Dec 13, 2021
ac5f839
documentation: fix algorand specs link (#3309)
tolikzinovyev Dec 14, 2021
34e2fbd
testing: reword partitiontest lint message. (#3297)
winder Dec 15, 2021
de7fe45
testing: fix random data race in TestAppAccountDataStorage (#3315)
tsachiherman Dec 15, 2021
d494c40
Allow access to resources created in the same transaction group
jannotti Dec 15, 2021
678c1ea
Merge branch 'rel/stable' of https://github.com/algorand/go-algorand …
egieseke Dec 15, 2021
3520336
Merge pull request #3317 from egieseke/rel/stable
algojohnlee Dec 15, 2021
4d25744
Merge branch 'master' into feature/contract-to-contract
jannotti Dec 16, 2021
320e11d
Merge remote-tracking branch 'upstream/feature/contract-to-contract' …
jannotti Dec 16, 2021
6df82a1
Merge remote-tracking branch 'upstream/feature/contract-to-contract' …
jannotti Dec 16, 2021
b3215c0
Access to apps created in group
jannotti Dec 17, 2021
06edcf5
Remove tracked created mechanism in favor of examining applydata.
jannotti Dec 17, 2021
b7ee4a1
Allow v6 AVM code to use in-group created asas, apps (& their accts)
jannotti Dec 21, 2021
813bdf8
lint docs
jannotti Dec 21, 2021
0fcc77b
typo
jannotti Dec 21, 2021
50665a2
The review dog needs obedience training.
jannotti Dec 21, 2021
7422318
Use one EvalParams for logic evals, another for apps in dry run
jannotti Dec 22, 2021
02bd552
Use logic.NewAppEvalParams to decrease copying and bugs in debugger
jannotti Dec 22, 2021
82d9ef5
Simplify use of NewEvalParams. No more nil return when no apps.
jannotti Dec 22, 2021
11a5b53
Remove explicit PastSideEffects handling in tealdbg
jannotti Dec 22, 2021
8fa33c9
Always create EvalParams to evaluate a transaction group.
jannotti Dec 23, 2021
7e8d997
Correct mistaken commit
jannotti Dec 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/goal/clerk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ var dryrunCmd = &cobra.Command{
if uint64(txn.Lsig.Len()) > params.LogicSigMaxSize {
reportErrorf("program size too large: %d > %d", len(txn.Lsig.Logic), params.LogicSigMaxSize)
}
ep := &logic.EvalParams{Proto: &params, TxnGroup: txgroup}
ep := logic.NewEvalParams(txgroup, &params, nil)
err := logic.CheckSignature(i, ep)
if err != nil {
reportErrorf("program failed Check: %s", err)
Expand Down
7 changes: 2 additions & 5 deletions cmd/tealdbg/debugger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ func TestDebuggerSimple(t *testing.T) {
da := makeTestDbgAdapter(t)
debugger.AddAdapter(da)

ep := &logic.EvalParams{
Proto: &proto,
Debugger: debugger,
TxnGroup: make([]transactions.SignedTxnWithAD, 1),
}
ep := logic.NewEvalParams(make([]transactions.SignedTxnWithAD, 1), &proto, nil)
ep.Debugger = debugger

source := `int 0
int 1
Expand Down
109 changes: 27 additions & 82 deletions cmd/tealdbg/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,16 @@ const (

// evaluation is a description of a single debugger run
type evaluation struct {
program []byte
source string
offsetToLine map[int]int
name string
groupIndex uint64
pastSideEffects []logic.EvalSideEffects
mode modeType
aidx basics.AppIndex
ba apply.Balances
result evalResult
states AppState
program []byte
source string
offsetToLine map[int]int
name string
groupIndex uint64
mode modeType
aidx basics.AppIndex
ba apply.Balances
result evalResult
states AppState
}

func (e *evaluation) eval(gi int, ep *logic.EvalParams) (pass bool, err error) {
Expand Down Expand Up @@ -341,17 +340,6 @@ func (r *LocalRunner) Setup(dp *DebugParams) (err error) {
dp.LatestTimestamp = int64(ddr.LatestTimestamp)
}

if dp.PastSideEffects == nil {
dp.PastSideEffects = logic.MakePastSideEffects(len(r.txnGroup))
} else if len(dp.PastSideEffects) != len(r.txnGroup) {
err = fmt.Errorf(
"invalid past side effects slice with length %d should match group length of %d txns",
len(dp.PastSideEffects),
len(r.txnGroup),
)
return
}

// if program(s) specified then run from it
if len(dp.ProgramBlobs) > 0 {
if len(r.txnGroup) == 1 && dp.GroupIndex != 0 {
Expand Down Expand Up @@ -389,7 +377,6 @@ func (r *LocalRunner) Setup(dp *DebugParams) (err error) {
}
}
r.runs[i].groupIndex = uint64(dp.GroupIndex)
r.runs[i].pastSideEffects = dp.PastSideEffects
r.runs[i].name = dp.ProgramNames[i]

var mode modeType
Expand Down Expand Up @@ -452,13 +439,12 @@ func (r *LocalRunner) Setup(dp *DebugParams) (err error) {
return
}
run := evaluation{
program: stxn.Txn.ApprovalProgram,
groupIndex: uint64(gi),
pastSideEffects: dp.PastSideEffects,
mode: modeStateful,
aidx: appIdx,
ba: b,
states: states,
program: stxn.Txn.ApprovalProgram,
groupIndex: uint64(gi),
mode: modeStateful,
aidx: appIdx,
ba: b,
states: states,
}
r.runs = append(r.runs, run)
}
Expand Down Expand Up @@ -488,13 +474,12 @@ func (r *LocalRunner) Setup(dp *DebugParams) (err error) {
return
}
run := evaluation{
program: program,
groupIndex: uint64(gi),
pastSideEffects: dp.PastSideEffects,
mode: modeStateful,
aidx: appIdx,
ba: b,
states: states,
program: program,
groupIndex: uint64(gi),
mode: modeStateful,
aidx: appIdx,
ba: b,
states: states,
}
r.runs = append(r.runs, run)
found = true
Expand Down Expand Up @@ -526,30 +511,9 @@ func (r *LocalRunner) RunAll() error {
txngroup := transactions.WrapSignedTxnsWithAD(r.txnGroup)
failed := 0
start := time.Now()
pooledApplicationBudget := uint64(0)
credit, _ := transactions.FeeCredit(txngroup, r.proto.MinTxnFee)
// ignore error since fees are not important for debugging in most cases

var pastSideEffects []logic.EvalSideEffects
for _, run := range r.runs {
if run.mode == modeStateful {
if r.proto.EnableAppCostPooling {
pooledApplicationBudget += uint64(r.proto.MaxAppProgramCost)
} else {
pooledApplicationBudget = uint64(r.proto.MaxAppProgramCost)
}
pastSideEffects = run.pastSideEffects
}
}
ep := &logic.EvalParams{
Proto: &r.proto,
Debugger: r.debugger,
TxnGroup: txngroup,
PastSideEffects: pastSideEffects,
Specials: &transactions.SpecialAddresses{},
FeeCredit: &credit,
PooledApplicationBudget: &pooledApplicationBudget,
}

ep := logic.NewEvalParams(txngroup, &r.proto, &transactions.SpecialAddresses{})
ep.Debugger = r.debugger

var last error
for i := range r.runs {
Expand All @@ -576,27 +540,8 @@ func (r *LocalRunner) Run() (bool, error) {
}

txngroup := transactions.WrapSignedTxnsWithAD(r.txnGroup)
pooledApplicationBudget := uint64(0)
credit, _ := transactions.FeeCredit(txngroup, r.proto.MinTxnFee)
// ignore error since fees are not important for debugging in most cases

for _, run := range r.runs {
if run.mode == modeStateful {
if r.proto.EnableAppCostPooling {
pooledApplicationBudget += uint64(r.proto.MaxAppProgramCost)
} else {
pooledApplicationBudget = uint64(r.proto.MaxAppProgramCost)
}
}
}
ep := &logic.EvalParams{
Proto: &r.proto,
TxnGroup: txngroup,
PastSideEffects: r.runs[0].pastSideEffects, // Looks strange, but all runs have same pastSideEffects
Specials: &transactions.SpecialAddresses{},
FeeCredit: &credit,
PooledApplicationBudget: &pooledApplicationBudget,
}

ep := logic.NewEvalParams(txngroup, &r.proto, &transactions.SpecialAddresses{})

run := r.runs[0]
// Workaround for Go's nil/empty interfaces nil check after nil assignment, i.e.
Expand Down
7 changes: 2 additions & 5 deletions cmd/tealdbg/localLedger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ int 2
// make transaction group: app call + sample payment
txn := transactions.SignedTxn{
Txn: transactions.Transaction{
Type: protocol.ApplicationCallTx,
Header: transactions.Header{
Sender: addr,
Fee: basics.MicroAlgos{Raw: 100},
Expand All @@ -109,11 +110,7 @@ int 2
a.NoError(err)

proto := config.Consensus[protocol.ConsensusCurrentVersion]
ep := &logic.EvalParams{
Proto: &proto,
TxnGroup: []transactions.SignedTxnWithAD{transactions.SignedTxnWithAD{SignedTxn: txn}},
PastSideEffects: logic.MakePastSideEffects(1),
}
ep := logic.NewEvalParams([]transactions.SignedTxnWithAD{{SignedTxn: txn}}, &proto, &transactions.SpecialAddresses{})
pass, delta, err := ba.StatefulEval(0, ep, appIdx, program)
a.NoError(err)
a.True(pass)
Expand Down
5 changes: 3 additions & 2 deletions cmd/tealdbg/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ func TestDebugEnvironment(t *testing.T) {
// make transaction group: app call + sample payment
txn := transactions.SignedTxn{
Txn: transactions.Transaction{
Type: protocol.ApplicationCallTx,
Header: transactions.Header{
Sender: sender,
Fee: basics.MicroAlgos{Raw: 1000},
Expand Down Expand Up @@ -523,7 +524,7 @@ func TestDebugFromPrograms(t *testing.T) {
partitiontest.PartitionTest(t)
a := require.New(t)

txnBlob := []byte("[" + strings.Join([]string{string(txnSample), txnSample}, ",") + "]")
txnBlob := []byte("[" + strings.Join([]string{txnSample, txnSample}, ",") + "]")

l := LocalRunner{}
dp := DebugParams{
Expand Down Expand Up @@ -602,7 +603,7 @@ func TestRunMode(t *testing.T) {
partitiontest.PartitionTest(t)
a := require.New(t)

txnBlob := []byte("[" + strings.Join([]string{string(txnSample), txnSample}, ",") + "]")
txnBlob := []byte("[" + strings.Join([]string{txnSample, txnSample}, ",") + "]")
l := LocalRunner{}

// check run mode auto on stateful code
Expand Down
2 changes: 0 additions & 2 deletions cmd/tealdbg/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"strings"
"time"

"github.com/algorand/go-algorand/data/transactions/logic"
"github.com/algorand/websocket"
"github.com/gorilla/mux"
)
Expand Down Expand Up @@ -73,7 +72,6 @@ type DebugParams struct {
Proto string
TxnBlob []byte
GroupIndex int
PastSideEffects []logic.EvalSideEffects
BalanceBlob []byte
DdrBlob []byte
IndexerURL string
Expand Down
2 changes: 1 addition & 1 deletion cmd/tealdbg/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestServerRemote(t *testing.T) {

func TestServerLocal(t *testing.T) {
partitiontest.PartitionTest(t)
txnBlob := []byte("[" + strings.Join([]string{string(txnSample), txnSample}, ",") + "]")
txnBlob := []byte("[" + strings.Join([]string{txnSample, txnSample}, ",") + "]")
dp := DebugParams{
ProgramNames: []string{"test"},
ProgramBlobs: [][]byte{{2, 0x20, 1, 1, 0x22}}, // version, intcb, int 1
Expand Down
14 changes: 5 additions & 9 deletions daemon/algod/api/server/v2/dryrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,10 @@ func doDryrunRequest(dr *DryrunRequest, response *generated.DryrunResponse) {
return
}
proto := config.Consensus[protocol.ConsensusVersion(dr.ProtocolVersion)]
txgroup := transactions.WrapSignedTxnsWithAD(dr.Txns)
specials := transactions.SpecialAddresses{}
ep := logic.NewEvalParams(txgroup, &proto, &specials)

origEnableAppCostPooling := proto.EnableAppCostPooling
// Enable EnableAppCostPooling so that dryrun
// 1) can determine cost 2) reports actual cost for large programs that fail
Expand All @@ -381,18 +385,10 @@ func doDryrunRequest(dr *DryrunRequest, response *generated.DryrunResponse) {
allowedBudget += uint64(proto.MaxAppProgramCost)
}
}
ep.PooledApplicationBudget = &pooledAppBudget

response.Txns = make([]generated.DryrunTxnResult, len(dr.Txns))
txgroup := transactions.WrapSignedTxnsWithAD(dr.Txns)
pse := logic.MakePastSideEffects(len(dr.Txns))
for ti, stxn := range dr.Txns {
ep := &logic.EvalParams{
Proto: &proto,
TxnGroup: txgroup,
PastSideEffects: pse,
PooledApplicationBudget: &pooledAppBudget,
Specials: &transactions.SpecialAddresses{},
}
var result generated.DryrunTxnResult
if len(stxn.Lsig.Logic) > 0 {
var debug dryrunDebugReceiver
Expand Down
24 changes: 8 additions & 16 deletions data/transactions/logic/blackbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,14 @@ func TestNewAppEvalParams(t *testing.T) {
for i, param := range params {
for j, testCase := range cases {
t.Run(fmt.Sprintf("i=%d,j=%d", i, j), func(t *testing.T) {
ep := logic.NewAppEvalParams(testCase.group, &param, nil, 0)

// Ensure non app calls have a nil evaluator, and that non-nil
// evaluators point to the right transactions and values
if testCase.numAppCalls > 0 {
require.NotNil(t, ep)
require.NotNil(t, ep.PastSideEffects)
require.Equal(t, ep.TxnGroup, testCase.group)
require.Equal(t, *ep.Proto, param)
if reflect.DeepEqual(param, config.Consensus[protocol.ConsensusV29]) {
require.Nil(t, ep.PooledApplicationBudget)
} else if reflect.DeepEqual(param, config.Consensus[protocol.ConsensusFuture]) {
require.Equal(t, *ep.PooledApplicationBudget, uint64(param.MaxAppProgramCost*testCase.numAppCalls))
}
} else {
require.Nil(t, ep)
ep := logic.NewEvalParams(testCase.group, &param, nil)
require.NotNil(t, ep)
require.Equal(t, ep.TxnGroup, testCase.group)
require.Equal(t, *ep.Proto, param)
if reflect.DeepEqual(param, config.Consensus[protocol.ConsensusV29]) {
require.Nil(t, ep.PooledApplicationBudget)
} else if reflect.DeepEqual(param, config.Consensus[protocol.ConsensusFuture]) {
require.Equal(t, *ep.PooledApplicationBudget, uint64(param.MaxAppProgramCost*testCase.numAppCalls))
}
})
}
Expand Down
4 changes: 4 additions & 0 deletions data/transactions/logic/debugger.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ func makeDebugState(cx *EvalContext) DebugState {

globals := make([]basics.TealValue, len(globalFieldSpecs))
for _, fs := range globalFieldSpecs {
// Don't try to grab app only fields when evaluating a signature
if (cx.runModeFlags&runModeSignature) != 0 && fs.mode == runModeApplication {
continue
}
sv, err := cx.globalFieldToValue(fs)
if err != nil {
sv = stackValue{Bytes: []byte(err.Error())}
Expand Down
Loading