Laconic state machine
Go to file
Prathamesh Musale eb9aa00816
Some checks failed
E2E Tests / test-e2e (push) Failing after 1h21m21s
Integration Tests / test-integration (push) Successful in 2h13m47s
SDK Tests / sdk_tests_authority_auctions (push) Failing after 3h11m11s
SDK Tests / sdk_tests (push) Failing after 3h11m10s
SDK Tests / sdk_tests_nameservice_expiry (push) Failing after 3h11m11s
Unit Tests / test-unit (push) Failing after 3h14m50s
docs: guide agents/humans toward Naming API for mutable logical identity
Applications built on laconicd repeatedly pick the Record + attribute-
scan pattern for data that has mutable logical identity (game state,
user profiles, inventories). The query cost then grows linearly with
per-entity version count, and the fix reached for (cache, pagination,
compaction) hides the design mistake rather than correcting it. AI
agents hit this failure mode especially reliably: they pattern-match
the existing client's queryRecords usage as canon and never discover
the Naming API.

This commit adds four pieces of documentation that surface the right
primitive *before* a wrong one is committed to:

  * docs/PATTERNS.md — primitive decision tree with concrete
    anti-patterns (queryRecords-as-KV, compaction-for-latency,
    cache-the-slow-query) and a worked example (mutable game state).
  * AGENTS.md — explicit for AI coding agents; names the failure mode,
    lists six rules, and tells agents to read PATTERNS.md before
    writing their first queryRecords call.
  * gql/cerc-io/laconicd/schema.graphql — prescriptive comments on
    queryRecords (warning against mutable-identity usage),
    getRecordsByIds (point-lookup clarification), and the Naming
    API section (USE THIS for current-state lookups).
  * README.md — new 'Designing state that lives on laconicd' section
    between Usage and Tests, linking both new docs.
2026-04-24 16:04:31 +00:00
.gitea/workflows Add service provider auctions (#59) 2024-09-25 12:38:49 +00:00
api/cerc Add a custom lockup account to hold locked tokens (#72) 2025-05-16 09:26:10 +00:00
app Add a custom lockup account to hold locked tokens (#72) 2025-05-16 09:26:10 +00:00
cmd/laconicd Update distribution JSON structure in add-genesis-lockup-account cmd (#75) 2025-06-18 19:12:53 +00:00
docs docs: guide agents/humans toward Naming API for mutable logical identity 2026-04-24 16:04:31 +00:00
gql docs: guide agents/humans toward Naming API for mutable logical identity 2026-04-24 16:04:31 +00:00
proto Add a custom lockup account to hold locked tokens (#72) 2025-05-16 09:26:10 +00:00
scripts Add a new token and only allow fees in alnt (#68) 2025-05-13 18:17:38 +05:30
tests Update e2e and integration tests for new tokens setup (#73) 2025-05-19 10:10:54 +00:00
testutil Update e2e and integration tests for new tokens setup (#73) 2025-05-19 10:10:54 +00:00
utils Implement onboarding module for testnet validator enrollment (#3) 2024-07-16 09:25:39 +05:30
x Add a custom lockup account to hold locked tokens (#72) 2025-05-16 09:26:10 +00:00
.dockerignore Additional CI workflows (#16) 2024-03-07 09:11:53 +00:00
.gitignore Add initialization script and a Dockerfile (#15) 2024-03-07 05:10:41 +00:00
.golangci.yml Add lint config and fix lint errors (#7) 2024-07-16 09:25:39 +05:30
AGENTS.md docs: guide agents/humans toward Naming API for mutable logical identity 2026-04-24 16:04:31 +00:00
Dockerfile Set graphiql package version in GQL playground (#67) 2025-05-09 09:49:28 +00:00
go.mod Add evidence module (#71) 2025-05-14 06:24:55 +00:00
go.sum Add evidence module (#71) 2025-05-14 06:24:55 +00:00
lockup.md Add a custom lockup account to hold locked tokens (#72) 2025-05-16 09:26:10 +00:00
Makefile Add a custom lockup account to hold locked tokens (#72) 2025-05-16 09:26:10 +00:00
README.md docs: guide agents/humans toward Naming API for mutable logical identity 2026-04-24 16:04:31 +00:00

Laconic Network

banner

The Source of Proof. Laconic is a next generation data availability & verifiability layer with cryptographic proofs, powering internet-scale Web3 applications, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of CometBFT consensus engine.

Installation

Install laconicd:

# install the laconicd binary
make install

Usage

Run with a single node fixture:

# start the chain
./scripts/init.sh

# start the chain with data dir reset
./scripts/init.sh clean

See lockup.md for lockup account usage.

Designing state that lives on laconicd

Before writing a client library, service, or migration that persists data through laconicd, read:

  • docs/PATTERNS.md — the primitive decision tree. Explains when to use the Naming API (setName / lookupNames / resolveNames) vs. the Record API (setRecord / queryRecords / getRecordsByIds), with worked examples and the common anti-patterns.
  • AGENTS.md — written for AI coding agents, but the failure mode it describes (extending the wrong primitive rather than re-evaluating it) applies to human contributors under deadline pressure too.

Picking the wrong primitive is expensive to unwind: laconicd is append-only, so mistakes persist as on-chain data you cannot silently remove. Spend the 10 minutes to read the pattern guide before the first commit.

Tests

Run tests:

# integration tests
make test-integration

# e2e tests
make test-e2e

Community

The following chat channels and forums are a great spot to ask questions about Laconic: