Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ applications/store-build/tmp
/examples/wallet-demo/test-results/
applications/cli/wallet-ui/node_modules/
applications/cli/src/main/resources/static/wallet/
/applications/cli/chainstate/
/e2e-tests/evolution-sdk/node_modules/
/chainstate/
5 changes: 4 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG --global tag="dev"
ARG --global local="true"
ARG --global REGISTRY_ORG = "bloxbean"
ARG --global build_type="native"
ARG --global YANO_BRANCH="fix/devkit_fix"

build:
LOCALLY
Expand All @@ -22,7 +23,7 @@ cli-docker:
ARG EARTHLY_TARGET_NAME
ARG EARTHLY_GIT_SHORT_HASH

BUILD ./applications/cli+docker-build --BUILD_TYPE=${build_type} --REGISTRY_ORG=${REGISTRY_ORG} --APP_VERSION=${tag} --COMMIT_ID=${EARTHLY_GIT_SHORT_HASH}
BUILD ./applications/cli+docker-build --BUILD_TYPE=${build_type} --REGISTRY_ORG=${REGISTRY_ORG} --APP_VERSION=${tag} --COMMIT_ID=${EARTHLY_GIT_SHORT_HASH} --YANO_BRANCH=${YANO_BRANCH}

viewer:
ARG EARTHLY_TARGET_NAME
Expand All @@ -44,6 +45,8 @@ zip:
RUN echo "revision=${EARTHLY_GIT_SHORT_HASH}" >> /app/yaci-devkit-${tag}/config/version
COPY config/env /app/yaci-devkit-${tag}/config/
COPY config/node.properties /app/yaci-devkit-${tag}/config/
COPY config/plutus-costmodels-v10.json /app/yaci-devkit-${tag}/config/
COPY config/plutus-costmodels-v11.json /app/yaci-devkit-${tag}/config/

COPY bin/devkit.sh /app/yaci-devkit-${tag}/bin/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="static/DevKit.png" width="300">
<p align="center"><img src="static/DevKit-logo.svg" alt="Yaci DevKit logo"></p>

<h4>Complete Cardano development environment with instant local devnet</h4>

Expand Down
2 changes: 1 addition & 1 deletion applications/cli/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ build/libs/yaci-cli-*-plain.jar
yaci-store-*-sources.jar
yaci-store-*-plain.jar
yaci-store-*-javadoc.jar

wallet-ui/node_modules/
32 changes: 29 additions & 3 deletions applications/cli/Earthfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
VERSION 0.8

wallet-ui-build:
FROM node:20-slim
WORKDIR /app
COPY wallet-ui/package.json wallet-ui/package-lock.json ./
RUN npm ci
COPY wallet-ui/ ./
RUN npx vite build --outDir dist
SAVE ARTIFACT dist /wallet

cli-java:
ARG EARTHLY_TARGET_NAME
ARG EARTHLY_GIT_SHORT_HASH
ARG APP_VERSION

FROM eclipse-temurin:21
COPY . .
COPY +wallet-ui-build/wallet src/main/resources/static/wallet
RUN echo git.commit.id.abbrev=${EARTHLY_GIT_SHORT_HASH} > src/main/resources/git.properties

RUN cat src/main/resources/git.properties
Expand All @@ -22,6 +32,7 @@ cli-native:

FROM ghcr.io/graalvm/graalvm-community:21
COPY . .
COPY +wallet-ui-build/wallet src/main/resources/static/wallet
RUN echo git.commit.id.abbrev=${EARTHLY_GIT_SHORT_HASH} > src/main/resources/git.properties

RUN cat src/main/resources/git.properties
Expand Down Expand Up @@ -49,15 +60,17 @@ java-setup:
docker-build:
FROM ubuntu:22.04
ENV JAVA_HOME=/opt/java/openjdk
ENV STORE_VERSION=0.1.0
ENV STORE_NATIVE_BRANCH=release/2.0.0-beta3
ENV STORE_VERSION=2.0.1-rc1
ENV STORE_NATIVE_BRANCH=v2.0.1-rc1
ENV YANO_BRANCH=fix/devkit_fix

ARG TARGETOS
ARG TARGETARCH
ARG BUILD_TYPE
ARG APP_VERSION
ARG REGISTRY_ORG
ARG COMMIT_ID
ARG YANO_BRANCH

COPY --dir +java-setup/openjdk /opt/java/
ENV PATH="${JAVA_HOME}/bin:${PATH}"
Expand Down Expand Up @@ -94,14 +107,23 @@ docker-build:
RUN mkdir -p /app/store/config
COPY docker/store-application.properties /app/store/config/application.properties

RUN wget https://github.com/bloxbean/yaci-store/releases/download/v${STORE_VERSION}/yaci-store-all-${STORE_VERSION}.jar -O /app/store/yaci-store.jar
RUN wget https://github.com/bloxbean/yaci-store/releases/download/v${STORE_VERSION}/yaci-store-${STORE_VERSION}.zip -O /app/store/yaci-store.zip
RUN unzip /app/store/yaci-store.zip -d /app/store/
RUN cp /app/store/yaci-store-${STORE_VERSION}/yaci-store.jar /app/store/yaci-store.jar

RUN echo ${APP_VERSION} > /app/version

IF [ "$BUILD_TYPE" = "native" ]
COPY (../store-build/+store-native/yaci-store* --APP_VERSION=${APP_VERSION} --STORE_BRANCH=${STORE_NATIVE_BRANCH}) /app/store/
END

# Yano native binary (always included; Yano is native-only in docker)
RUN mkdir -p /app/yano
COPY (../yano-build/+yano-native/yano --APP_VERSION=${APP_VERSION} --YANO_BRANCH=${YANO_BRANCH}) /app/yano/yano
COPY (../yano-build/+yano-native/config --APP_VERSION=${APP_VERSION} --YANO_BRANCH=${YANO_BRANCH}) /app/yano/config
COPY (../yano-build/+yano-native/yano.git.properties --APP_VERSION=${APP_VERSION} --YANO_BRANCH=${YANO_BRANCH}) /app/yano/yano.git.properties
RUN chmod +x /app/yano/yano

RUN echo "Build type: $BUILD_TYPE"
IF [ "$BUILD_TYPE" = "native" ]
COPY (+cli-native/yaci-cli* --APP_VERSION=${APP_VERSION}) /app/
Expand All @@ -116,6 +138,8 @@ docker-build:

RUN mkdir -p /app/config
COPY docker/application.properties /app/config/
COPY config/plutus-costmodels-v10.json /app/config/
COPY config/plutus-costmodels-v11.json /app/config/

ENV PATH="$PATH:/app/cardano-bin"
ENV CARDANO_NODE_SOCKET_PATH=/clusters/nodes/default/node/node.sock
Expand All @@ -128,6 +152,8 @@ docker-build:
EXPOSE 8080
EXPOSE 1337
EXPOSE 1442
EXPOSE 6060
EXPOSE 14447

ENTRYPOINT ["sh", "/app/yaci-cli.sh"]

Expand Down
14 changes: 8 additions & 6 deletions applications/cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ dependencies {
implementation 'org.springframework.shell:spring-shell-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.ai:spring-ai-starter-mcp-server-webmvc'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6'
implementation 'org.springframework.boot:spring-boot-starter-logging'
implementation 'org.springframework.boot:spring-boot-starter-mustache'

implementation('com.bloxbean.cardano:yaci:0.4.0') {
implementation('com.bloxbean.cardano:yaci:0.4.3') {
exclude group: 'com.bloxbean.cardano', module: 'cardano-client-core'
}
implementation 'com.bloxbean.cardano:cardano-client-lib:0.7.1'
implementation 'com.bloxbean.cardano:cardano-client-backend:0.7.1'
implementation 'com.bloxbean.cardano:cardano-client-backend-blockfrost:0.7.1'
implementation 'com.bloxbean.cardano:cardano-client-lib:0.7.2'
implementation 'com.bloxbean.cardano:cardano-client-backend:0.7.2'
implementation 'com.bloxbean.cardano:cardano-client-backend-blockfrost:0.7.2'

implementation 'org.apache.commons:commons-compress:1.23.0'

Expand Down Expand Up @@ -102,6 +102,7 @@ tasks.register('walletUiInstall', Exec) {
commandLine 'bash', '-c', 'npm install'
inputs.file('wallet-ui/package.json')
outputs.dir('wallet-ui/node_modules')
onlyIf { !file('src/main/resources/static/wallet/index.html').exists() }
}

tasks.register('walletUiBuild', Exec) {
Expand All @@ -114,6 +115,7 @@ tasks.register('walletUiBuild', Exec) {
inputs.file('wallet-ui/vite.config.ts')
inputs.file('wallet-ui/tailwind.config.cjs')
outputs.dir('src/main/resources/static/wallet')
onlyIf { !file('src/main/resources/static/wallet/index.html').exists() }
}

processResources {
Expand All @@ -137,7 +139,7 @@ task cliZip(type: Zip) {

from('config') {
into(configDir)
include '**/*.properties'
include '**/*.properties', '**/*.json'
}

include 'yaci-cli*'
Expand Down
6 changes: 6 additions & 0 deletions applications/cli/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ server.port=10000
#Default is the user_home/.yaci-cli
#yaci.cli.home=/Users/satya/yacicli

#Path to directory containing Plutus cost models JSON files (plutus-costmodels-v10.json, plutus-costmodels-v11.json)
yaci.cli.plutus-costmodels-path=./config

ogmios.enabled=false
kupo.enabled=false
yaci.store.enabled=false
yano.enabled=false

yaci.store.mode=native

Expand All @@ -21,6 +25,8 @@ bp.create.enabled=true
#yaci.store.port=8080
#socat.port=3333
#prometheus.port=12798
#yano.server.port=14447
#yano.http.port=6060


######################################################
Expand Down
14 changes: 9 additions & 5 deletions applications/cli/config/download.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#Please specify either the version or the full url for the following components
node.version=10.5.0
ogmios.version=6.13.0
node.version=11.0.1
ogmios.version=6.14.0
kupo.version=2.11.0

yaci.store.tag=rel-native-2.0.0-beta3
yaci.store.version=2.0.0-beta3
yaci.store.jar.version=2.0.0-beta3
yaci.store.tag=rel-native-2.0.1-rc1
yaci.store.version=2.0.1-rc1
yaci.store.jar.version=2.0.1-rc1

yano.tag=v0.1.0-pre3
yano.version=0.1.0-pre3

#node.url=
#ogmios.url=
#kupo.url=
#yaci.store.url=
#yaci.store.jar.url=
#yano.url=
8 changes: 8 additions & 0 deletions applications/cli/config/node.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Node mode: yano-primary (Yano BP + Haskell relay, supports rollback),
# companion (Yano bootstraps + Haskell takes over),
# yano-only (Yano only, fastest startup),
# haskell-only (legacy, Haskell node only)
nodeMode=companion

#protocolMagic=42
#maxKESEvolutions=60
#securityParam=80
Expand Down Expand Up @@ -66,6 +72,8 @@
#dvtTreasuryWithdrawal=0.51f

#committeeMinSize=0
#ccThresholdNumerator=0
#ccThresholdDenominator=1
#committeeMaxTermLength=200
#govActionLifetime=10
#govActionDeposit=1000000000
Expand Down
Loading
Loading