mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
//IDL file for p2p message content schema.
|
|
include "common_schema.fbs";
|
|
namespace fbschema.p2pmsg;
|
|
|
|
table RawInputList { //Pubkey bytes with an array of key value pairs.
|
|
pubkey:[ubyte];
|
|
inputs:[BytesKeyValuePair];
|
|
}
|
|
|
|
table RawOutput { //Pubkey bytes with a output key value pair.
|
|
pubkey:[ubyte];
|
|
output:BytesKeyValuePair;
|
|
}
|
|
|
|
union Message { Proposal_Message, Npl_Message } //message content type
|
|
|
|
table Content {
|
|
message:Message;
|
|
}
|
|
|
|
table Proposal_Message { //Proposal type message schema
|
|
stage: int8;
|
|
time:uint64;
|
|
lcl:[ubyte];
|
|
users: [ByteArray];
|
|
raw_inputs: [RawInputList]; //stage 0 inputs (hash and raw value)
|
|
hash_inputs:[ByteArray]; //stage > 0 inputs (hash of stage 0 inputs)
|
|
raw_outputs: [RawOutput]; //stage 0 outputs (hash and raw value)
|
|
hash_outputs:[ByteArray]; //stage > 0 outputs (hash of stage 0 outputs)
|
|
state: State;
|
|
}
|
|
|
|
table Npl_Message { //NPL type message schema
|
|
pubkey:[ubyte];
|
|
timestamp:uint64;
|
|
data:[ubyte];
|
|
lcl:[ubyte];
|
|
}
|
|
|
|
table StateDifference { //Represent state difference by tracking created,updated and deleted state files.
|
|
created: [BytesKeyValuePair]; //list of { fn => hash }
|
|
updated: [BytesKeyValuePair];
|
|
deleted: [BytesKeyValuePair];
|
|
}
|
|
|
|
table State {
|
|
previous: [ubyte]; // hash of the previous state
|
|
current: [ubyte]; // hash of the current state
|
|
difference: StateDifference;
|
|
patch: [BytesKeyValuePair]; // fn -> bsdiff patch going from previous state to new state
|
|
}
|
|
|
|
root_type Content; //root type for message content |