mirror of
https://github.com/aljazceru/ark.git
synced 2026-01-16 02:04:20 +01:00
* 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
61 lines
1.6 KiB
Makefile
Executable File
61 lines
1.6 KiB
Makefile
Executable File
.PHONY: build clean cov help intergrationtest lint run test vet proto proto-lint
|
|
|
|
## build: build for all platforms
|
|
build:
|
|
@echo "Building arkd binary..."
|
|
@bash ./scripts/build
|
|
|
|
## clean: cleans the binary
|
|
clean:
|
|
@echo "Cleaning..."
|
|
@go clean
|
|
|
|
## cov: generates coverage report
|
|
cov:
|
|
@echo "Coverage..."
|
|
@go test -cover ./...
|
|
|
|
## help: prints this help message
|
|
help:
|
|
@echo "Usage: \n"
|
|
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
|
|
|
|
## intergrationtest: runs integration tests
|
|
integrationtest:
|
|
@echo "Running integration tests..."
|
|
@find . -name go.mod -execdir go test -v -count=1 -race $(go list ./... | grep internal/test) \;
|
|
|
|
## lint: lint codebase
|
|
lint:
|
|
@echo "Linting code..."
|
|
@golangci-lint run --fix
|
|
|
|
## run: run in dev mode
|
|
run: clean
|
|
@echo "Running arkd in dev mode..."
|
|
@export ARK_WALLET_ADDR=localhost:18000; \
|
|
export ARK_ROUND_INTERVAL=30; \
|
|
go run ./cmd/arkd
|
|
|
|
## test: runs unit and component tests
|
|
test:
|
|
@echo "Running unit tests..."
|
|
@find . -name go.mod -execdir go test -v -count=1 -race ./... $(go list ./... | grep -v internal/test) \;
|
|
|
|
## vet: code analysis
|
|
vet:
|
|
@echo "Running code analysis..."
|
|
@go vet ./...
|
|
|
|
## proto: compile proto stubs
|
|
proto: proto-lint
|
|
@echo "Compiling stubs..."
|
|
@docker run --volume "$(shell pwd):/workspace" --workdir /workspace buf generate buf.build/vulpemventures/ocean
|
|
@docker run --volume "$(shell pwd):/workspace" --workdir /workspace buf generate
|
|
|
|
## proto-lint: lint protos
|
|
proto-lint:
|
|
@echo "Linting protos..."
|
|
@docker build -q -t buf -f buf.Dockerfile . &> /dev/null
|
|
@docker run --volume "$(shell pwd):/workspace" --workdir /workspace buf lint
|
|
|