Docs & Schema: Top Accounts, client WebSocket events, and consensus visibility #68
dev-adamant-im
announced in
Dev Guidelines & Docs
Replies: 1 comment
-
|
Amazing update, thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We aligned
adamant-docsandadamant-schemawith the current ADAMANT node API surface: additive REST fields, Socket.IO client events, corrected query semantics, and operator recovery guidance. No consensus fork or wire-format break — changes are backward-compatible.Live surfaces:
Top Accounts API
GET /api/accounts/topis now part of the public contract. Ordering is deterministic:balance DESC, thenaddress ASC. Supportslimit/offset, optionalisDelegate, response metadata (count), andlimit=0for count-only requests. The legacytopAccountsconfig switch is gone — the endpoint is registered on every node.Client WebSocket:
newBlockandbalances/changeThe client Socket.IO interface gained opt-in compact
newBlockevents and field-levelbalances/changepayloads (balance,unconfirmedBalance, or both). Subscriptions are indexed (address,types,assetChatTypes,balances,blocks). Delivery remains best-effort and non-durable — reconnect, re-subscribe, and reconcile critical state via REST.The OpenAPI package documents this under
x-client-websocketwith dedicated schemas underspecification/websocket/.Status schedules and delegate
forgedPublic status APIs now expose the effective consensus activation schedule and the full block-reward milestone schedule:
consensusCodeNameconsensusSchedule.activationHeightsmilestoneSchedule(offset,distance,milestones)Delegate list/get responses include lifetime
forgedas a base-10 integer string (base units). Next-forger projection uses the next block height at round boundaries. Schema also fixedproducedlocks→producedblocksand completed query-parameter coverage for peers, queued/unconfirmed transactions, and delegate search/orderBy.Blocks API alignment
GET /api/blocksquery semantics are aligned with node behavior:numberOfTransactions=0works correctly;orderBy, amount filters, andoffset-after-ordering are documented accurately. Schema adds full parameter coverage andgeneratorPublicKeyonBlockInfoDto. IncorrecttimestampMsexamples were removed from the docs.Operator recovery: mem-table checkpoints
Persisted rotating
mem_*checkpoints (loading.memCheckpoints.enabled, on by default) are documented for crash recovery: SHA-256 verification, fail-closed restore, fallback to full deterministic rebuild, storage impact, and graceful shutdown (SIGINT/SIGTERM→ wait forCleaned up successfully). Checkpoints are a local recovery cache; canonical blocks remain the source of truth.Release PRs
Node context: adamant@v0.10.2. Downstream consumers (especially
adamant-api-jsclient) should regenerate types from the updated OpenAPI bundle.Beta Was this translation helpful? Give feedback.
All reactions