Skip to content

Latest commit

 

History

History
86 lines (53 loc) · 2.63 KB

readme.adoc

File metadata and controls

86 lines (53 loc) · 2.63 KB

Tackler-NG

Tackler’s operations and results must always be correct and trustworthy. If there are any errors with journal, then it will fail fast and hard and won’t process dubious input as valid one.

Tackler-NG will strive for the same reliability level as Tackler.

At the moment as RIIR is still in progress, things are in flux a bit, but Tackler’s original test-vectors and Tackler Test Tracking Database (T3DB) are here:

Unsafe and unwrap

Unsafe code is forbidden in the code base.

All unwrap usage should be documented, either why they won’t panic or why it doesn’t matter.

rg 'unwrap\(' | egrep -v '(:ok:)|(:test:)'

Rust toolchain

Used Rust toolchain is the latest or fairly new version of Rust.

Number types: TacklerReal vs. rust_decimal

TacklerReal

Scala’s Scala BigDecimal with unlimited MathContext, with HALF_UP rounding mode.

Rust_decimal

Decimal represents a 128 bit representation of a fixed-precision decimal number. The finite set of values of type Decimal are of the form m / 10^e, where m is an integer such that -2^96 < m < 2^96, and e is an integer between 0 and 28 inclusive.

Design and Code Structure

At the moment design and code structure follows Tackler’s structure:

Currently the used parser is ANTLR and antlr4rust, but that will be replaced in the future.

The grammar is defined in TxnParser.g4 and lexer is in TxnLexer.g4.

Running Tests

Run unit tests at the root of project’s workspace:

cargo test

Simple Performance test:

cargo run --release -p tackler-core

Tackler test suite:

cargo build --release --bin tackler && tests/sh/test-runner-ng.sh

Flamegraph for tackler

Run flamegraph on tackler-cli crate:

cd tackler-cli

CARGO_PROFILE_RELEASE_DEBUG=true \
    cargo flamegraph -- \
        --config ../examples/audit.toml \
        --input.git.ref txns-1E5