136 lines
3.8 KiB
YAML
136 lines
3.8 KiB
YAML
name: solana
|
|
version: git
|
|
summary: Blockchain, Rebuilt for Scale
|
|
description: |
|
|
710,000 tx/s with off-the-shelf hardware and no sharding.
|
|
Scales with Moore's Law.
|
|
grade: devel
|
|
|
|
# TODO: solana-perf-fullnode does not yet run with 'strict' confinement due to the
|
|
# CUDA dependency, so use 'devmode' confinement for now
|
|
confinement: devmode
|
|
|
|
hooks:
|
|
configure:
|
|
plugs: [network]
|
|
|
|
apps:
|
|
drone:
|
|
command: solana-drone
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
fullnode:
|
|
command: solana-fullnode
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
- home
|
|
fullnode-cuda:
|
|
command: solana-fullnode-cuda
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
- home
|
|
fullnode-config:
|
|
command: solana-fullnode-config
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
- home
|
|
genesis:
|
|
command: solana-genesis
|
|
keygen:
|
|
command: solana-keygen
|
|
plugs:
|
|
- home
|
|
ledger-tool:
|
|
command: solana-ledger-tool
|
|
plugs:
|
|
- home
|
|
bench-tps:
|
|
command: solana-bench-tps
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
- home
|
|
wallet:
|
|
command: solana-wallet
|
|
plugs:
|
|
- network
|
|
- home
|
|
daemon-validator:
|
|
daemon: simple
|
|
command: scripts/snap-config-to-env.sh $SNAP/multinode-demo/validator.sh
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
daemon-leader:
|
|
daemon: simple
|
|
command: scripts/snap-config-to-env.sh $SNAP/multinode-demo/leader.sh
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
daemon-drone:
|
|
daemon: simple
|
|
command: scripts/snap-config-to-env.sh $SNAP/multinode-demo/drone.sh
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
daemon-oom-monitor:
|
|
daemon: simple
|
|
command: scripts/snap-config-to-env.sh $SNAP/scripts/oom-monitor.sh
|
|
plugs:
|
|
- network
|
|
daemon-net-stats:
|
|
daemon: simple
|
|
command: scripts/snap-config-to-env.sh $SNAP/scripts/net-stats.sh
|
|
plugs:
|
|
- network
|
|
|
|
parts:
|
|
solana:
|
|
plugin: nil
|
|
prime:
|
|
- bin
|
|
- multinode-demo
|
|
- scripts
|
|
- usr/lib
|
|
override-build: |
|
|
# Install CUDA 9.2 runtime
|
|
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/lib/nvidia-396/
|
|
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/lib/x86_64-linux-gnu/
|
|
cp -rav /usr/local/cuda-9.2/targets/x86_64-linux/lib/libcudart.so* $SNAPCRAFT_PART_INSTALL/usr/lib
|
|
cp -rav /usr/lib/x86_64-linux-gnu/libcuda.so* $SNAPCRAFT_PART_INSTALL/usr/lib/x86_64-linux-gnu/
|
|
cp -v /usr/lib/nvidia-396/libnvidia-fatbinaryloader.so* $SNAPCRAFT_PART_INSTALL/usr/lib/nvidia-396/
|
|
|
|
# Build/install solana-fullnode-cuda
|
|
./fetch-perf-libs.sh
|
|
cargo install --features=cuda --root $SNAPCRAFT_PART_INSTALL --bin solana-fullnode
|
|
mv $SNAPCRAFT_PART_INSTALL/bin/solana-fullnode $SNAPCRAFT_PART_INSTALL
|
|
rm -rf $SNAPCRAFT_PART_INSTALL/bin/*
|
|
mv $SNAPCRAFT_PART_INSTALL/solana-fullnode $SNAPCRAFT_PART_INSTALL/bin/solana-fullnode-cuda
|
|
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/lib/
|
|
cp -f target/perf-libs/libJerasure.so $SNAPCRAFT_PART_INSTALL/usr/lib/libJerasure.so.2
|
|
cp -f target/perf-libs/libgf_complete.so $SNAPCRAFT_PART_INSTALL/usr/lib/libgf_complete.so.1
|
|
|
|
# Build/install all other programs
|
|
cargo install --root $SNAPCRAFT_PART_INSTALL --bins
|
|
|
|
# Install multinode-demo/
|
|
mkdir -p $SNAPCRAFT_PART_INSTALL/multinode-demo/
|
|
cp -av multinode-demo/* $SNAPCRAFT_PART_INSTALL/multinode-demo/
|
|
|
|
# Install scripts/
|
|
mkdir -p $SNAPCRAFT_PART_INSTALL/scripts/
|
|
cp -av scripts/* $SNAPCRAFT_PART_INSTALL/scripts/
|
|
|
|
# TODO: build curl,dig,rsync/multilog from source instead of sneaking it
|
|
# in from the host system...
|
|
set -x
|
|
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
|
|
cp -av /usr/bin/curl $SNAPCRAFT_PART_INSTALL/bin/
|
|
cp -av /usr/bin/dig $SNAPCRAFT_PART_INSTALL/bin/
|
|
cp -av /usr/bin/multilog $SNAPCRAFT_PART_INSTALL/bin/
|
|
cp -av /usr/bin/rsync $SNAPCRAFT_PART_INSTALL/bin/
|