Skip to content

Commit

Permalink
Separate ledger export related message from other kvutils messages [K…
Browse files Browse the repository at this point in the history
…VL-980] (#10343)

CHANGELOG_BEGIN
* [Integration Kit] Made `daml_kvutils.proto`'s location follow its proto package and moved `LedgerExportEntry` into a separate proto file. You may have to update your proto import statements in case you are directly importing proto files from the kvutils library.
CHANGELOG_END
  • Loading branch information
miklos-da authored Jul 21, 2021
1 parent 70e8ff4 commit bdc3e50
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 34 deletions.
2 changes: 1 addition & 1 deletion ledger/participant-state/kvutils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ da_scala_dar_resources_library(

proto_jars(
name = "daml_kvutils_proto",
srcs = ["src/main/protobuf/daml_kvutils.proto"],
srcs = glob(["src/main/protobuf/**/*.proto"]),
maven_artifact_prefix = "participant-state-kvutils",
maven_group = "com.daml",
proto_deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,37 +490,6 @@ message DamlContractKeyState {
google.protobuf.Timestamp active_at = 2;
}

// A v3 export of a KV ledger. Used by the integrity checker to test that a new version of
// kvutils can process older ledgers.
message LedgerExportEntry {
// Information about the submission.
message SubmissionInfo {
// The submitting participant ID.
string participant_id = 1;

// The correlation ID of the batch.
string correlation_id = 2;

// The submission to the ledger, wrapped in an envelope.
bytes submission_envelope = 3;

// the record time of the submission.
google.protobuf.Timestamp record_time = 4;
}

// A single entry, either to the log or to the state.
// Both key and value are serialized first.
message WriteEntry {
bytes key = 1;

bytes value = 2;
}

SubmissionInfo submission_info = 1;

repeated WriteEntry write_set = 2;
}

// Errors

// The transaction relied on contracts or keys being active that were no longer active.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";
package com.daml.ledger.participant.state.kvutils.export;
option java_package = "com.daml.ledger.participant.state.kvutils.export";
option csharp_namespace = "Com.Daml.Ledger.Participant.State.KVUtils.export";

import "google/protobuf/timestamp.proto";
import "com/daml/ledger/participant/state/kvutils/daml_kvutils.proto";

// A v3 export of a KV ledger. Used by the integrity checker to test that a new version of
// kvutils can process older ledgers.
message LedgerExportEntry {
// Information about the submission.
message SubmissionInfo {
// The submitting participant ID.
string participant_id = 1;

// The correlation ID of the batch.
string correlation_id = 2;

// The submission to the ledger, wrapped in an envelope.
bytes submission_envelope = 3;

// the record time of the submission.
google.protobuf.Timestamp record_time = 4;
}

// A single entry, either to the log or to the state.
// Both key and value are serialized first.
message WriteEntry {
bytes key = 1;
bytes value = 2;
}

SubmissionInfo submission_info = 1;
repeated WriteEntry write_set = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.io.{BufferedOutputStream, Closeable, OutputStream}
import java.nio.file.{Files, Path}

import com.daml.ledger.participant.state.kvutils.Conversions
import com.daml.ledger.participant.state.kvutils.DamlKvutils.LedgerExportEntry
import com.daml.ledger.participant.state.kvutils.export.LedgerExport.LedgerExportEntry

import scala.jdk.CollectionConverters._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package com.daml.ledger.participant.state.kvutils.export
import java.io.{BufferedInputStream, Closeable, InputStream}
import java.nio.file.{Files, Path}

import com.daml.ledger.participant.state.kvutils.DamlKvutils.LedgerExportEntry
import com.daml.ledger.participant.state.kvutils.export.LedgerExport.LedgerExportEntry
import com.daml.ledger.participant.state.kvutils.{Conversions, Raw}
import com.daml.lf.data.Ref

Expand Down

0 comments on commit bdc3e50

Please sign in to comment.