daml/ledger/ledger-on-memory
nicu-da 303ba90595
participant-state: Re-enable integration test for command deduplication [KVL-1089] (#10751)
* Re-write command deduplication integration test for participant state to be valid for the deduplication changes.

The test now accounts for completions being generated for duplicate commands.

CHANGELOG_BEGIN

CHANGELOG_END

* Update check for successfull transaction

* Emit command rejected completions for duplicate commands rejections when using pre-execution

CHANGELOG_BEGIN
participant-state: Emit completions (CommandRejected) for duplicate commands when using pre-execution
CHANGELOG_END

* Update test for emitted duplicate command update

* Added test for new case.

* Revert redundant test case.

This reverts commit 8ef4364f

* Test corner case of dropping not deduplicated transaction rejection.

* Code tidying.

* Reformatted.

Co-authored-by: Miklos Erdelyi <miklos.erdelyi@digitalasset.com>
2021-09-03 17:48:54 +00:00
..
src Command dedup: migrate kvutils to use v2 services [KVL-1049] (#10679) 2021-09-02 04:44:55 -07:00
BUILD.bazel participant-state: Re-enable integration test for command deduplication [KVL-1089] (#10751) 2021-09-03 17:48:54 +00:00
README.md Delete the Docker image targets. (#7932) 2020-11-11 07:40:06 +00:00

Overview

This document is to help internal engineers work with ledger-on-memory.

ledger-on-memory is a key/value-based ledger that uses a simple in-memory map as an underlying storage. It uses either H2 or PostgreSQL as its index database.

Ledger On Memory

To build a fat JAR with the server built from HEAD run

bazel build //ledger/ledger-on-memory:app_deploy.jar

The application can be run from command line with the following command:

java -Xmx4G -XX:+UseG1GC -jar bazel-bin/ledger/ledger-on-memory/app_deploy.jar --participant participant-id=foo,port=6861

As run from the main project root directory (adjust the location of the JAR according to your working directory).

Alternatively, the application can be run using the Bazel command:

bazel run //ledger/ledger-on-memory:app -- --participant participant-id=foo,port=6861

Creating ledger exports

Ledger On Memory can be used to generate ledger exports through an environment variable:

export KVUTILS_LEDGER_EXPORT=/path/to/export/file

Then launch the ledger using the Bazel or Java command as described above.