Commit Graph

12 Commits

Author SHA1 Message Date
Louis Singer
51bc673e66 Add covenant-based congestion tree (#62)
* covenant based tx builder

* remove relative time delta

* txbuilder/covenant add leaf boolean in node

* txbuilder/covenant final version

* support covenantType

* add GetLeafOutputScript

* remove printLn

* fix linting

* Update asp/internal/app-config/config.go

Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>
Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>

---------

Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>
Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>
2023-12-14 14:02:37 +01:00
Louis Singer
325ef38197 Fix propagation of RoundFailed events (#60) 2023-12-12 15:46:43 +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
Louis Singer
e5df6cfc39 Change congestion tree represenation (#50)
* add domain.CongestionTree + modify ports.TxBuilder

* rename Node members

* improve txbuilder testing

* congestion tree as matrix in protobuf spec

* compile stubs & update grpc handlers

* fix proto specs

* application/service.go use node.Txid field
2023-12-08 18:45:40 +01:00
Pietralberto Mazza
7bcdff0d2a Add endpoint to fetch pubkey & Require wallet already unlocked when starting the service (#43)
* Add endpoint to fetch pubkey & simplify ports.Wallet

* Lint
2023-12-05 17:45:38 +01:00
Pietralberto Mazza
554eaeb406 Add explorer-like endpoint to retrieve spendable vtxos for address (#37)
* Add GetSpendableVtxosWithId to repo

* Add endpoint to retrieve spendable vtxos
2023-12-04 17:28:01 +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
Pietralberto Mazza
46d54a227d Unit tests (#32)
* unit tests

* Fix makefile

* Fix race conditions

* Renaming
2023-12-01 17:50:42 +01:00
Louis Singer
c8d9db89c5 Add interface layer (#23)
* implement grpc interface

* rework GetEventStream rpc

* implement Ping & GetEventStream

* remove dev_portal

* Compile protos

* Empty gitignore

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
2023-12-01 17:13:28 +01:00
Pietralberto Mazza
89aaf4d5c6 Handle status updates from senders of payments (#24)
* Handle status updates from senders of payments

* Lint
2023-11-30 16:54:47 +01:00
Pietralberto Mazza
be1f4654f9 Add badger implementations of repos (#22)
* Fixes to domain layer

* Update repo manager interface

* Add badger repo impls

* Keep projection store in sync with event store

* Update deps

* Remove ripemd160
2023-11-30 14:16:44 +01:00
Pietralberto Mazza
0210d39866 Monorepo scaffolding (#16)
* Change scaffolding

* Fix gh action
2023-11-27 14:23:22 +01:00