Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-algorand 3.6.0-beta Release PR #3934

Merged
merged 8 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions agreement/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ func (a ensureAction) do(ctx context.Context, s *Service) {
Round: uint64(a.Certificate.Round),
ValidatedAt: a.Payload.validatedAt,
PreValidated: true,
PropBufLen: uint64(len(s.demux.rawProposals)),
VoteBufLen: uint64(len(s.demux.rawVotes)),
})
s.Ledger.EnsureValidatedBlock(a.Payload.ve, a.Certificate)
} else {
Expand All @@ -249,6 +251,8 @@ func (a ensureAction) do(ctx context.Context, s *Service) {
Round: uint64(a.Certificate.Round),
ValidatedAt: a.Payload.validatedAt,
PreValidated: false,
PropBufLen: uint64(len(s.demux.rawProposals)),
VoteBufLen: uint64(len(s.demux.rawVotes)),
})
s.Ledger.EnsureBlock(block, a.Certificate)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/goal/bundledGenesisInject.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/goal/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const (
loggingNotEnabled = "Remote logging is current disabled"
loggingEnabled = "Remote logging is enabled. Node = %s, Guid = %s"

infoNetworkAlreadyExists = "Network Root Directory '%s' already exists"
infoNetworkAlreadyExists = "Network Root Directory '%s' already exists and is not empty"
errorCreateNetwork = "Error creating private network: %s"
infoNetworkCreated = "Network %s created under %s"
errorLoadingNetwork = "Error loading deployed network: %s"
Expand Down
5 changes: 2 additions & 3 deletions cmd/goal/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ var networkCreateCmd = &cobra.Command{
if err != nil {
panic(err)
}
// Make sure target directory doesn't already exist
exists := util.FileExists(networkRootDir)
if exists {
// Make sure target directory does not exist or is empty
if util.FileExists(networkRootDir) && !util.IsEmpty(networkRootDir) {
reportErrorf(infoNetworkAlreadyExists, networkRootDir)
}

Expand Down
5 changes: 5 additions & 0 deletions config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ type ConsensusParams struct {
// provide greater isolation for clear state programs
IsolateClearState bool

// The minimum app version that can be called in an inner transaction
MinInnerApplVersion uint64

// maximum number of applications a single account can create and store
// AppParams for at once
MaxAppsCreated int
Expand Down Expand Up @@ -1079,6 +1082,7 @@ func initConsensusProtocols() {
v31.LogicSigVersion = 6
v31.EnableInnerTransactionPooling = true
v31.IsolateClearState = true
v31.MinInnerApplVersion = 6

// stat proof key registration
v31.EnableStateProofKeyregCheck = true
Expand Down Expand Up @@ -1133,6 +1137,7 @@ func initConsensusProtocols() {
vFuture.CompactCertSecKQ = 128

vFuture.LogicSigVersion = 7
vFuture.MinInnerApplVersion = 4

Consensus[protocol.ConsensusFuture] = vFuture
}
Expand Down
73 changes: 73 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,64 @@
}
}
},
"/v2/teal/disassemble": {
"post": {
"description": "Given the base64 encoded program bytes, return the TEAL source code in plain text. This endpoint is only enabled when a node's configuration file sets EnableDeveloperAPI to true.",
"consumes": [
"application/x-binary"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"summary": "Disassemble program bytes into the TEAL source code.",
"operationId": "TealDisassemble",
"parameters": [
{
"description": "TEAL program binary to be disassembled",
"name": "source",
"in": "body",
"required": true,
"schema": {
"type": "string",
"format": "byte"
}
}
],
"responses": {
"200": {
"description": "Successful disassembly",
"$ref": "#/responses/DisassembleResponse"
},
"400": {
"description": "Bad Request - Teal Compile Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"401": {
"description": "Invalid API Token",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"404": {
"description": "Developer API not enabled"
},
"500": {
"description": "Internal Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"default": {
"description": "Unknown Error"
}
}
}
},
"/v2/catchup/{catchpoint}": {
"post": {
"tags": [
Expand Down Expand Up @@ -3040,6 +3098,21 @@
}
}
},
"DisassembleResponse": {
"description": "Teal disassembly Result",
"schema": {
"type": "object",
"required": [
"result"
],
"properties": {
"result": {
"description": "disassembled Teal code",
"type": "string"
}
}
}
},
"DryrunResponse": {
"description": "DryrunResponse contains per-txn debug information from a dryrun.",
"schema": {
Expand Down
98 changes: 98 additions & 0 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,25 @@
},
"description": "Teal compile Result"
},
"DisassembleResponse": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"description": "disassembled Teal code",
"type": "string"
}
},
"required": [
"result"
],
"type": "object"
}
}
},
"description": "Teal disassembly Result"
},
"DryrunResponse": {
"content": {
"application/json": {
Expand Down Expand Up @@ -3695,6 +3714,85 @@
"x-codegen-request-body-name": "source"
}
},
"/v2/teal/disassemble": {
"post": {
"description": "Given the base64 encoded program bytes, return the TEAL source code in plain text. This endpoint is only enabled when a node's configuration file sets EnableDeveloperAPI to true.",
"operationId": "TealDisassemble",
"requestBody": {
"content": {
"application/x-binary": {
"schema": {
"format": "byte",
"type": "string"
}
}
},
"description": "TEAL program binary to be disassembled",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"description": "disassembled Teal code",
"type": "string"
}
},
"required": [
"result"
],
"type": "object"
}
}
},
"description": "Teal disassembly Result"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad Request - Teal Compile Error"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Invalid API Token"
},
"404": {
"content": {},
"description": "Developer API not enabled"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Internal Error"
},
"default": {
"content": {},
"description": "Unknown Error"
}
},
"summary": "Disassemble program bytes into the TEAL source code.",
"x-codegen-request-body-name": "source"
}
},
"/v2/teal/dryrun": {
"post": {
"description": "Executes TEAL program(s) in context and returns debugging information about the execution. This endpoint is only enabled when a node's configuration file sets EnableDeveloperAPI to true.",
Expand Down
Loading