mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +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 | ||
hash-migrations.sh | ||
README.md |
Ledger on SQL
This is an implementation of a ledger using kvutils on top of an SQL database. Currently, it can be run on top of H2, PostgreSQL, or SQLite.
The code under src/main implements the logic, using kvutils. This code is production-ready and used by Sandbox.
The code under src/app is a trivial application front-end to the ledger that spins it up, along with a Ledger API Server. This is not intended to be used in production, and is currently only used in testing.