Skip to content

Commit

Permalink
flag description fix and e2e error line fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangsu committed May 5, 2023
1 parent 2eebb81 commit 37ad9b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions cmd/goal/clerk.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ var (
requestFilename string
requestOutFilename string

simulateAllowEmptySignatures bool
simulateAllowMoreLogging bool
simulateAllowExtraBudget bool
simulateExtraBudget uint64
simulateAllowEmptySignatures bool
simulateAllowMoreLogging bool
simulateAllowExtraOpcodeBudget bool
simulateExtraOpcodeBudget uint64
)

func init() {
Expand Down Expand Up @@ -159,8 +159,8 @@ func init() {
simulateCmd.Flags().StringVarP(&outFilename, "result-out", "o", "", "Filename for writing simulation result")
simulateCmd.Flags().BoolVar(&simulateAllowEmptySignatures, "allow-empty-signatures", false, "Allow transactions without signatures to be simulated as if they had correct signatures")
simulateCmd.Flags().BoolVar(&simulateAllowMoreLogging, "allow-more-logging", false, "Lift the limits on log opcode during simulation")
simulateCmd.Flags().BoolVar(&simulateAllowExtraBudget, "allow-extra-opcode-budget", false, "Apply max extra budget for apps during simulation")
simulateCmd.Flags().Uint64Var(&simulateExtraBudget, "extra-opcode-budget", 0, "Apply extra budget during simulation")
simulateCmd.Flags().BoolVar(&simulateAllowExtraOpcodeBudget, "allow-extra-opcode-budget", false, "Apply max extra opcode budget for apps per transaction group (default 320000) during simulation")
simulateCmd.Flags().Uint64Var(&simulateExtraOpcodeBudget, "extra-opcode-budget", 0, "Apply extra opcode budget for apps per transaction group during simulation")
}

var clerkCmd = &cobra.Command{
Expand Down Expand Up @@ -1252,7 +1252,7 @@ var simulateCmd = &cobra.Command{
reportErrorf("--allow-extra-opcode-budget and --extra-opcode-budget are mutually exclusive")
}
if allowExtraBudgetProvided {
simulateExtraBudget = simulation.MaxExtraOpcodeBudget
simulateExtraOpcodeBudget = simulation.MaxExtraOpcodeBudget
}

requestOutProvided := cmd.Flags().Changed("request-only-out")
Expand All @@ -1276,7 +1276,7 @@ var simulateCmd = &cobra.Command{
},
AllowEmptySignatures: simulateAllowEmptySignatures,
AllowMoreLogging: simulateAllowMoreLogging,
ExtraOpcodeBudget: simulateExtraBudget,
ExtraOpcodeBudget: simulateExtraOpcodeBudget,
}
err := writeFile(requestOutFilename, protocol.EncodeJSON(simulateRequest), 0600)
if err != nil {
Expand All @@ -1299,7 +1299,7 @@ var simulateCmd = &cobra.Command{
},
AllowEmptySignatures: simulateAllowEmptySignatures,
AllowMoreLogging: simulateAllowMoreLogging,
ExtraOpcodeBudget: simulateExtraBudget,
ExtraOpcodeBudget: simulateExtraOpcodeBudget,
}
simulateResponse, responseErr = client.SimulateTransactions(simulateRequest)
} else {
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/e2e_subs/e2e-app-simulate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ if [[ $(echo "$RES" | jq '."eval-overrides"."extra-opcode-budget"') -ne 320000 ]
fi

if [[ $(echo "$RES" | jq '."txn-groups"[0]."app-budget-added"') -ne 320700 ]]; then
date '+app-simulate-test FAIL the app call to generated large TEAL should have app-budget-added 900 %Y%m%d_%H%M%S'
date '+app-simulate-test FAIL the app call to generated large TEAL should have app-budget-added 320700 %Y%m%d_%H%M%S'
false
fi

Expand Down

0 comments on commit 37ad9b0

Please sign in to comment.