mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
8f94cffdd1
* kvutils: Remove `VersionedOffsetBuilder.apply`. Doesn't do anything. * ledger-on-memory: Use `VersionedOffsetBuilder`. * indexer-benchmark: Use `VersionedOffsetBuilder`. * ledger-on-sql: Use `VersionedOffsetBuilder`. * kvutils: Use `VersionedOffsetBuilder` in tests. * kvutils: Create a case class for `VersionedOffsetBuilder#split`. * kvutils: Delete unused methods from the offset builders. * kvutils: Use `Bytes#startWith` to check the offset version. * kvutils: Move offset splitting into `VersionedOffset`. * kvutils: Extract out versioned offset generators. * kvutils: Replace `OffsetBuilder` with `VersionedOffsetMutator`. This takes care of the last usages of `OffsetBuilder`, which were to modify the lowest component of the offset. CHANGELOG_BEGIN CHANGELOG_END * kvutils: Randomize the offset version in testing. To make sure we don't use a hard-coded offset version anywhere. * kvutils: `Random.between` is not available in Scala 2.12. * kvutils: Move offset mutation methods to `VersionedOffset`. * kvutils: Move the versioned offset construction into `VersionedOffset`. The `VersionedOffsetBuilder` is still useful as it remembers the version, meaning we only need to specify it once. |
||
---|---|---|
.. | ||
src | ||
BUILD.bazel | ||
README.md |
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.