Skip to content

Releases: arkade-os/arkd

v0.9.2

26 Mar 19:17
02f7156

Choose a tag to compare

What's Changed

Full Changelog: v0.9.1...v0.9.2

v0.9.1

19 Mar 16:33
0a5e8d1

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.9.0...v0.9.1

v0.9.0

05 Mar 17:32
1f49b44

Choose a tag to compare

What's Changed

New Contributors

  • @arkanaai[bot] made their first contribution in #931

Full Changelog: v0.8.11...v0.9.0

v0.9.0-rc.4

03 Mar 15:38
8615412

Choose a tag to compare

Bump grpc@1.79.1 and otel@v1.40.0 (#947)

* update otel sdk

* Bump deps

* Go mod tidy

* Go mod tidy

* Lint

* Bump deps

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>

v0.9.0-rc.3

27 Feb 17:53
698fe3a

Choose a tag to compare

Limit the number of vtxo.assets (#938)

* max assets per vtxo relative to maxTxWeight

* add VTXO_SPENDING_WEIGHT_THRESHOLD, move maxAssetsPerVtxo to application/utils.go

* do not use math.Ceil

* update utils_test.go

* rename: VTXO_TOO_HEAVY --> VTXO_WITH_TOO_MANY_ASSETS

* rename "VTXO_SPENDING_WEIGHT_THRESHOLD" --> "ASSET_TX_MAX_WEIGHT_RATIO"

* Lint

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>

v0.9.0-rc.2

24 Feb 22:15
fedfd98

Choose a tag to compare

Improve sweeper and restore watch vtxos ops at startup (#915)

* fix sqlite

* port migration to postgres

* update sqlc.yaml

* fix sqlite

* Clean migration

* Empty commit

* fix sqlite migration down

* Move restoreWatchingVtxos in Start() + increase verbosity + return simple error in Start()

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>

v0.9.0-rc.1

19 Feb 13:41
de06e02

Choose a tag to compare

Fix & Bump golang-ci lint (#914)

* Fix & Bump golang-ci lint

* Fix

* Typo

v0.9.0-rc.0

17 Feb 13:56
74a173c

Choose a tag to compare

v0.9.0-rc.0 Pre-release
Pre-release
Arkade Assets (#814)

* Implement Asset encoding and decoding with associated types and methods

* Implement OP_RETURN encoding and decoding for Asset struct

* Refactor Asset struct and update encoding/decoding for ControlOutput

* Refactor Asset struct to replace ControlOutput with ControlPubkey and update encoding/decoding logic

* Added Logic to Build Asset Transfer Logic
- Created a new CheckpointTx Builder
- Modified BuildTxs to include the logic for Building AssetTransfer transaction

* Implement asset validation logic and enhance error handling in transaction processing

* fixed asset tlv encoding and decoding

* Add unit tests for asset encoding and decoding functions

* Enhance asset transaction validation with clearer error messages and logic for output handling

* Refactor asset encoding functions to use consistent naming conventions and improve clarity

* Add Asset field to Vtxo struct and IsSeal field to Input struct

* Add AssetOutput struct and update RegisterMessage to include AssetOutputIndexes

* Implement asset handling in intent processing and transaction building

- Update Receiver struct to include AssetAmount, AssetId, and AssetTeleport fields.
- Modify RegisterIntent method to handle asset outputs and seals.
- Enhance asset output retrieval and encoding in transaction creation.
- Introduce ArkAssetSealVtxoField for marking asset seal inputs in PSBT.
- Refactor tree builder to accommodate multiple outputs, including asset scripts.

* Refactor proof and service layers to use wire.OutPoint for outpoints; add tests for asset seal vtxo handling

* added Teleport Vtxoscript

* added asset teleport pubkey

* Enhance asset handling by adding teleport hash and pubkey to Receiver struct; update transaction building and tests accordingly

* Refactor teleport pubkey comparison and error handling in getOutputVtxosLeaves; add logging for script generation

* Refactor asset transaction validation to ensure proper handling of reissuance and burning; update teleport pubkey comparison in utils

* added support for minting and burning

* Refactor asset handling to support asset groups; update encoding, decoding, and validation logic accordingly

* Implement asset transaction rebuilding logic; add support for asset groups in offchain transaction processing

* Refactor asset transaction validation and encoding; update control asset handling and introduce byte reversal utility

* Enhance control asset handling in BuildAssetTxs; ensure proper identification of control VTXO and error handling for missing assets

* Fix control asset handling in BuildAssetTxs; ensure checkpoint inputs are correctly appended when control VTXO is found

* debugging

* Refactor control asset handling in BuildAssetTxs; improve vtxo search logic and ensure proper input management for control assets

* Refactor BuildAssetTxs to derive transaction IDs for control asset inputs; improve clarity and maintainability

* Refactor asset handling to replace Txid with Txhash; improve consistency and clarity in asset input management

* Remove unnecessary bytes comparison in buildAssetCheckpointTx; simplify control asset input validation

* Refactor asset transaction validation and rebuilding; enhance control asset input handling and error reporting

* implemented storing of asset and its metadata

* Refactor BuildAssetTxs to improve control and normal asset handling; enhance clarity and prevent vtxo reuse

* Add unit tests for asset transaction rebuilding

Introduces comprehensive unit tests to validate the rebuilding of asset
transactions

* Add asset retrieval method to indexer service

Implements `GetAsset` in the indexer service to fetch asset details
and associated metadata. Introduces fallback logic for retrieving
offchain transactions and improves handling of asset teleport cases.

Refactors and modularizes asset teleport processing logic to enhance
readability and maintainability. Updates the handling of metadata
retrieval and validation for asset groups.

Relates to improving asset management functionality in the application.

* Add asset repository implementations for BadgerDB and Postgress

* feat: Enhance asset handling in indexer service

- Updated query parameters in indexer.pb.rgw.go to reorder asset filters for better performance.
- Modified GetVtxos and GetVtxosByOutpoint methods in indexer.go to include asset anchors for each Vtxo.
- Adjusted RegisterIntent method in service.go to collect asset group information and pass it to the new Intent structure.
- Refactored Intent structure in intent.go to include AssetGroupList for better asset management.
- Added tests in intent_test.go to verify the handling of asset groups in intents.
- Updated Vtxo structure to replace Asset with AssetAnchor for improved clarity.
- Enhanced asset retrieval logic in utils.go to support multiple asset groups from intents.
- Created new tests in utils_test.go to validate asset retrieval from intents with multiple asset groups.
- Updated gRPC handler in indexer.go to include asset anchor information in the response.

* implemented encoding for immutable asset metadata

* feat: Add immutable field to asset model and update related queries

* Implement sub-dust key handling in asset group and related transactions

* feat: Update EncodeOpret method to accept an amount parameter and adjust related calls

* Refactors asset decoding to simplify logic and remove batch ID

* feat: support multiple control and normal assets in asset group OP_RETURN and remove legacy parsing logic

* feat: Update asset inputs to use teleport commitments to checkpoint hashes in off-chain transactions.

* feat: Introduce TeleportWitness to AssetInput, encapsulating public key and nonce for teleport assets, and remove redundant teleport public key fields from intent messages.

* feat: Implement teleport asset storage and simplify teleport asset leaf creation in tx builder

* feat: replace TeleportWitness PublicKey with Script and update commitment calculation to use TeleportHash

* feat: implement `Get` and `Update` for `TeleportAsset` and persist its `IsClaimed` status.

* feat: Validate teleport asset exists and is not claimed before processing.

* feat: Make Asset.ControlAssetId optional by changing its type to a pointer and updating associated logic.

* fix multiasset checkpoint building

* refactor: Streamline asset validation and storage logic by consolidating asset processing and extracting input/output verification.

* fix: prevent updating asset metadata when the provided list is empty

* feat: add `DeriveAssetGroupFromTx` to extract asset group from transaction outputs.

* refactor: Aggregate asset VTXOs for single anchor insertion, adjust reissuance verification, and remove redundant asset counters.

* refactor: Decouple asset output processing from output indexes and remove `AssetOutputIndex` from `AssetOutput` struct.

* refactor: remove redundant `AssetAmount` field from `Receiver`, add `AssetTeleportHash` as a valid receiver destination, and reorder `pubkey` parsing.

* feat: Add teleport hash subscription and event tracking to indexer.

* feat: Add an `immutable` field to the `Asset` message and update its API definitions and gRPC handler.

* feat: Include asset ID in asset anchor creation and retrieval operations.

* feat: Enhance TeleportEvent structure with asset ID and amount fields, update related processing and tests

* Refactor asset management: rename tables and update queries

- Renamed tables from `asset_anchors`, `assets`, `teleport_assets`, and `anchor_vtxos` to `asset_anchor`, `asset_details`, `teleport_asset`, and `asset` respectively.
- Updated SQL queries and corresponding Go code to reflect the new table names and structures.
- Modified asset anchor structure to include a list of normal assets instead of vtxos.
- Implemented new methods for listing asset anchors by asset ID and retrieving assets by outpoint.
- Adjusted tests to align with the new asset management structure and ensure functionality remains intact.

* feat: Implement duplicate asset output vout checks in asset transactions and repository inserts

* Align With Protocol spec

* feat: Add control asset existence verification for new issuances in asset transaction validation

* fix: aligning more to protocol spec, by removing Asset Input hash

* fix: update function call to BuildAssetTxs for asset transaction reconstruction

* ensure non uniqueness of controlid so as to ensure metadata update

* fix: change asset output and input types from uint16 to uint32 for protocol consistency

* refactor: remove TODO comments for asset builder and subdust key in transaction files

* refactor: rename AssetGroup to AssetPacket and update related functions

- Changed references from AssetGroup to AssetPacket in the codebase.
- Updated function names and parameters to reflect the new AssetPacket terminology.
- Modified encoding and decoding functions to handle AssetPacket instead of AssetGroup.
- Adjusted tests to ensure compatibility with the new AssetPacket structure.
- Ensured that all relevant logic for handling assets is consistent with the new naming conventions.

* improve validation: check control asset before proceeding

* debug: log control asset during validation of normal assets

* refactor: replace direct control asset validation with dedicated method

* lint fix

* refactor: remove unused restoreWatchingVtxos function and clean up imports

* feat: Add Control Asset ID to Asset Group functionality

- Implemented InsertAssetGroup and GetAssetGroupByID methods to handle Control Asset ID in asset groups.
- Updated database schema to include control_id in asset_group table.
- Modified SQL queries and models to accommodate the new Control Asset ID field.
- Refactored asset handling in transaction building to support the new asset structure.
- Enhanced tests to cover scenarios involving Control Asset ID.

* GetIntentsByTxid scaffolding

* refactor: seperate subdust packet from asset packet

* refactor: fix Intent to implicitly derive AssetGroup Details from the Intent Proof Transaction

* refractor: split AssetPacket and SubdustPacket

* store intents with txid, custom migration for sqlite & postgres, badger not working yet

* add txid to intent in badger addOrUpdateRound

* change buf.Dockerfile back

* migration to handle indexes, views, badger fixes

* linting

* Added extension abstraction for VTXOs and migrated asset data to extensions; updated proto/openapi accordingly; renamed OP_RETURN packet types and helpers.

Added Verification of forfeited transactions

* context usage fix, badger intent index do not err on error

* lint check, schema fix on migration

* remove left join for migration on vtxo_new

* Create index on intent txid in custom migration

* - Add a uniqueness check for asset input vins during asset transition validation to prevent duplicate inputs.
- Remove asset-specific rebuild helpers: BuildAssetTxs and buildAssetCheckpointTx are deleted and offchain submission always rebuilds with BuildTxs.

* test dummy values, remove index creation from migration files, assume intents come with txids

* lint

* attempt to simplify txid migration for intent table

* lint

* run backfill only when txid column already exists

* postgres migration call

* check txid existence in postgres migration

* postgres syntax fix

* remove PrepareContext

* read all rows before updating

* log

* backfill badger txids in intents

* Remove badger migration for intent txid

* tests for sqlite and postgres migrations

* linting

* Refactor asset teleport handling and related structures

- Changed asset input mapping to support multiple AssetInputs per Vin.
- Updated asset validation to iterate over multiple asset inputs.
- Modified teleport asset handling to use script instead of commitment.
- Removed obsolete teleport asset leaf building function and related tests.
- Adjusted encoding/decoding logic for asset inputs and outputs to accommodate new teleport structure.
- Cleaned up tests to reflect changes in teleport asset handling.
- Removed unused fields and simplified asset output handling in transaction tree.

* refactor: update teleport asset structure and related database queries

* refactor: enhance asset validation error handling and metadata integration

- Introduced structured error handling for asset validation processes, improving clarity and traceability of errors.
- Updated various validation functions to return detailed error messages with associated metadata.
- Refactored asset repository methods to improve readability and maintainability.
- Enhanced SQL queries to ensure distinct asset anchors are retrieved, preventing duplicates.
- Improved test cases to validate new error handling and ensure robustness of asset operations.

* feat: Replace TLV-based asset group encoding/decoding with a custom binary format and add a Stringer for AssetId.

* Comment cleanup

* err handling in backfillIntent

* remove extra txid derivation

* test missing intent, fxn for dup migration code, badger intent err handling, package naming, returned intents to include id and txid

* err check ordering

* unexport fxn, cleanup fxn in test

* fix: add Vtxo extensions to tx event subscription vtxos

* refactor: update teleport input validation to use intent proof from repository

* fix packet out being verified

* refactor: streamline teleport asset validation and insertion logic in RegisterIntent

* debugging

* refactor: remove unused asset handling logic in getOutputVtxosLeaves function

* refactor: enhance asset forfeit transaction verification and encoding logic

* reintroduce changes

* Fixes & Renaming

* Drop (un)subscribe for teleport hashes rpcs & Fix permissions

* Fixes

* Remove debug log

* Lint

* Go mod tidy

* refactor: rename `AssetId.TxHash` to `Txid`, update `TeleportWitness` with `Txid` and `Index`, and standardize integer encoding/decoding using `tlv` helpers.

* fix: Use `input.Witness.Index` instead of `input.Vin` for teleport input validation.

* Fix

* Teleport Refactor (#887)

* refactor: update teleport asset handling to use Vout instead of Index, enhance asset packet structure, and streamline validation logic

* Refactor asset handling: Remove 'immutable' field and update asset types

- Removed the 'immutable' field from AssetGroup in OpenAPI, Protobuf, and related Go files.
- Changed asset type from 'Teleport' to 'Intent' in various locations, including validation and repository logic.
- Updated asset input and output structures to reflect the removal of teleport-specific fields.
- Adjusted transaction handling to accommodate the new asset type.
- Cleaned up related tests to ensure consistency with the new asset structure.

* lint fix

* refactor: enhance asset ID generation in updateProjectionsAfterOffchainTxEvents for improved handling of nil AssetId

* refactor: update asset validation logic to handle extension packets and streamline asset processing

* refactor: remove teleport references and reintroduces immutable to domain.AssetGroup

* refactor: rename TxOutIndex to IntentVout and update related validation logic

* Fixes

* Lint

* Fixes

* Fix

* Revert changes to immutable

* Revert changes to immutable (pt. 2)

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>

* pkg/ark-lib unit tests (#886)

* beginning of testing asset.go

* asset_test.go tests passing

* asset_test.go expanded

* files added

* extension files added, functions moved around, fxns renamed

* asset_group_encodings_test.go start

* expanded asset_group_encodings_test.go

* more asset_group_encodings_test.go

* asset_group_encodings_test.go output tests

* rename function from Verify back to Sign

* nil checks, unreachable error removed

* subdust_test.go, rename EncodeSubDustPacket, nomralizeAssetSlices test

* rebases, TeleportWitness changes

* rename extension folder to asset, extenstionPacket tests, remove unused fxn params

* require SubDust.Key when Asset present

* asset test fixtures, asset fxns

* each asset file to have own test file

* control and normal asset fixtures

* empty asset id fixture

* various asset fixtures for tests

* depper asset error path testing

* test fixes after rebase

* remove dup code, fixtures updates

* remove detemrinistic test fxns, add serialization into fixtures

* valid and invalid arrays for fixtures

* Revert unnecessary changes

* Tidy up ark-lib/asset

* Apply changes

* Remove debug log

* Revert changes on Makefile

* Revert

* Fix domain & dbs (#897)

* start of new asset tables & repo implementations (postgres)

* start of new asset tables & repo implementations (postgres)

* handling empty asset id or control asset id

* Fix domain, db, app and interface layers + Fix repos unit tests  for assets (#901)

* Refactor asset domain & repos

* Update projection update logic & Update unit tests

* Apply changes to app and interface layers (simplify)

* Fix

* Lint

* Polish migration

* Fix compute asset id from txid and grpIndex, not vout + Fix asset.NewAssetId

* Fixes after review

* Revert

---------

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>

* Tidy up RegisterIntent & vtxo tree builder (#902)

* Asset Transaction validation (#896)

* Simplify asset_validation.go

* handle checkpoint input

* move arklib

* clean

* tx_validation_test.go

* tx_validation unit tests

* handle overflow in IsReissuance

* validateIssuance comment

* issuance ref by id: should validate if asset exists

* add invalid issuance fixture case

* fix comment

* rename

* drop txo term

* update comment

* Asset e2e (#892)

* test: add asset tests to e2e suite

* fix: bump gosdk (test) and fix decoding issues

* fix: update go-sdk version and improve code formatting in e2e tests

* fix: increase wait time for server indexer in asset tests

* fix:sdk_bump

* Revert "fix: increase wait time for server indexer in asset tests"

This reverts commit 2a3d887a1190d6aa1e0e82d68b603903a608ba8d.

* go_mod_tidy

* fix: added unroll test for preconfirmed and multi asset leaf settle

* fix: update go-sdk dependency and improve asset settlement tests

* Bump deps & Fixes after merge with base branch

* Add comments to asset e2e tests

* Go mod tidy

* Go mod tidy

* Drop test

* Go mod tidy

* fix vtxo queries

* fix tests

* bump go-sdk

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
Co-authored-by: louisinger <louis@vulpem.com>

* add settle balance check

* simplify assset_projection table

* consistent db names

* TestSweep/unrolled_batch: give more time to server

* TestAsset: give more time to indexer

* rename GetAssetGroup -> GetAsset

* return metadata encoded as hex

* RegisterIntent: reject if contain issuance

* format

* remove output type and Immutable, reverse txids

* bump go-sdk

* ark-cli: bump go-sdk

* update fixtures

* remove metadata update table

* go mod tidy

* add asset supply

* asset repository: add more granual methods to implement asset validation

* remove subdust_fixtures.json

* fix assetRef/newAssetFromGroup/random_index fixture

* remove TeleportEvent

* RegisterIntent: guard on vtxo.Assets

* clean getAssetsFromTxOut

* typo in fixtures

* remove debug test

* remove dead code

* AddAssets: init count to zero in txBody

* fix SQL supply

* fix missing expected error

* fix godoc typo

* Update go-sdk to latest arkade-asset commit (6d24051)

- Updated go-sdk version from 338c435 to 6d24051
- Includes merge of upstream/master into arkade-asset branch
- Updated both main go.mod and pkg/ark-cli/go.mod

* Fix go-sdk pseudo-version timestamp

* fix type in customBatchHandler

* bump go-sdk

* fix docker-run

* Lint

* Fix persistence of asset amount + test

* Fix metadata hash + Add unit tests

* Add asset support to cli (#895)

* update ark-cli to support asset

* bump go-sdk

* bump go-sdk

* add arkd/pkg/errors replace

* bump go-sdk

* issue asset print assetIds strings

* add vtxos command

* Tidy up

* test

* fix go version in CI

* Fix: gosec G704 (#910)

* fix gosec G704

* fix goversion in CI

* keep empty file

* Update pkg/arkd-wallet/core/infrastructure/nbxplorer/service.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>

* Update pkg/arkd-wallet/core/infrastructure/nbxplorer/service.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>

* Update cmd/arkd/utils.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>

* Update cmd/arkd/utils.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>

* Update cmd/arkd/utils.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>

* Update cmd/arkd/utils.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>

---------

Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>
Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>

* bump go-sdk

* fix unroll

* drop TODO comment

* cleaning

---------

Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>
Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>

* Add comments to ark-lib/asset & Polish

* Re-add output type & Fix fixtures

* Tidy up & Lint

* Add test cases for issuance of self-controlled asset

* Fixes

---------

Signed-off-by: louisinger <41042567+louisinger@users.noreply.github.com>
Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
Co-authored-by: Bob Smith <5396652+bitcoin-coder-bob@users.noreply.github.com>
Co-authored-by: louisinger <41042567+louisinger@users.noreply.github.com>
Co-authored-by: louisinger <louis@vulpem.com>
Co-authored-by: louisinger <louis@arklabs.xyz>

v0.8.11

02 Jan 14:21
c66f854

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.8.10...v0.8.11

v0.8.10

29 Nov 14:19
a400bb2

Choose a tag to compare

What's Changed

Full Changelog: v0.8.9...v0.8.10