diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ad835bc34..000000000 --- a/Dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -FROM ubuntu:jammy - -RUN apt-get update -RUN apt-get install --no-install-recommends -yq software-properties-common -RUN apt-get update -RUN apt-get install --no-install-recommends -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget curl sudo git - -# NOTICE: we need to install SSL 1.1 manually here in order to make BLS command line tools working -RUN echo "deb http://security.ubuntu.com/ubuntu focal-security main" | tee /etc/apt/sources.list.d/focal-security.list -RUN apt-get update -RUN apt-get install --no-install-recommends -y libssl1.1 -# NOTICE: to remove extra dep above: sudo rm /etc/apt/sources.list.d/focal-security.list - -RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -RUN apt-get install --no-install-recommends -y nodejs -RUN npm install npm --global -RUN npm install --global yarn -RUN npm --version -RUN yarn --version - -RUN curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz -RUN tar -xf Python-3.7.3.tar.xz -RUN cd Python-3.7.3; ./configure --enable-optimizations; make -j 4 build_all; make altinstall; cd .. -RUN python3.7 --version -RUN which python3.7 -RUN rm -f /usr/bin/python3 -RUN ln -s /usr/local/bin/python3.7 /usr/bin/python3 -RUN python3 --version -RUN which python3 - -RUN mkdir /ima -WORKDIR /ima - -COPY proxy proxy -COPY agent agent -COPY npms npms -COPY postinstall.sh postinstall.sh -COPY package.json package.json -COPY VERSION VERSION - -RUN mkdir /ima/bls_binaries -COPY scripts/bls_binaries /ima/bls_binaries - -RUN chmod +x /ima/bls_binaries/bls_glue -RUN chmod +x /ima/bls_binaries/hash_g1 -RUN chmod +x /ima/bls_binaries/verify_bls - -RUN npm install -g node-gyp -RUN which node-gyp -RUN node-gyp --version - -WORKDIR /ima -RUN yarn install - -CMD ["bash", "/ima/agent/run.sh"] diff --git a/VERSION b/VERSION index 227cea215..276cbf9e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 +2.3.0 diff --git a/scripts/bls_binaries/.keep b/scripts/bls_binaries/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/build_image.sh b/scripts/build_image.sh deleted file mode 100755 index 7b10d9f4d..000000000 --- a/scripts/build_image.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -if [ -z "$VERSION" ] -then - echo "No VERSION provided, exiting" - exit 1 -fi -DOCKER_USERNAME=$1 -DOCKER_PASSWORD=$2 - -NAME=ima -REPO_NAME=skalenetwork/$NAME -IMAGE_NAME=$REPO_NAME:$VERSION -LATEST_IMAGE_NAME=$REPO_NAME:latest - -if [ -z "$SKIP_BUILD" ] -then - - docker build -t "$IMAGE_NAME" . || exit $? - - if [ "$RELEASE" = true ] - then - docker tag "$IMAGE_NAME" "$LATEST_IMAGE_NAME" - fi -fi - -if [[ ! -z "$DOCKER_USERNAME" ]] -then - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin - docker push "$IMAGE_NAME" || exit $? - if [ "$RELEASE" = true ] - then - docker push $LATEST_IMAGE_NAME || exit $? - fi -fi diff --git a/scripts/calculate_version.sh b/scripts/calculate_version.sh deleted file mode 100755 index 96860215a..000000000 --- a/scripts/calculate_version.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -VERSION=$(cat VERSION) -USAGE_MSG='Usage: BRANCH=[BRANCH] calculate_version.sh' - -if [ -z "$BRANCH" ] -then - (>&2 echo 'You should provide branch') - echo "$USAGE_MSG" - exit 1 -fi - - -if [ -z "$VERSION" ]; then - echo "The base version is not set." - exit 1 -fi - -if [[ $BRANCH == 'stable' ]]; then - echo "$VERSION" - exit 1 -fi - -git fetch --tags > /dev/null - -TAG=$BRANCH -if [[ $BRANCH == v*.*.* ]]; then TAG='develop'; fi - -for (( NUMBER=0; ; NUMBER++ )) -do - FULL_VERSION="$VERSION-$TAG.$NUMBER" - if ! [[ $(git tag -l | grep "$FULL_VERSION") ]]; then - echo "$FULL_VERSION" | tr / - - break - fi -done diff --git a/scripts/config_from_accounts.py b/scripts/config_from_accounts.py deleted file mode 100644 index ac19dc5f8..000000000 --- a/scripts/config_from_accounts.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python3 - -# SPDX-License-Identifier: AGPL-3.0-only - -# -*- coding: utf-8 -*- -# -# This file is part of SKALE IMA. -# -# Copyright (C) 2019-Present SKALE Labs -# -# SKALE IMA is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# SKALE IMA is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with SKALE IMA. If not, see . - -from sys import argv -import json - -def main(): - if len(argv) < 2: - print('Usage: config_from_accounts.py {file with accounts} {target config file}') - exit(1) - - accounts_filename, config_filename = argv[1], argv[2] - with open(accounts_filename) as accounts_file: - accounts = json.load(accounts_file) - addresses = list(accounts['private_keys'].keys()) - config = {'PRIVATE_KEY_FOR_ETHEREUM': accounts['private_keys'][addresses[0]], - 'PRIVATE_KEY_FOR_SCHAIN': accounts['private_keys'][addresses[1]]} - with open(config_filename, 'w') as config_file: - json.dump(config, config_file) - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/scripts/download_binaries.sh b/scripts/download_binaries.sh deleted file mode 100644 index cb588ead9..000000000 --- a/scripts/download_binaries.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -: "${LIB_BLS_RELEASE_TAG?Need to set LIB_BLS_RELEASE_TAG}" - -BASE_URL="https://github.com/skalenetwork/libBLS/releases/download" - -BLS_GLUE_URL=$BASE_URL/$LIB_BLS_RELEASE_TAG/bls_glue -HASH_G1_URL=$BASE_URL/$LIB_BLS_RELEASE_TAG/hash_g1 -BLS_VERIFY_URL=$BASE_URL/$LIB_BLS_RELEASE_TAG/verify_bls - -echo "Downloading BLS binaries..." -curl -L "$BLS_GLUE_URL" > "$DIR/bls_binaries/bls_glue" -curl -L "$HASH_G1_URL" > "$DIR/bls_binaries/hash_g1" -curl -L "$BLS_VERIFY_URL" > "$DIR/bls_binaries/verify_bls"