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

Added Binary Fuse Filter XDR definitions #195

Merged
merged 1 commit into from
Jul 19, 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
33 changes: 32 additions & 1 deletion Stellar-types.x
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,35 @@ struct HmacSha256Mac
{
opaque mac[32];
};
}

struct ShortHashSeed
{
opaque seed[16];
};

enum BinaryFuseFilterType
{
BINARY_FUSE_FILTER_8_BIT = 0,
BINARY_FUSE_FILTER_16_BIT = 1,
BINARY_FUSE_FILTER_32_BIT = 2
};

struct SerializedBinaryFuseFilter
{
BinaryFuseFilterType type;

// Seed used to hash input to filter
ShortHashSeed inputHashSeed;

// Seed used for internal filter hash operations
ShortHashSeed filterSeed;
uint32 segmentLength;
uint32 segementLengthMask;
uint32 segmentCount;
uint32 segmentCountLength;
uint32 fingerprintLength; // Length in terms of element count, not bytes

// Array of uint8_t, uint16_t, or uint32_t depending on filter type
opaque fingerprints<>;
};
}
Loading