diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..58f543fa --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu:18.04 + +ENV TERM=xterm + +RUN apt-get update + +RUN apt-get install -y \ + apt-utils \ + git \ + vim \ + zsh \ + iputils-ping \ + net-tools \ + netcat + +ARG LOCALE_LANG_COUNTRY="en_US" +ARG LOCALE_CODIFICATION="UTF-8" +ARG LOCALE_CODIFICATION_ENV="utf8" + +RUN git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh --depth 1 \ + && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc + +RUN apt-get install -y \ + build-essential \ + python-dev \ + g++-8 \ + gcc-8 \ + cmake \ + libboost-all-dev + +WORKDIR /releases diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 00000000..7260ea66 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,101 @@ +version: '3' + +# nc -zw3 node1 17290 && echo "opened" || echo "closed" + +# BUILD +# docker volume create cn-builds-volume + +# cmake .. -DCMAKE_BUILD_TYPE=Release -DARCH=default +# make -j6 + +# MSBuild Catalyst.sln /p:Configuration=Release /m + +# docker-compose build --force-rm --parallel build +# docker-compose run --rm --name build build + +# docker-compose run --rm --service-ports --name node1 node1 +# docker-compose run --rm --service-ports --name node2 node2 +# docker-compose run --rm --service-ports --name node3 node3 + +# docker-compose run --rm --service-ports --name miner miner + +# external miner +# ./miner --threads 4 --daemon-host fs.local --daemon-rpc-port 17251 --address cat18x93ufCQWaX4f8f2c2fZ8Ku2A4VTcgEoSpweiDbgEBF9i7YA2XGX1dSR7UbguQU5UKYEXyjfaTfnJBmRhHju26n8Y9AAFx + +services: + + build: + container_name: build + image: build:latest + build: + context: . + dockerfile: ./Dockerfile + working_dir: /releases + command: zsh + volumes: + - cn-builds-volume:/releases + + miner: + container_name: miner + image: ubuntu:18.04 + working_dir: /cat-bin + command: ./miner --threads 1 --daemon-host node3 --address cat18x93ufCQWaX4f8f2c2fZ8Ku2A4VTcgEoSpweiDbgEBF9i7YA2XGX1dSR7UbguQU5UKYEXyjfaTfnJBmRhHju26n8Y9AAFx + volumes: + - ./bin:/cat-bin + networks: + testnet: + ipv4_address: 172.16.78.5 + + node1: + container_name: node1 + image: ubuntu:18.04 + working_dir: /cat-bin + command: ./catalystd --log-level=2 --data-dir blockchain --rpc-bind-ip 0.0.0.0 --allow-local-ip + volumes: + - ./bin:/cat-bin + - ./node1-bc:/cat-bin/blockchain + networks: + testnet: + ipv4_address: 172.16.78.10 + + node2: + container_name: node2 + image: ubuntu:18.04 + working_dir: /cat-bin + command: ./catalystd --log-level=2 --data-dir blockchain --rpc-bind-ip 0.0.0.0 --allow-local-ip --add-priority-node=172.16.78.10:17290 + volumes: + - ./bin:/cat-bin + - ./node2-bc:/cat-bin/blockchain + networks: + testnet: + ipv4_address: 172.16.78.11 + + node3: + container_name: node3 + image: ubuntu:18.04 + working_dir: /cat-bin + command: ./catalystd --log-level=2 --data-dir blockchain --rpc-bind-ip 0.0.0.0 --allow-local-ip --add-priority-node=172.16.78.11:17290 + volumes: + - ./bin:/cat-bin + - ./node3-bc:/cat-bin/blockchain + networks: + testnet: + ipv4_address: 172.16.78.12 + ports: + - 17250:17290 + - 17251:17291 + expose: + - 17250 + - 17251 + +networks: + testnet: + ipam: + config: + - subnet: 172.16.78.0/24 + + + +volumes: + cn-builds-volume: + external: true diff --git a/src/config/CryptoNoteConfig.h b/src/config/CryptoNoteConfig.h index 728e31c4..cbb7f16d 100644 --- a/src/config/CryptoNoteConfig.h +++ b/src/config/CryptoNoteConfig.h @@ -129,8 +129,8 @@ namespace CryptoNote should be changed to 0 to prevent issues with transaction processing and other possible unexpected behavior */ const uint64_t TRANSACTION_SIGNATURE_COUNT_VALIDATION_HEIGHT = 170000; - const uint64_t BLOCK_BLOB_SHUFFLE_CHECK_HEIGHT = 490000; - const uint64_t TRANSACTION_INPUT_BLOCKTIME_VALIDATION_HEIGHT = 490000; + const uint64_t BLOCK_BLOB_SHUFFLE_CHECK_HEIGHT = 382000; + const uint64_t TRANSACTION_INPUT_BLOCKTIME_VALIDATION_HEIGHT = 382000; /* This describes how many blocks of "wiggle" room transactions have regarding when the outputs can be spent based on a reasonable belief that the outputs @@ -149,13 +149,16 @@ namespace CryptoNote const uint32_t UPGRADE_HEIGHT_V2 = 1; const uint32_t UPGRADE_HEIGHT_V3 = 2; const uint32_t UPGRADE_HEIGHT_V4 = 3; // Upgrade height for CN-Lite Variant 1 switch. - const uint32_t UPGRADE_HEIGHT_V5 = 489999; // Upgrade height for CN-Turtle Variant 2 switch. - const uint32_t UPGRADE_HEIGHT_V6 = 490000; // Upgrade height for Chukwa switch. - const uint32_t UPGRADE_HEIGHT_CURRENT = UPGRADE_HEIGHT_V4; + // Next upgrade current (382450) + 1 week (11520) = 394000 + const uint32_t UPGRADE_HEIGHT_V5 = 381999; // Upgrade height for CN-Turtle Variant 2 switch. + const uint32_t UPGRADE_HEIGHT_V6 = 382000; // Upgrade height for Chukwa switch. + const uint32_t UPGRADE_HEIGHT_CURRENT = UPGRADE_HEIGHT_V6; /* This value is here to handle the difficult reset needed for the PoW upgrade at block major version V6 */ - const uint64_t DIFFICULTY_RESET_HEIGHT_V1 = UPGRADE_HEIGHT_V6; + // WARNING TODO No, thank you, we will revise the reset option later. + // Let's postpone it for 1000 days from now. 1833950 + const uint64_t DIFFICULTY_RESET_HEIGHT_V1 = 1833950; const float DIFFICULTY_RESET_MULTIPLIER_V1 = 0.1; const uint64_t DIFFICULTY_RESET_WINDOW_V1 = DIFFICULTY_BLOCKS_COUNT_V3; @@ -170,7 +173,7 @@ namespace CryptoNote { 21000, // 0 170000, // 1 - 490000, // 2 + 382000, // 2 770000 // 3 }; @@ -197,7 +200,7 @@ namespace CryptoNote const char MINER_CONFIG_FILE_NAME[] = "miner_conf.json"; } // parameters - const char CRYPTONOTE_NAME[] = "Catalyst"; + const char CRYPTONOTE_NAME[] = "CatalystTestNet"; const uint8_t TRANSACTION_VERSION_1 = 1; const uint8_t TRANSACTION_VERSION_2 = 2; @@ -237,7 +240,7 @@ namespace CryptoNote // P2P Network Configuration Section - This defines our current P2P network version // and the minimum version for communication between nodes const uint8_t P2P_CURRENT_VERSION = 6; - const uint8_t P2P_MINIMUM_VERSION = 3; + const uint8_t P2P_MINIMUM_VERSION = 6; // This defines the minimum P2P version required for lite blocks propogation const uint8_t P2P_LITE_BLOCKS_PROPOGATION_VERSION = 4; @@ -266,7 +269,7 @@ namespace CryptoNote const uint32_t DATABASE_DEFAULT_MAX_OPEN_FILES = 500; // 500 files const uint16_t DATABASE_DEFAULT_BACKGROUND_THREADS_COUNT = 10; // 10 DB threads - const char LATEST_VERSION_URL[] = "http://catalystcrypto.net"; + const char LATEST_VERSION_URL[] = "http://www.cryptocatalyst.net"; const std::string LICENSE_URL = "https://github.com/catalystdevelopment/catalyst/blob/development/LICENSE"; const static boost::uuids::uuid CRYPTONOTE_NETWORK = { @@ -275,8 +278,8 @@ namespace CryptoNote }; const char* const SEED_NODES[] = { - "45.76.31.135:17290", // oddbox - "66.42.87.139:17290", - "188.166.157.115:17290" // H3R3TiK + "172.16.78.10:17290", + "172.16.78.11:17290", + "172.16.78.12:17290" }; } // CryptoNote