Commit Graph

5 Commits

Author SHA1 Message Date
Louis Singer
5dba216a98 Congestion tree validation (#84)
* add common/pkg/tree validation

* update noah go.mod

* cleaning and fixes

* fix builder_test.go

* Fix deferred func

* fix even number of vtxos in congestion tree

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
2024-01-23 15:38:43 +01:00
Louis Singer
3407fd277a Forfeit transactions: signing process (#81)
* sign forfeit transactions

* revert txid + move SignVtxos func

* Fix nolint

* Fix

* fix connectorsToInputArgs function

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
2024-01-18 17:17:23 +01:00
Pietralberto Mazza
d150c4bbac Add support for collaborative redemption of vtxos & Changes to ark wallet (#72)
* Add internal support for collaborative exit

* Update protos and interface layer

* Fixes after proto updates

* Fix printing json & Do not print ark pubkey in config

* Add collaborative redeem command

* Polish

* Add address validation

* Fix building tree without right branch

* Fixes and validation checks

* Fixes

* Fix counting complete queued payments

* Add relays

* Add and compute onchain balance concurrently

* Tiny refactor

* Merge `config connect` into `init` cmd
2023-12-29 17:09:50 +01:00
Pietralberto Mazza
3985bd4e14 Cleanup & Add config and launcher (#57)
* Fixes

* Fixes to domain layer:
* Add Leaf bool field to know to fix the returned list of leaves
* Add non-persisted UnsignedForfeitTxs to RoundFinalizationStarted
* Store only error msg when round fails instead of full error

* Fix wallet interface:
* Add Close() to close conn with wallet
* Add GetAsset() to fix missing asset err when calling Transfer()

* Fix gocron scheduler to correctly run/build the project

* Fix badger repo implementation:
* Fix datadirs of projection stores
* Return error if current round not found
* Fix round event deserialization

* Fix TxBuilder interface & dummy impl:
* Pass asp pubkey as arg of the defined functions
* Fix connectorsToInputArgs to return the right number of ins
* Fix getTxid() to return the id of an hex encoded tx too
* Fix createConnectors() to return a tx if there's only 1 connector
* Add leaf bool field to psetWithLevel in case a leaf is not in the last level
* Fix node's isLeaf() check
* Move to hex encoded pubkeys instead of ark encoded

* Fix app layer:
* Add Start() and Stop() to the interface & Expect raw pubkeys instead of strings as args
* Source & cache pubkey from wallet at startup
* Drop usage of scheduler and schedule next task based on occurred round events
* Increase verbosity
* Use hex instead of ark encoding to store receveirs' pubkeys
* Lower faucet amount from 100k to 10k sats in total
* Fix finalizeRound() to persist round events even if it failed
* Add view() to forfeitTxMap to enrich RoundFinalizationEvent with unsigned forfeit txs

* Add app config

* Fix interface layer:
* Remove repo manager from handler factory
* Fix GetEventStream to forward events to stream once they arrive from app layer
* Return missing unsigned forfeit txs in RoundFinalizationEvent
* Fix extracting user pubkey from address
* Add log interceptors
* Add config struct
* Add factory
* Clean interface

* Add config and launcher

* Tidy deps & Set defaut round interval to 30secs for dev mode
2023-12-12 14:55:22 +01:00
Pietralberto Mazza
9e9e61fb89 Add Faucet endpoint (#36)
* Add internal methods for faucet feature

* Add grpc handler

* Lint
2023-12-04 16:40:56 +01:00