/** * The main API is `DeployService`. */ syntax = "proto3"; package casper; import "CasperMessage.proto"; // If you are building for other languages "scalapb.proto" // can be manually obtained here: // https://raw.githubusercontent.com/scalapb/ScalaPB/master/protobuf/scalapb/scalapb.proto // make a scalapb directory in this file's location and place it inside import "scalapb/scalapb.proto"; // import "RhoTypes.proto"; option (scalapb.options) = { package_name: "coop.rchain.casper.protocol" flat_package: true single_file: true preamble: "sealed trait ReportEventProto" preserve_unknown_fields: false }; message FindDeployQuery { bytes deployId = 1; } message BlockQuery { string hash = 1; } message BlocksQuery { int32 depth = 1; } message BlocksQueryByHeight{ int64 startBlockNumber = 1; int64 endBlockNumber = 2; } message DataAtNameQuery { int32 depth = 1; Par name = 2; } message ContinuationAtNameQuery { int32 depth = 1; repeated Par names = 2; } message VisualizeDagQuery { int32 depth = 1; bool showJustificationLines = 2; int32 startBlockNumber = 3; } message MachineVerifyQuery { } message PrivateNamePreviewQuery { bytes user = 1; // public key a la DeployData int64 timestamp = 2; // millisecond timestamp int32 nameQty = 3; // how many names to preview? (max: 1024) } message LastFinalizedBlockQuery { } message IsFinalizedQuery { string hash = 1; } message BondStatusQuery { bytes publicKey = 1; } message ExploratoryDeployQuery{ string term = 1; string blockHash = 2; bool usePreStateHash = 3; } message BondInfo{ string validator = 1; int64 stake = 2; } message JustificationInfo{ string validator = 1; string latestBlockHash = 2; } message DeployInfo{ string deployer = 1; string term = 2; int64 timestamp = 3; string sig = 4; string sigAlgorithm = 5; int64 phloPrice = 7; int64 phloLimit = 8; int64 validAfterBlockNumber = 9; uint64 cost = 10; bool errored = 11; string systemDeployError = 12; } message LightBlockInfo { // BlockMessageProto message string blockHash = 1; string sender = 2; int64 seqNum = 3; string sig = 4; string sigAlgorithm = 5; string shardId = 6; bytes extraBytes = 7; // HeaderProto message int64 version = 8; int64 timestamp = 9; bytes headerExtraBytes = 10; repeated string parentsHashList = 11; // BodyProto message int64 blockNumber = 12; string preStateHash = 13; string postStateHash = 14; bytes bodyExtraBytes = 15; repeated BondInfo bonds = 16; // extra string blockSize = 17; int32 deployCount = 18; float faultTolerance = 19; repeated JustificationInfo justifications = 20; } // For node clients, see BlockMessage for actual Casper protocol Block representation message BlockInfo { LightBlockInfo blockInfo = 1; repeated DeployInfo deploys = 2; } message DataWithBlockInfo { repeated Par postBlockData = 1; LightBlockInfo block = 2; } message ContinuationsWithBlockInfo { repeated WaitingContinuationInfo postBlockContinuations = 1; LightBlockInfo block = 2; } message WaitingContinuationInfo { repeated BindPattern postBlockPatterns = 1; Par postBlockContinuation = 2; } message ReportProduceProto{ option (scalapb.message).extends = "ReportEventProto"; Par channel = 1; ListParWithRandom data = 2; } message ReportConsumeProto{ option (scalapb.message).extends = "ReportEventProto"; repeated Par channels = 1; repeated BindPattern patterns=2; // disable because can not work and it is not important actually // TaggedContinuation continuation=3; repeated PeekProto peeks=4; } message ReportCommProto{ option (scalapb.message).extends = "ReportEventProto"; ReportConsumeProto consume = 1; repeated ReportProduceProto produces = 2; } message ReportProto{ oneof report { ReportProduceProto produce = 1; ReportConsumeProto consume = 2; ReportCommProto comm = 3; } } message SingleReport{ repeated ReportProto events = 1; } message DeployInfoWithEventData{ DeployInfo deployInfo = 1; repeated SingleReport report =2; } message BlockEventInfo{ LightBlockInfo blockInfo = 1; repeated DeployInfoWithEventData deploys= 2; }