Stage 1.15 protobuf

This commit is contained in:
Dylan Thinnes 2022-08-16 13:04:19 +01:00
parent 196fa6a3cf
commit 904da5679b
2 changed files with 1862 additions and 0 deletions

View File

@ -0,0 +1,54 @@
// Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";
package daml_lf_dev;
option java_package = "com.daml.daml_lf_dev";
option csharp_namespace = "Com.Daml.Daml_Lf_Dev.DamlLf";
import "com/daml/daml_lf_dev/daml_lf_1.proto";
message ArchivePayload {
// this is number 3 for historical reasons -- we had
// Daml-LF v0 and v1 before we had minor versions.
string minor = 3;
reserved 9999; // for the removed "dev" major version
reserved 1; // was daml_lf_0
oneof Sum {
daml_lf_1.Package daml_lf_1 = 2;
// lf_2 = 4, lf_3 = 5, etc
}
}
enum HashFunction {
SHA256 = 0;
}
message Archive {
HashFunction hash_function = 1;
// deprecated field (bytes hash = 2), replaced by
// field 4.
// Must be an encoded ArchivePayload. We store it as `bytes` to
// simplify hashing and in future signing.
bytes payload = 3;
// The hash is simply the ascii7 lowercase hex-encoded hash of the bytes
// according to the hash_function. We store it here for convenience, code
// reading the Archive should verify that the hash is valid.
//
// Note that the hash is computed directly on the blob and not
// on the decoded structure. This means that servers implementing
// a Daml ledger need to store the blob as-is somewhere to be able
// to always offer proof that they have a Daml package matching
// the requested hash. We decided to go for this route rather than
// relying on a canonical encoding of the AST since such a scheme
// would be extremely hard (for example protobuf encoding is not
// canonical) to maintain and does not buy us much.
string hash = 4;
}

File diff suppressed because it is too large Load Diff