Voltar para Documentação

Docs Técnicas

Lifecycle And Version Binding

TREA uses explicit lifecycle and version acceptance.

O conteúdo abaixo vem das fontes técnicas do repositório e é prerenderizado no site para leitura direta por pessoas, crawlers e agentes.

TREA uses explicit lifecycle and version acceptance.

Lifecycle States

text
drafted
proposed
bound
active
suspended
matured
closed
archived
cancelled

Calls are blocked for:

text
suspended
closed
archived
cancelled

The runtime does not bypass lifecycle. The ledger checks lifecycle admissibility before call execution is committed.

Version Binding

Actors can accept a specific artifact version for a contract instance.

This allows upgrades without silently changing the executable code for every actor.

When a contract call executes, the ledger resolves the artifact in this order:

  1. the caller's accepted version for the contract instance, if one exists;
  2. otherwise the instance default artifact.

This separation matters:

  • the contract artifact identifies executable code;
  • the contract instance identifies persisted state and lifecycle;
  • the accepted version selects which artifact a given actor executes.

Storage Compatibility

Accepted artifacts are checked for storage compatibility.

Supported compatibility classes include:

  • identical;
  • append-only;
  • incompatible.

Automatic execution of incompatible migrations is outside the current closed profile.

Commit Boundary

A successful local execution does not guarantee ledger commit.

The ledger still validates lifecycle state, resolved artifact family, accepted version binding, storage compatibility, and resulting accounting effects before persisting the outcome.