All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node.models.block.proto Maven / Gradle / Ivy

The newest version!
syntax = "proto3";
import "scalapb/scalapb.proto";
import "scalapb/validate.proto";



package org.plasmalabs.node.models;

import 'consensus/models/block_header.proto';
import 'sdk/models/transaction/io_transaction.proto';
import 'sdk/models/identifier.proto';

import "validate/validate.proto";

// Captures the ordering of transaction IDs within a block
message BlockBody {
  // A list of Transaction IDs included in this block
  repeated org.plasmalabs.sdk.models.TransactionId transactionIds = 1;
  // An optional Transaction ID that represents the reward transaction for this block.
  org.plasmalabs.sdk.models.TransactionId rewardTransactionId = 2;
}

// Captures the ordering of transactions (not just IDs) within a block
message FullBlockBody {
  // A list of Transactions included in this block
  repeated org.plasmalabs.sdk.models.transaction.IoTransaction transactions = 1;
  // An optional Transaction that represents the reward transaction for this block.
  org.plasmalabs.sdk.models.transaction.IoTransaction rewardTransaction = 2;
}

// Captures the header and all transactions in a block
message Block {
  // The block's header
  org.plasmalabs.consensus.models.BlockHeader header = 1 [(validate.rules).message.required = true];
  // The block's body
  BlockBody body = 2 [(validate.rules).message.required = true];
}

// Captures the header and all transactions in a block
message FullBlock {
  // The block's header
  org.plasmalabs.consensus.models.BlockHeader header = 1 [(validate.rules).message.required = true];
  // The block's full body
  FullBlockBody fullBody = 2 [(validate.rules).message.required = true];
}

option (scalapb.options) = {
  [scalapb.validate.file] {
    validate_at_construction: true
  }
  field_transformations: [
    {
      when: {options: {[validate.rules] {message: {required: true}}}}
      set: {
        [scalapb.field] {
          required: true
        }
      }
    }
  ]
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy