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

Adjusted proof structs to be rust friendly #209

Merged
merged 1 commit into from
Aug 15, 2024
Merged
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
48 changes: 26 additions & 22 deletions Stellar-transaction.x
Original file line number Diff line number Diff line change
Expand Up @@ -833,36 +833,40 @@ struct ArchivalProofNode

typedef ArchivalProofNode ProofLevel<>;

struct NonexistenceProofBody
{
ColdArchiveBucketEntry entriesToProve<>;

// Vector of vectors, where proofLevels[level]
// contains all HashNodes that correspond with that level
ProofLevel proofLevels<>;
};

struct ExistenceProofBody
{
LedgerKey keysToProve<>;

// Bounds for each key being proved, where bound[n]
// corresponds to keysToProve[n]
ColdArchiveBucketEntry lowBoundEntries<>;
ColdArchiveBucketEntry highBoundEntries<>;

// Vector of vectors, where proofLevels[level]
// contains all HashNodes that correspond with that level
ProofLevel proofLevels<>;
};

struct ArchivalProof
{
uint32 epoch; // AST Subtree for this proof

union switch (ArchivalProofType t)
{
case EXISTENCE:
struct
{
ColdArchiveBucketEntry entriesToProve<>;

// Vector of vectors, where proofLevels[level]
// contains all HashNodes that correspond with that level
ProofLevel proofLevels<>;
} existenceProof;
NonexistenceProofBody nonexistenceProof;
case NONEXISTENCE:
struct
{
LedgerKey keysToProve<>;

// Bounds for each key being proved, where bound[n]
// corresponds to keysToProve[n]
ColdArchiveBucketEntry lowBoundEntries<>;
ColdArchiveBucketEntry highBoundEntries<>;

// Vector of vectors, where proofLevels[level]
// contains all HashNodes that correspond with that level
ProofLevel proofLevels<>;
} nonexistenceProof;
} type;
ExistenceProofBody existenceProof;
} body;
};

// Resource limits for a Soroban transaction.
Expand Down
Loading