Skip to content

Commit

Permalink
changed state proof message to no longer be embedded (#4395)
Browse files Browse the repository at this point in the history
  • Loading branch information
almog-t authored Aug 12, 2022
1 parent 5a852ba commit 3e048ee
Show file tree
Hide file tree
Showing 7 changed files with 227 additions and 215 deletions.
75 changes: 39 additions & 36 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2683,42 +2683,7 @@
],
"properties": {
"Message": {
"description": "Represents the message that the state proofs are attesting to.",
"type": "object",
"required": [
"BlockHeadersCommitment",
"VotersCommitment",
"LnProvenWeight",
"FirstAttestedRound",
"LastAttestedRound"
],
"properties": {
"BlockHeadersCommitment": {
"description": "The vector commitment root on all light block headers within a state proof interval.",
"type": "string",
"format": "byte"
},
"VotersCommitment": {
"description": "The vector commitment root of the top N accounts to sign the next StateProof.",
"type": "string",
"format": "byte"
},
"LnProvenWeight": {
"description": "An integer value representing the natural log of the proven weight with 16 bits of precision. This value would be used to verify the next state proof.",
"type": "integer",
"x-algorand-format": "uint64"
},
"FirstAttestedRound": {
"description": "The first round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
},
"LastAttestedRound": {
"description": "The last round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
}
}
"$ref": "#/definitions/StateProofMessage"
},
"StateProof": {
"description": "The encoded StateProof for the message.",
Expand Down Expand Up @@ -2750,6 +2715,44 @@
"format": "byte"
}
}
},
"StateProofMessage": {
"description": "Represents the message that the state proofs are attesting to.",
"type": "object",
"required": [
"BlockHeadersCommitment",
"VotersCommitment",
"LnProvenWeight",
"FirstAttestedRound",
"LastAttestedRound"
],
"properties": {
"BlockHeadersCommitment": {
"description": "The vector commitment root on all light block headers within a state proof interval.",
"type": "string",
"format": "byte"
},
"VotersCommitment": {
"description": "The vector commitment root of the top N accounts to sign the next StateProof.",
"type": "string",
"format": "byte"
},
"LnProvenWeight": {
"description": "An integer value representing the natural log of the proven weight with 16 bits of precision. This value would be used to verify the next state proof.",
"type": "integer",
"x-algorand-format": "uint64"
},
"FirstAttestedRound": {
"description": "The first round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
},
"LastAttestedRound": {
"description": "The last round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
}
}
}
},
"parameters": {
Expand Down
79 changes: 41 additions & 38 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1623,44 +1623,7 @@
"description": "Represents a state proof and its corresponding message",
"properties": {
"Message": {
"description": "Represents the message that the state proofs are attesting to.",
"properties": {
"BlockHeadersCommitment": {
"description": "The vector commitment root on all light block headers within a state proof interval.",
"format": "byte",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"type": "string"
},
"FirstAttestedRound": {
"description": "The first round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
},
"LastAttestedRound": {
"description": "The last round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
},
"LnProvenWeight": {
"description": "An integer value representing the natural log of the proven weight with 16 bits of precision. This value would be used to verify the next state proof.",
"type": "integer",
"x-algorand-format": "uint64"
},
"VotersCommitment": {
"description": "The vector commitment root of the top N accounts to sign the next StateProof.",
"format": "byte",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"type": "string"
}
},
"required": [
"BlockHeadersCommitment",
"FirstAttestedRound",
"LastAttestedRound",
"LnProvenWeight",
"VotersCommitment"
],
"type": "object"
"$ref": "#/components/schemas/StateProofMessage"
},
"StateProof": {
"description": "The encoded StateProof for the message.",
Expand All @@ -1675,6 +1638,46 @@
],
"type": "object"
},
"StateProofMessage": {
"description": "Represents the message that the state proofs are attesting to.",
"properties": {
"BlockHeadersCommitment": {
"description": "The vector commitment root on all light block headers within a state proof interval.",
"format": "byte",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"type": "string"
},
"FirstAttestedRound": {
"description": "The first round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
},
"LastAttestedRound": {
"description": "The last round the message attests to.",
"type": "integer",
"x-algorand-format": "uint64"
},
"LnProvenWeight": {
"description": "An integer value representing the natural log of the proven weight with 16 bits of precision. This value would be used to verify the next state proof.",
"type": "integer",
"x-algorand-format": "uint64"
},
"VotersCommitment": {
"description": "The vector commitment root of the top N accounts to sign the next StateProof.",
"format": "byte",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"type": "string"
}
},
"required": [
"BlockHeadersCommitment",
"FirstAttestedRound",
"LastAttestedRound",
"LnProvenWeight",
"VotersCommitment"
],
"type": "object"
},
"TealKeyValue": {
"description": "Represents a key-value pair in an application store.",
"properties": {
Expand Down
Empty file.
60 changes: 30 additions & 30 deletions daemon/algod/api/server/v2/generated/private/routes.go

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

31 changes: 17 additions & 14 deletions daemon/algod/api/server/v2/generated/private/types.go

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

Loading

0 comments on commit 3e048ee

Please sign in to comment.