Skip to content

Commit

Permalink
Merge pull request #55 from bloxbean/feat/non_docker
Browse files Browse the repository at this point in the history
Non docker yaci-cli setup
  • Loading branch information
satran004 authored Jun 30, 2024
2 parents b8bc952 + 4a7c005 commit f14f20f
Show file tree
Hide file tree
Showing 69 changed files with 988 additions and 332 deletions.
10 changes: 10 additions & 0 deletions applications/cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ dependencies {
implementation 'com.bloxbean.cardano:cardano-client-backend-blockfrost:0.5.1'
//implementation 'com.bloxbean.cardano:cardano-client-supplier-local:0.5.1'

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

implementation 'org.jeasy:easy-rules-core:4.1.0'
implementation 'org.jeasy:easy-rules-mvel:4.1.0'

Expand Down Expand Up @@ -102,9 +104,17 @@ gitProperties {

task cliZip(type: Zip) {
def zipDirName = "yaci-cli-${project.version}"
def configDir = zipDirName + "/config"

from('build/native/nativeCompile') {
into(zipDirName)
}

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

include 'yaci-cli*'
archiveFileName = "yaci-cli-${project.version}.zip"
destinationDirectory = file("build")
Expand Down
19 changes: 16 additions & 3 deletions applications/cli/config/application.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
spring.config.import=optional:file:./config/node.properties
spring.config.import=optional:file:./config/node.properties,optional:file:./config/download.properties

#admin endpoint ports
server.port=10000
#topup_addresses=addr_test1qqxnp3khzm7kcj9t23hskehat7428ghsenk0pfew4rqy5v9frnmht7uwrl073q4jvq20z82kh4rksyns540azhndqexqpvhgqr:20000,\
# addr_test1qqwpl7h3g84mhr36wpetk904p7fchx2vst0z696lxk8ujsjyruqwmlsm344gfux3nsj6njyzj3ppvrqtt36cp9xyydzqzumz82:10000

#Set the path to the directory where all yaci-cli related files are stored including cardano-node binary.
#Default is the user_home/.yaci-cli
#yaci.cli.home=/Users/satya/yacicli

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

bp.create.enabled=true

## Default ports
#ogmios.port=1337
#kupo.port=1442
#yaci.store.port=8080
#socat.port=3333
#prometheus.port=12798

8 changes: 8 additions & 0 deletions applications/cli/config/download.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Please specify either the version or the full url for the following components
node.version=8.12.2
ogmios.version=6.4.0
kupo.version=2.8.0

#node.url=
#ogmios.url=
#kupo.url=
74 changes: 72 additions & 2 deletions applications/cli/config/node.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,81 @@
#protocolMagic=42
#
#disableFaucet=true
#maxKESEvolutions=60
#securityParam=300
#slotsPerKESPeriod=129600
#updateQuorum=1
#peerSharing=true

## Shelley Genesis
#maxLovelaceSupply=45000000000000000
#poolPledgeInfluence=0
#decentralisationParam=0
#eMax=18
#keyDeposit=2000000
#maxBlockBodySize=65536
#maxBlockHeaderSize=1100
#maxTxSize=16384
#minFeeA=44
#minFeeB=155381
#minPoolCost=340000000
#minUTxOValue=1000000
#nOpt=100
#poolDeposit=500000000

#protocolMajorVer=8
#protocolMinorVer=0
#monetaryExpansionRate=0.003f
#treasuryGrowthRate=0.20f

##Default addresses
#initialAddresses[0].address=addr_test1qzx9hu8j4ah3auytk0mwcupd69hpc52t0cw39a65ndrah86djs784u92a3m5w475w3w35tyd6v3qumkze80j8a6h5tuqq5xe8y
#initialAddresses[0].balance=450000000
#initialAddresses[0].staked=true
#
#initialAddresses[1].address=addr_test1qqwpl7h3g84mhr36wpetk904p7fchx2vst0z696lxk8ujsjyruqwmlsm344gfux3nsj6njyzj3ppvrqtt36cp9xyydzqzumz82
#initialAddresses[1].balance=250000000
#initialAddresses[1].staked=false

##Alonzo
#collateralPercentage=150
#prMem=5.77e-2
#prSteps=7.21e-5
#lovelacePerUTxOWord=34482
#maxBlockExUnitsMem=62000000
#maxBlockExUnitsSteps=20000000000
#maxCollateralInputs=3
#maxTxExUnitsMem=14000000
#maxTxExUnitsSteps=10000000000
#maxValueSize=5000

##Conway
#pvtcommitteeNormal=0.51f
#pvtCommitteeNoConfidence=0.51f
#pvtHardForkInitiation=0.51f
#pvtMotionNoConfidence=0.51f
#pvtPPSecurityGroup=0.51f

#dvtMotionNoConfidence=0.51f
#dvtCommitteeNormal=0.51f
#dvtCommitteeNoConfidence=0.51f
#dvtUpdateToConstitution=0.51f
#dvtHardForkInitiation=0.51f
#dvtPPNetworkGroup=0.51f
#dvtPPEconomicGroup=0.51f
#dvtPPTechnicalGroup=0.51f
#dvtPPGovGroup=0.51f
#dvtTreasuryWithdrawal=0.51f

#committeeMinSize=0
#committeeMaxTermLength=200
#govActionLifetime=10
#govActionDeposit=1000000000
#dRepDeposit=2000000
#dRepActivity=20

#constitutionScript=7713eb6a46b67bfa1ca082f2b410b0a4e502237d03f7a0b7cbf1b025
#constitutionUrl=https://devkit.yaci.xyz/constitution.json
#constitutionDataHash=f89cc2469ce31c3dfda2f3e0b56c5c8b4ee4f0e5f66c30a3f12a95298b01179e

## CC Members
#ccMembers[0].hash=scriptHash-8fc13431159fdda66347a38c55105d50d77d67abc1c368b876d52ad1
#ccMembers[0].term=340
4 changes: 2 additions & 2 deletions applications/cli/docker/download-amd64.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
file=cardano-node-8.9.2-linux.tar.gz
wget https://github.com/IntersectMBO/cardano-node/releases/download/8.9.2/cardano-node-8.9.2-linux.tar.gz
file=cardano-node-8.12.2-linux.tar.gz
wget https://github.com/IntersectMBO/cardano-node/releases/download/8.12.2/cardano-node-8.12.2-linux.tar.gz

mkdir /app/cardano-bin

Expand Down
4 changes: 2 additions & 2 deletions applications/cli/docker/download-arm64.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
file=cardano-8_9_2-aarch64-static-musl-ghc_964.tar.zst
dir=cardano-8_9_2-aarch64-static-musl-ghc_964
file=cardano-8_12_1-aarch64-static-musl-ghc_965.tar.zst
dir=cardano-8_12_1-aarch64-static-musl-ghc_965
wget https://github.com/armada-alliance/cardano-node-binaries/raw/main/static-binaries/$file?raw=true -O - | tar -I zstd -xv

#unzip $file
Expand Down
2 changes: 1 addition & 1 deletion applications/cli/docker/download-ogmios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ case $1 in
esac


version=v6.3.0
version=v6.4.0
file=ogmios-${version}-${SUFFIX}-linux.zip
wget https://github.com/CardanoSolutions/ogmios/releases/download/${version}/$file

Expand Down
9 changes: 9 additions & 0 deletions applications/cli/native-conf/proxy-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,14 @@
},
{
"interfaces":["sun.misc.SignalHandler"]
},
{
"interfaces":["com.bloxbean.cardano.client.backend.blockfrost.service.http.AddressesApi"]
},
{
"interfaces":["com.bloxbean.cardano.client.backend.blockfrost.service.http.EpochApi"]
},
{
"interfaces":["com.bloxbean.cardano.client.backend.blockfrost.service.http.TransactionApi"]
}
]
3 changes: 3 additions & 0 deletions applications/cli/native-conf/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Tracing metadata for Graalvm**

~/.sdkman/candidates/java/21.0.2-graal/bin/java -agentlib:native-image-agent=config-output-dir=. -jar yaci-cli.jar
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.bloxbean.cardano.yacicli;

import com.bloxbean.cardano.yacicli.commands.localcluster.ClusterConfig;
import com.bloxbean.cardano.yacicli.commands.localcluster.config.GenesisConfig;
import com.bloxbean.cardano.yacicli.localcluster.ClusterConfig;
import com.bloxbean.cardano.yacicli.localcluster.config.GenesisConfig;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import lombok.extern.slf4j.Slf4j;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.bloxbean.cardano.yacicli;

import com.bloxbean.cardano.yacicli.commands.localcluster.ClusterCommands;
import com.bloxbean.cardano.yacicli.commands.localcluster.ClusterInfo;
import com.bloxbean.cardano.yacicli.commands.localcluster.ClusterService;
import com.bloxbean.cardano.yacicli.localcluster.ClusterInfo;
import com.bloxbean.cardano.yacicli.localcluster.ClusterService;
import com.bloxbean.cardano.yacicli.common.CommandContext;
import lombok.RequiredArgsConstructor;
import org.jline.utils.AttributedString;
Expand All @@ -11,7 +10,7 @@
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

import static com.bloxbean.cardano.yacicli.commands.localcluster.ClusterConfig.CLUSTER_NAME;
import static com.bloxbean.cardano.yacicli.localcluster.ClusterConfig.CLUSTER_NAME;

@Component
@RequiredArgsConstructor
Expand Down
Loading

0 comments on commit f14f20f

Please sign in to comment.