Repository navigation
Conversation
x/sink escrows AKT for minting on Solana. MsgSink locks uakt in the sink
module account and writes an immutable 77-byte record under transfer/{id},
which the Solana program verifies with an IAVL proof of this store.
- keeper: params, totals, per-account daily count, pending and amount
limits, minimum transfer, checked uint64 accounting and the exact bank
invariant reserve + pending + minted + voided = sink balance
- settlement: reporter epochs and votes, void challenge windows, vetoes,
governance resolution and guarded refunds to the original sender
- open/{8-byte id} index backing the paged OpenTransfers query
- pause guardian that can only turn deposits or refunds off
- send restriction that admits only the authorized deposit, reserve
funding, refund or pre-install sweep, and an ante decorator that binds
MsgSink to a sole top-level message
- PrepareInstall and FundLaunchReserve for the install upgrade
- genesis import/export, msg and query servers, REST gateway
Types, protobuf and CLI come from pkg.akt.dev/go/node/sink/v1.
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Add the sink store key, keeper and module, initialize sink genesis after bank, register the sink module account without mint or burn permissions (which also blocks it as a bank recipient), append the sink send restriction to bank and add the sink deposit decorator to the ante chain. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Run signed transactions through the app: deposits and their IAVL proof, direct and legacy Amino signatures, atomic rollback on bank failure or redirect, nested and multi-message rejection, module ingress, limits and caps, reporter quorums, vetoes, conflicts, rotations, refund pause and cap, open-transfer paging and the pause guardian. SINK_PROOF_FIXTURE and SINK_REPORTER_FIXTURE optionally export a proof fixture and replay reporter transactions signed outside Go. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
The handler adds the sink store, runs PrepareInstall, runs migrations (sink
InitGenesis with default params: deposits and refunds disabled, no
reporters), funds the 1,000,000 AKT launch reserve from the plan's
reserve_source and checks the bank invariant. Any account or balance already
at the sink address is adopted as the module account and its coins go to the
community pool.
The plan info must be one inline JSON object:
{"binaries": {...}, "reserve_source": "akash1..."}
binaries is optional and other keys are rejected.
Decisions for maintainers before release:
- the upgrade name and height: v2.2.0-sink-provisional is a placeholder;
rename the directory, package, UpgradeName, meta.json, test-cases.json and
changelog entry, or fold the handler into the release's own handler
- the reserve source account, which must hold 1,000,000 AKT liquid at the
upgrade height or the upgrade fails and the chain halts
- the community-pool disposition of preexisting sink balances, to be stated
in the proposal
- the CI upgrade test builds plan info from the release tag only, so it
needs reserve_source added before it can pass
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Placeholder: replace this commit before merging.
x/sink imports pkg.akt.dev/go/node/sink/v1 and the akash CLI uses the sink
commands from pkg.akt.dev/go/cli. Neither is in a tagged chain-sdk release
yet, so this branch does not build against the versions required here
(pkg.akt.dev/go v0.2.14, pkg.akt.dev/go/cli v0.2.4). This commit only adds
github.com/mr-tron/base58, which the sink tests import directly.
Once chain-sdk tags the sink API, replace this commit with:
go get pkg.akt.dev/go@<go tag> pkg.akt.dev/go/cli@<cli tag>
go mod tidy
Until then, build against a chain-sdk checkout with a scratch modfile:
cp go.mod .cache/sink.mod && cp go.sum .cache/sink.sum
go mod edit -modfile=.cache/sink.mod \
-replace pkg.akt.dev/go=<chain-sdk>/go \
-replace pkg.akt.dev/go/cli=<chain-sdk>/go/cli
go mod tidy -modfile=.cache/sink.mod
go test -modfile=.cache/sink.mod ./x/sink/... ./app/... ./upgrades/...
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Drop this commit before opening an upstream pull request if the file is not wanted there. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
The Solana token launches with no genesis mint, so the upgrade no longer moves 1,000,000 AKT from a reserve source. The handler ignores plan info, so standard cosmovisor info works and no source address can halt the chain. It still sweeps any balance at the sink address to the community pool and leaves deposits off. Release tooling drops the reserve-source option. BREAKING CHANGE: the upgrade plan no longer carries reserve_source. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
The Solana token launches with no genesis mint, so the upgrade no longer moves 1,000,000 AKT from a reserve source. The handler ignores plan info, so standard cosmovisor info works and no source address can halt the chain. It still sweeps any balance at the sink address to the community pool and leaves deposits off. Release tooling drops the reserve-source option. BREAKING CHANGE: the upgrade plan no longer carries reserve_source. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
All sink state now uses cosmos collections with two-byte prefixes, as in x/bme, and every integer key is an 8-byte big-endian value, so store order is numeric order. Transfer records and void orders, the two keys Solana proves, take their prefixes from the SDK. Values do not change: the 77-byte record, the 9-byte void order and the proto messages. The keeper reads and writes typed collections instead of raw byte keys. BREAKING CHANGE: transfer records are proven at 0x02 0x00 and void orders at 0x02 0x01, each followed by the 8-byte big-endian ID. State written under the old keys is not migrated. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
All sink state now uses cosmos collections with two-byte prefixes, as in x/bme, and every integer key is an 8-byte big-endian value, so store order is numeric order. Transfer records and void orders, the two keys Solana proves, take their prefixes from the SDK. Values do not change: the 77-byte record, the 9-byte void order and the proto messages. The keeper reads and writes typed collections instead of raw byte keys. BREAKING CHANGE: transfer records are proven at 0x02 0x00 and void orders at 0x02 0x01, each followed by the 8-byte big-endian ID. State written under the old keys is not migrated. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Adds the AKT token program, the ICS07 light client patches, the relayer, the reporters, deploy tooling, local network scripts and docs. The transfer portal lives in its own repository. The workspace keeps its own Cargo and npm workspaces, so the CosmWasm workspace and Go module are unchanged. scripts/build-node.sh builds the node it sits in against a chain-sdk checkout next to node. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
|
Warning Review limit reached
This review includes 289 billable files and costs up to $72.25. View limit details
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
|
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Validate incoming messages in the server while retaining keeper state guards. Keep codecs, query prefixes, proof keys and refund queue selection in node. The matching SDK dependency pin and new query API integration are deferred. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Add signed weighted deposit, report and refund operations, governance message generators, randomized genesis and schema decoding. Check repeatable state, accounting, quotas, composite sequences and export/import behavior. SDK seeded runs and the longer refund lifecycle are separate test cases. Governance voting and external Solana finality are outside this coverage. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Derive vote quorum from the reporter fraction and migrate policy callers and fixtures to the current SDK. Keep policy versions aligned with their sequence, preserve stored member ordering, and load validated genesis without replaying transaction accounting. The query redesign remains separate; its existing failing tests are preserved. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Transfers pages through cursors that carry their filter and rejects forged ones; Reporters serves the current, any or all policy versions. SetParams rejects reporter sets that fail the quorum rule, so a bad policy can no longer break writes and export. Genesis requires the current policy, checks vetoes, usage stamps, heights and an empty store, creates the module account and writes in one cache. Block transfer sequences start at 1 again. Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Use the existing state.TestSuite patterns from deployment and market. Keep signed transaction, native bank, upgrade and recovery coverage under x/sink, and place policy and settlement handler tests beside the handler. Align recovery fixtures with the current genesis contract and update the Solana test selectors. Correct the withdrawal test to match the existing closed-lease guard. Production Sink code and dependency pins are unchanged. Validation: make test and make test-full pass uncached across 29 packages. The ten existing skips remain; independent conventions review found no required correction. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Transfer IDs keep their deposit height, so a populated zero-height export could never be imported and panicked at InitGenesis. Export now fails early with guidance, using the same height rule as import. CI simulations export and import at the exported height. Adds reporter alias tests for chain-sdk ea3d90b3. Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Use the existing Akash Makefile and pin the merged IBC contracts source through Cargo. Remove the alternate Go module build and verifier patches. Add reviewed deployment manifests, finalized artifact verification, service packaging and systemd entry points, with production and testnet runbooks. Keep project scratch under the repository cache and cover the build paths in the existing CI workflow. Solana typechecks, 221 service tests, 8 deployment tests and 15 Python build/packaging checks pass. Native compilation on the upstream fc2e532 baseline is blocked by its committed SDK mismatch. Complete Docker build verification and on-chain launch acceptance remain release gates. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Use Solana's deployment CLI and node's existing upgrade harness instead of custom upload orchestration and the obsolete sink-local-v1 runner. Fold proof fixtures into node's Go module and use the generated MerkleProof encoder. Share the locked CPI-proxy build, read toolchain pins from their owners, and omit development-only npm packages from service archives. Typecheck, release/config tests, build/packaging checks and all shell lint pass. Actual proxy compilation and post-prune service imports pass. Five canonical fixture roots and proof encodings remain byte-identical. The upstream node/SDK build mismatch and full launch verification remain open. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Consume the split native queries and server-issued pagination cursors. Support native owner lengths and decimal reporter policies without changing node or SDK code. Generate boundary fixtures through the native codecs. BREAKING CHANGE: owner encoding and every status PDA change. Use a fresh Solana namespace with an unused Sink module; do not upgrade a live bridge. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Keep the README focused on the three operator tasks and use one release directory throughout the deployment examples. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Use the native seven-reporter fixture with the existing proof verifier. Correct the expiry assertion and owner-length diagnostic to match the implemented behavior. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Link the README directly to the code walkthrough and program deployment guide. Keep the walkthrough focused on transfer flow, source locations, services and build tools. Scope proof validation to the planned deployment. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Record the rebased node revision, link the relocated Sink upgrade test, and describe the seven-reporter fixture accurately. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Use Artur’s reporter identity fix in the native release build. Keep module resolution on committed pins with GOWORK disabled. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Add a CLI-only Compose overlay using the existing upgrade fixture and Solana commands, plus a separate operator deployment guide. Document fixed native ports, matching release pins, governance generation and unverified local end-to-end prerequisites. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Keep generated header and checkpoint timestamps on the local validator clock. Allow finalized uploads before prune expiry and the full lookup-table cooldown on slower validators. Production time, proof and finality checks are unchanged. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
A module account cannot run a reporter, so listing one only shrinks the set that can reach quorum; SetParams now rejects it in either spelling. Add the export, height and reporter-spelling tests flagged in review. Rebuild the swagger bundle from chain-sdk 4a0ecebb to include sink. Align the x/sink and Solana operator docs with the code and the launch plan: Akash upgrade first, one proposal opening transfers, the seed step and seed-window caps. Mark the Minted-refund path as a known defect. Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Use the akt program name across builds, deployment manifests, services and documentation. Set the approved token name and lowercase symbol, and include the mainnet metadata JSON with the existing Cosmos AKT logo. Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.md