syntax = "proto3"; message CacheStorage { optional string pub_http = 1; bool pub_cyfs = 2; } message BackupStorage { uint32 reserved = 1; } message ImmutableDataSource { repeated bytes chunks = 1; } message ContractDesc { enum DataSourceType { Immutable = 0; Mutable = 1; } DataSourceType data_source_type = 1; oneof data_source { ImmutableDataSource immut_data_source = 2; uint64 mut_data_source = 3; } enum StorageType { Cache = 0; Backup = 1; } StorageType storage_type = 4; oneof storage { CacheStorage cache_storage = 5; BackupStorage backup_storage = 6; } bytes miner = 7; uint64 start_at = 8; uint64 end_at = 9; bytes witness = 10; optional bytes witness_dec_id = 11; optional bytes body_hash = 12; } message DsgChunkList { repeated bytes chunks = 1; } message DsgContractBody { optional DsgChunkList extra_chunks = 1; } message ReserveState { repeated bytes chunks = 1; } message DataSourceChangedState { repeated bytes chunks = 1; optional bytes data_source_stub = 2; enum StorageType { Cache = 0; Backup = 1; } optional StorageType storage_type = 4; oneof storage { CacheStorage cache_storage = 5; BackupStorage backup_storage = 6; } optional bytes witness = 7; optional bytes prev_change = 8; optional bytes stored_hash = 9; } message ContractState { enum ContractStateType { Initial = 0; Reserve = 1; DataSourceChanged = 2; DataSourceSyncing = 3; DataSourceStored = 4; ContractExecuted = 5; ContractBroken = 6; } ContractStateType state_type = 1; oneof state { ReserveState reserve = 2; DataSourceChangedState data_source_changed = 3; } } message ContractStateDesc { bytes contract = 1; ContractState state = 2; optional bytes body_hash = 3; } message ChunkMergeStub { optional uint32 first_range = 1; repeated uint32 index_range = 2; optional uint32 last_range = 3; } message ChunkFunctionMerge { optional bytes key = 1; ChunkMergeStub chunks = 2; uint32 split = 3; } message DataSourceStubDesc { repeated ChunkFunctionMerge functions = 1; } message DsgContractStateBody { optional DsgChunkList extra_chunks = 1; }