diff --git a/data/simulation/Makefile b/data/simulation/Makefile index 337a02132..f47dfe14c 100644 --- a/data/simulation/Makefile +++ b/data/simulation/Makefile @@ -1,4 +1,4 @@ -all: config.schema.json topology.schema.json +all: config.schema.json topology.schema.json trace.haskell.schema.json trace.rust.schema.json config.schema.json: config.d.ts npx typescript-json-schema config.d.ts Config > config.schema.json @@ -8,7 +8,44 @@ topology.schema.json: topology.d.ts npx typescript-json-schema topology.d.ts Topology > topology.schema.json npx prettier -w topology.schema.json +trace.haskell.schema.json: trace.haskell.d.ts + npx typescript-json-schema trace.haskell.d.ts HaskellTraceEvent > trace.haskell.schema.json + npx prettier -w trace.haskell.schema.json + +trace.rust.schema.json: trace.rust.d.ts + npx typescript-json-schema trace.rust.d.ts RustTraceEvent > trace.rust.schema.json + npx prettier -w trace.rust.schema.json + .PHONY: validate validate: - npx pajv -m schema.schema.json -s config.schema.json -d config.default.yaml - npx pajv -m schema.schema.json -s topology.schema.json -d topology-dense-52.yaml + @echo "Validating config..." + @npx pajv -m schema.schema.json -s config.schema.json -d config.default.yaml > /dev/null && echo "config.default.yaml valid" || exit 1 + @echo "Validating topology..." + @npx pajv -m schema.schema.json -s topology.schema.json -d topology-dense-52.yaml > /dev/null && echo "topology-dense-52.yaml valid" || exit 1 + @echo "Validating Haskell trace events..." + @line_num=0; \ + while IFS= read -r line; do \ + line_num=$$((line_num + 1)); \ + echo "$$line" > temp.json; \ + if ! npx ajv-cli validate -s trace.haskell.schema.json -d temp.json 2>/dev/null >/dev/null; then \ + echo "Error in example.haskell.jsonl at line $$line_num:"; \ + echo "$$line"; \ + npx ajv-cli validate -s trace.haskell.schema.json -d temp.json; \ + rm -f temp.json; \ + exit 1; \ + fi; \ + done < example.haskell.jsonl && echo "example.haskell.jsonl valid" + @echo "Validating Rust trace events..." + @line_num=0; \ + while IFS= read -r line; do \ + line_num=$$((line_num + 1)); \ + echo "$$line" > temp.json; \ + if ! npx ajv-cli validate -s trace.rust.schema.json -d temp.json 2>/dev/null >/dev/null; then \ + echo "Error in example.rust.jsonl at line $$line_num:"; \ + echo "$$line"; \ + npx ajv-cli validate -s trace.rust.schema.json -d temp.json; \ + rm -f temp.json; \ + exit 1; \ + fi; \ + done < example.rust.jsonl && echo "example.rust.jsonl valid" + @rm -f temp.json diff --git a/data/simulation/example.haskell.jsonl b/data/simulation/example.haskell.jsonl new file mode 100644 index 000000000..439e2db06 --- /dev/null +++ b/data/simulation/example.haskell.jsonl @@ -0,0 +1,22 @@ +{"time_s": 1.0, "event": {"tag": "Cpu", "node": 1, "node_name": "node1", "duration_s": 0.1, "task_label": "ValIB: 6-29"}} +{"time_s": 1.2, "event": {"tag": "Cpu", "node": 1, "node_name": "node1", "duration_s": 0.05, "task_label": "ValIH: 6253064077348247640"}} +{"time_s": 1.5, "event": {"tag": "Cpu", "node": 2, "node_name": "node2", "duration_s": 0.15, "task_label": "ValEB: 7-30"}} +{"time_s": 1.8, "event": {"tag": "Cpu", "node": 2, "node_name": "node2", "duration_s": 0.08, "task_label": "ValRH: 7253064077348247641"}} +{"time_s": 2.0, "event": {"tag": "Cpu", "node": 3, "node_name": "node3", "duration_s": 0.12, "task_label": "ValRB: 8-31"}} +{"time_s": 2.3, "event": {"tag": "Cpu", "node": 3, "node_name": "node3", "duration_s": 0.03, "task_label": "ValVote: vote123"}} +{"time_s": 3.0, "event": {"tag": "generated", "kind": "IB", "id": "block1", "node": 1, "node_name": "node1", "size_bytes": 1000, "slot": 1, "payload_bytes": 800, "rb_ref": "rb123"}} +{"time_s": 3.1, "event": {"tag": "Sent", "sender": 1, "receipient": 2, "msg_size_bytes": 1000, "sending_s": 0.01, "kind": "IB", "ids": ["block1"]}} +{"time_s": 3.2, "event": {"tag": "received", "kind": "IB", "id": "block1", "node": 2, "node_name": "node2"}} +{"time_s": 3.3, "event": {"tag": "enteredstate", "kind": "IB", "id": "block1", "node": 2, "node_name": "node2"}} +{"time_s": 4.0, "event": {"tag": "generated", "kind": "EB", "id": "eb1", "node": 2, "node_name": "node2", "size_bytes": 500, "input_blocks": ["block1"]}} +{"time_s": 4.1, "event": {"tag": "Sent", "sender": 2, "receipient": 3, "msg_size_bytes": 500, "sending_s": 0.01, "kind": "EB", "ids": ["eb1"]}} +{"time_s": 4.2, "event": {"tag": "received", "kind": "EB", "id": "eb1", "node": 3, "node_name": "node3"}} +{"time_s": 4.3, "event": {"tag": "enteredstate", "kind": "EB", "id": "eb1", "node": 3, "node_name": "node3"}} +{"time_s": 5.0, "event": {"tag": "generated", "kind": "RB", "id": "rb1", "node": 3, "node_name": "node3", "size_bytes": 300}} +{"time_s": 5.1, "event": {"tag": "Sent", "sender": 3, "receipient": 1, "msg_size_bytes": 300, "sending_s": 0.01, "kind": "RB", "ids": ["rb1"]}} +{"time_s": 5.2, "event": {"tag": "received", "kind": "RB", "id": "rb1", "node": 1, "node_name": "node1"}} +{"time_s": 5.3, "event": {"tag": "enteredstate", "kind": "RB", "id": "rb1", "node": 1, "node_name": "node1"}} +{"time_s": 6.0, "event": {"tag": "generated", "kind": "VT", "id": "vote1", "node": 1, "node_name": "node1", "size_bytes": 200, "votes": 1, "endorse_blocks": ["eb1"]}} +{"time_s": 6.1, "event": {"tag": "Sent", "sender": 1, "receipient": 2, "msg_size_bytes": 200, "sending_s": 0.01, "kind": "VT", "ids": ["vote1"]}} +{"time_s": 6.2, "event": {"tag": "received", "kind": "VT", "id": "vote1", "node": 2, "node_name": "node2"}} +{"time_s": 6.3, "event": {"tag": "enteredstate", "kind": "VT", "id": "vote1", "node": 2, "node_name": "node2"}} \ No newline at end of file diff --git a/data/simulation/example.rust.jsonl b/data/simulation/example.rust.jsonl new file mode 100644 index 000000000..d2be42712 --- /dev/null +++ b/data/simulation/example.rust.jsonl @@ -0,0 +1,32 @@ +{"time": 1000, "message": {"type": "Slot", "number": 1}} +{"time": 2000, "message": {"type": "CpuTaskScheduled", "task": {"node": "node1", "index": 0}, "task_type": "PraosBlockValidated"}} +{"time": 2100, "message": {"type": "CpuTaskFinished", "task": {"node": "node1", "index": 0}, "task_type": "PraosBlockValidated"}} +{"time": 2200, "message": {"type": "CpuTaskScheduled", "task": {"node": "node1", "index": 1}, "task_type": "EndorserBlockValidated"}} +{"time": 2300, "message": {"type": "CpuTaskFinished", "task": {"node": "node1", "index": 1}, "task_type": "EndorserBlockValidated"}} +{"time": 2400, "message": {"type": "CpuTaskScheduled", "task": {"node": "node1", "index": 2}, "task_type": "VoteBundleValidated"}} +{"time": 2500, "message": {"type": "CpuTaskFinished", "task": {"node": "node1", "index": 2}, "task_type": "VoteBundleValidated"}} +{"time": 2600, "message": {"type": "CpuTaskScheduled", "task": {"node": "node1", "index": 3}, "task_type": "InputBlockValidated"}} +{"time": 2700, "message": {"type": "CpuTaskFinished", "task": {"node": "node1", "index": 3}, "task_type": "InputBlockValidated"}} +{"time": 2800, "message": {"type": "CpuTaskScheduled", "task": {"node": "node1", "index": 4}, "task_type": "TransactionValidated"}} +{"time": 2900, "message": {"type": "CpuTaskFinished", "task": {"node": "node1", "index": 4}, "task_type": "TransactionValidated"}} +{"time": 3000, "message": {"type": "CpuSubtaskStarted", "task": {"node": "node1", "index": 5}, "task_type": "VoteBundleValidated", "subtask_id": 0, "subtasks": 2}} +{"time": 3100, "message": {"type": "CpuSubtaskFinished", "task": {"node": "node1", "index": 5}, "task_type": "VoteBundleValidated", "subtask_id": 0, "subtasks": 2}} +{"time": 3200, "message": {"type": "CpuSubtaskStarted", "task": {"node": "node1", "index": 5}, "task_type": "VoteBundleValidated", "subtask_id": 1, "subtasks": 2}} +{"time": 3300, "message": {"type": "CpuSubtaskFinished", "task": {"node": "node1", "index": 5}, "task_type": "VoteBundleValidated", "subtask_id": 1, "subtasks": 2}} +{"time": 4000, "message": {"type": "InputBlockGenerated", "slot": 1, "producer": "node1", "index": 0, "header_bytes": 100, "transactions": ["tx1", "tx2"]}} +{"time": 4100, "message": {"type": "InputBlockSent", "slot": 1, "producer": "node1", "sender": "node1", "recipient": "node2", "index": 0, "header_bytes": 100, "transactions": ["tx1", "tx2"]}} +{"time": 4200, "message": {"type": "InputBlockReceived", "slot": 1, "producer": "node1", "sender": "node1", "recipient": "node2", "index": 0, "header_bytes": 100, "transactions": ["tx1", "tx2"]}} +{"time": 4300, "message": {"type": "InputBlockLotteryWon", "slot": 1, "producer": "node1", "index": 0}} +{"time": 5000, "message": {"type": "EndorserBlockGenerated", "slot": 1, "producer": "node2"}} +{"time": 5100, "message": {"type": "EndorserBlockSent", "slot": 1, "producer": "node2", "sender": "node2", "recipient": "node3"}} +{"time": 5200, "message": {"type": "EndorserBlockReceived", "slot": 1, "producer": "node2", "sender": "node2", "recipient": "node3"}} +{"time": 5300, "message": {"type": "EndorserBlockLotteryWon", "slot": 1, "producer": "node2"}} +{"time": 6000, "message": {"type": "PraosBlockGenerated", "slot": 1, "producer": "node3", "header_bytes": 200, "transactions": ["tx1", "tx2"], "vrf": 584785879898000}} +{"time": 6100, "message": {"type": "PraosBlockSent", "slot": 1, "producer": "node3", "sender": "node3", "recipient": "node1", "header_bytes": 200, "transactions": ["tx1", "tx2"], "vrf": 584785879898836}} +{"time": 6200, "message": {"type": "PraosBlockReceived", "slot": 1, "producer": "node3", "sender": "node3", "recipient": "node1", "header_bytes": 200, "transactions": ["tx1", "tx2"], "vrf": 584785870008836}} +{"time": 6300, "message": {"type": "PraosBlockLotteryWon", "slot": 1, "producer": "node3", "vrf": 384785879898000}} +{"time": 7000, "message": {"type": "TransactionSent", "id": "tx1", "sender": "node1", "recipient": "node2", "publisher": "node1", "bytes": 50}} +{"time": 8000, "message": {"type": "VotesGenerated", "id": "vote1", "slot": 1, "producer": "node1", "votes": {"node1": 1}}} +{"time": 8100, "message": {"type": "VotesSent", "id": "vote1", "slot": 1, "producer": "node1", "sender": "node1", "recipient": "node2", "votes": {"node1": 1}}} +{"time": 8200, "message": {"type": "VotesReceived", "id": "vote1", "slot": 1, "producer": "node1", "sender": "node1", "recipient": "node2", "votes": {"node1": 1}}} +{"time": 8300, "message": {"type": "VoteLotteryWon", "id": "vote1", "slot": 1, "producer": "node1"}} \ No newline at end of file diff --git a/data/simulation/trace.haskell.d.ts b/data/simulation/trace.haskell.d.ts new file mode 100644 index 000000000..a64b12d22 --- /dev/null +++ b/data/simulation/trace.haskell.d.ts @@ -0,0 +1,74 @@ +/** Haskell simulation trace format */ +export interface HaskellTraceEvent { + time_s: number; + event: HaskellEvent; +} + +type BlockKind = "IB" | "EB" | "RB" | "VT"; +type BlockAction = "Generated" | "EnteredState"; + +type HaskellEvent = + | HaskellCpuEvent + | HaskellBlockEvent // Unified block event type + | HaskellNetworkEvent; // Combine Sent/Received into network events + +interface HaskellCpuEvent { + type: "Cpu"; + node: string; + cpu_time_s: number; + // CPU task types: Block validation (ValIB, ValEB, ValRB), Header validation (ValIH, ValRH), Vote validation (ValVote). Format: ": " + task_label: string; // e.g., "ValIB: 6-29" or "ValRH: 6253064077348247640" +} + +// Base block event interface with just identification info +interface BaseBlockEvent { + type: `${BlockKind}${BlockAction}`; + node: string; + id: string; + slot: number; +} + +// Additional fields for Generated events +interface GeneratedBlockEvent extends BaseBlockEvent { + size_bytes: number; +} + +interface GeneratedInputBlock extends GeneratedBlockEvent { + payload_bytes: number; + rb_ref: string; +} + +interface GeneratedEndorserBlock extends GeneratedBlockEvent { + input_blocks: string[]; +} + +interface GeneratedRankingBlock extends GeneratedBlockEvent { + endorse_blocks: string[]; + payload_bytes: number; +} + +interface GeneratedVote extends GeneratedBlockEvent { + votes: number; + endorse_blocks: string[]; +} + +// EnteredState events only need the base identification info +type EnteredStateBlock = BaseBlockEvent; + +type HaskellBlockEvent = + | GeneratedInputBlock + | GeneratedEndorserBlock + | GeneratedRankingBlock + | GeneratedVote + | EnteredStateBlock; + +interface HaskellNetworkEvent { + type: "NetworkMessage"; + action: "Sent" | "Received"; // Added to distinguish direction + sender: string; + recipient: string; + block_kind: BlockKind; + msg_size_bytes: number; + sending_s: number; + ids: string[]; +} diff --git a/data/simulation/trace.haskell.schema.json b/data/simulation/trace.haskell.schema.json new file mode 100644 index 000000000..650a0af84 --- /dev/null +++ b/data/simulation/trace.haskell.schema.json @@ -0,0 +1,264 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "HaskellCpuEvent": { + "properties": { + "duration_s": { + "type": "number" + }, + "node": { + "type": "number" + }, + "node_name": { + "type": "string" + }, + "tag": { + "const": "Cpu", + "type": "string" + }, + "task_label": { + "type": "string" + } + }, + "type": "object" + }, + "HaskellEvent": { + "anyOf": [ + { + "$ref": "#/definitions/HaskellCpuEvent" + }, + { + "$ref": "#/definitions/HaskellGeneratedIBEvent" + }, + { + "$ref": "#/definitions/HaskellGeneratedEBEvent" + }, + { + "$ref": "#/definitions/HaskellGeneratedRBEvent" + }, + { + "$ref": "#/definitions/HaskellGeneratedVTEvent" + }, + { + "$ref": "#/definitions/HaskellSentEvent" + }, + { + "$ref": "#/definitions/HaskellReceivedEvent" + }, + { + "$ref": "#/definitions/HaskellStateEvent" + } + ] + }, + "HaskellGeneratedEBEvent": { + "properties": { + "id": { + "type": "string" + }, + "input_blocks": { + "items": { + "type": "string" + }, + "type": "array" + }, + "kind": { + "const": "EB", + "type": "string" + }, + "node": { + "type": "number" + }, + "node_name": { + "type": "string" + }, + "size_bytes": { + "type": "number" + }, + "tag": { + "const": "generated", + "type": "string" + } + }, + "type": "object" + }, + "HaskellGeneratedIBEvent": { + "properties": { + "id": { + "type": "string" + }, + "kind": { + "const": "IB", + "type": "string" + }, + "node": { + "type": "number" + }, + "node_name": { + "type": "string" + }, + "payload_bytes": { + "type": "number" + }, + "rb_ref": { + "type": "string" + }, + "size_bytes": { + "type": "number" + }, + "slot": { + "type": "number" + }, + "tag": { + "const": "generated", + "type": "string" + } + }, + "type": "object" + }, + "HaskellGeneratedRBEvent": { + "properties": { + "id": { + "type": "string" + }, + "kind": { + "const": "RB", + "type": "string" + }, + "node": { + "type": "number" + }, + "node_name": { + "type": "string" + }, + "size_bytes": { + "type": "number" + }, + "tag": { + "const": "generated", + "type": "string" + } + }, + "type": "object" + }, + "HaskellGeneratedVTEvent": { + "properties": { + "endorse_blocks": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "kind": { + "const": "VT", + "type": "string" + }, + "node": { + "type": "number" + }, + "node_name": { + "type": "string" + }, + "size_bytes": { + "type": "number" + }, + "tag": { + "const": "generated", + "type": "string" + }, + "votes": { + "type": "number" + } + }, + "type": "object" + }, + "HaskellReceivedEvent": { + "properties": { + "id": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/MessageKind" + }, + "node": { + "type": "number" + }, + "node_name": { + "type": "string" + }, + "tag": { + "const": "received", + "type": "string" + } + }, + "type": "object" + }, + "HaskellSentEvent": { + "properties": { + "ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "kind": { + "$ref": "#/definitions/MessageKind" + }, + "msg_size_bytes": { + "type": "number" + }, + "receipient": { + "type": "number" + }, + "sender": { + "type": "number" + }, + "sending_s": { + "type": "number" + }, + "tag": { + "const": "Sent", + "type": "string" + } + }, + "type": "object" + }, + "HaskellStateEvent": { + "properties": { + "id": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/MessageKind" + }, + "node": { + "type": "number" + }, + "node_name": { + "type": "string" + }, + "tag": { + "const": "enteredstate", + "type": "string" + } + }, + "type": "object" + }, + "MessageKind": { + "enum": ["EB", "IB", "RB", "VT"], + "type": "string" + } + }, + "description": "Haskell simulation trace format", + "properties": { + "event": { + "$ref": "#/definitions/HaskellEvent" + }, + "time_s": { + "type": "number" + } + }, + "type": "object" +} diff --git a/data/simulation/trace.rust.d.ts b/data/simulation/trace.rust.d.ts new file mode 100644 index 000000000..5814480f4 --- /dev/null +++ b/data/simulation/trace.rust.d.ts @@ -0,0 +1,113 @@ +/** Rust simulation trace format */ + +// Base types +interface RustBaseEvent { + time_s: number; + message: { + type: string; + [key: string]: any; + }; +} + +interface RustTaskInfo { + node: string; + index: number; +} + +// CPU Events +type BlockOrTaskType = + | "RBBlock" + | "EBBlock" + | "VTBundle" + | "IBBlock" + | "Transaction"; +type Action = "Validated" | "Generated"; +type RustCpuTaskType = `${BlockOrTaskType}${Action}`; + +type CpuTaskPrefix = "CpuTask" | "CpuSubtask"; +type CpuTaskAction = "Scheduled" | "Started" | "Finished"; +type RustCpuMessageType = `${CpuTaskPrefix}${CpuTaskAction}`; + +interface RustCpuEvent extends Omit { + message: { + type: RustCpuMessageType; + task: RustTaskInfo; + task_type?: RustCpuTaskType; + subtasks?: number; + subtask_id?: number; + duration_s?: number; + cpu_time_s?: number; + extra?: string; + }; +} + +// Block Events +interface RustBaseBlockEvent { + id?: string; + slot: number; + producer: string; + sender?: string; + recipient?: string; +} + +type BlockType = "IB" | "EB" | "RB"; +type BlockAction = "Sent" | "Received" | "LotteryWon" | "Generated"; +type RustBlockMessageType = `${BlockType}${BlockAction}`; + +interface RustBlockEvent extends Omit { + message: RustBaseBlockEvent & { + type: RustBlockMessageType; + index?: number; + header_bytes?: number; + transactions?: string[]; + vrf?: number; + endorsement?: any; + }; +} + +// Transaction Events +type TransactionAction = "Sent" | "Received" | "Generated"; +type RustTransactionMessageType = `Transaction${TransactionAction}`; + +interface RustTransactionEvent extends Omit { + message: { + type: RustTransactionMessageType; + id: string; + sender?: string; + recipient?: string; + publisher?: string; + bytes?: number; + }; +} + +// Vote Events +type VoteAction = "Received" | "Sent" | "Generated" | "LotteryWon"; +type RustVoteMessageType = `Votes${VoteAction}`; + +interface RustVoteEvent extends Omit { + message: { + type: RustVoteMessageType; + id: string; + slot: number; + producer: string; + sender?: string; + recipient?: string; + votes?: Record; + }; +} + +// Slot Event +interface RustSlotEvent extends Omit { + message: { + type: "Slot"; + number: number; + }; +} + +// Combined type +export type RustTraceEvent = + | RustCpuEvent + | RustBlockEvent + | RustTransactionEvent + | RustVoteEvent + | RustSlotEvent; diff --git a/data/simulation/trace.rust.schema.json b/data/simulation/trace.rust.schema.json new file mode 100644 index 000000000..f346bf364 --- /dev/null +++ b/data/simulation/trace.rust.schema.json @@ -0,0 +1,271 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "anyOf": [ + { + "$ref": "#/definitions/RustCpuEvent" + }, + { + "$ref": "#/definitions/RustBlockEvent" + }, + { + "$ref": "#/definitions/RustTransactionEvent" + }, + { + "$ref": "#/definitions/RustVoteEvent" + }, + { + "$ref": "#/definitions/RustSlotEvent" + } + ], + "definitions": { + "Record": { + "type": "object" + }, + "RustBaseBlockEvent": { + "properties": { + "id": { + "type": "string" + }, + "producer": { + "type": "string" + }, + "recipient": { + "type": "string" + }, + "sender": { + "type": "string" + }, + "slot": { + "type": "number" + } + }, + "type": "object" + }, + "RustBlockEvent": { + "properties": { + "message": { + "allOf": [ + { + "$ref": "#/definitions/RustBaseBlockEvent" + }, + { + "properties": { + "endorsement": {}, + "header_bytes": { + "type": "number" + }, + "index": { + "type": "number" + }, + "transactions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "$ref": "#/definitions/RustBlockMessageType" + }, + "vrf": { + "type": "number" + } + }, + "type": "object" + } + ] + }, + "time": { + "type": "number" + } + }, + "type": "object" + }, + "RustBlockMessageType": { + "enum": [ + "EndorserBlockGenerated", + "EndorserBlockLotteryWon", + "EndorserBlockReceived", + "EndorserBlockSent", + "InputBlockGenerated", + "InputBlockLotteryWon", + "InputBlockReceived", + "InputBlockSent", + "PraosBlockGenerated", + "PraosBlockLotteryWon", + "PraosBlockReceived", + "PraosBlockSent" + ], + "type": "string" + }, + "RustCpuEvent": { + "properties": { + "message": { + "properties": { + "extra": { + "type": "string" + }, + "subtask_id": { + "type": "number" + }, + "subtasks": { + "type": "number" + }, + "task": { + "$ref": "#/definitions/RustTaskInfo" + }, + "task_type": { + "$ref": "#/definitions/RustCpuTaskType" + }, + "type": { + "$ref": "#/definitions/RustCpuMessageType" + } + }, + "type": "object" + }, + "time": { + "type": "number" + } + }, + "type": "object" + }, + "RustCpuMessageType": { + "enum": [ + "CpuSubtaskFinished", + "CpuSubtaskScheduled", + "CpuSubtaskStarted", + "CpuTaskFinished", + "CpuTaskScheduled", + "CpuTaskStarted" + ], + "type": "string" + }, + "RustCpuTaskType": { + "enum": [ + "EndorserBlockGenerated", + "EndorserBlockValidated", + "InputBlockGenerated", + "InputBlockValidated", + "PraosBlockGenerated", + "PraosBlockValidated", + "TransactionGenerated", + "TransactionValidated", + "VoteBundleGenerated", + "VoteBundleValidated" + ], + "type": "string" + }, + "RustSlotEvent": { + "properties": { + "message": { + "properties": { + "number": { + "type": "number" + }, + "type": { + "const": "Slot", + "type": "string" + } + }, + "type": "object" + }, + "time": { + "type": "number" + } + }, + "type": "object" + }, + "RustTaskInfo": { + "properties": { + "index": { + "type": "number" + }, + "node": { + "type": "string" + } + }, + "type": "object" + }, + "RustTransactionEvent": { + "properties": { + "message": { + "properties": { + "bytes": { + "type": "number" + }, + "id": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "recipient": { + "type": "string" + }, + "sender": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/RustTransactionMessageType" + } + }, + "type": "object" + }, + "time": { + "type": "number" + } + }, + "type": "object" + }, + "RustTransactionMessageType": { + "enum": [ + "TransactionGenerated", + "TransactionReceived", + "TransactionSent" + ], + "type": "string" + }, + "RustVoteEvent": { + "properties": { + "message": { + "properties": { + "id": { + "type": "string" + }, + "producer": { + "type": "string" + }, + "recipient": { + "type": "string" + }, + "sender": { + "type": "string" + }, + "slot": { + "type": "number" + }, + "type": { + "$ref": "#/definitions/RustVoteMessageType" + }, + "votes": { + "$ref": "#/definitions/Record" + } + }, + "type": "object" + }, + "time": { + "type": "number" + } + }, + "type": "object" + }, + "RustVoteMessageType": { + "enum": [ + "VotesGenerated", + "VotesLotteryWon", + "VotesReceived", + "VotesSent" + ], + "type": "string" + } + } +}