From bff42b7d2abc2cfedd24f36c63aef2be95fd3266 Mon Sep 17 00:00:00 2001 From: Shashank Agarwal <162678882+shashankagarwalgit@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:01:18 +0530 Subject: [PATCH 1/4] Create cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 39 +++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/cmake-single-platform.yml diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml new file mode 100644 index 0000000000..4bd1c79b48 --- /dev/null +++ b/.github/workflows/cmake-single-platform.yml @@ -0,0 +1,39 @@ +# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml +name: CMake on a single platform + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + From 1466065a69d44e7a91cf57758621a44109cc05a1 Mon Sep 17 00:00:00 2001 From: Shashank Agarwal <162678882+shashankagarwalgit@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:02:43 +0530 Subject: [PATCH 2/4] Delete .github/workflows/cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 39 --------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/cmake-single-platform.yml diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml deleted file mode 100644 index 4bd1c79b48..0000000000 --- a/.github/workflows/cmake-single-platform.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml -name: CMake on a single platform - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - -jobs: - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}} - From 6152c51acb143a7b92ae32de24ef1319e309e8a9 Mon Sep 17 00:00:00 2001 From: Shashank Agarwal <162678882+shashankagarwalgit@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:07:35 +0530 Subject: [PATCH 3/4] Update CryptoNoteConfig.h --- src/CryptoNoteConfig.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/CryptoNoteConfig.h b/src/CryptoNoteConfig.h index 4506f667c9..1e1b6f9273 100644 --- a/src/CryptoNoteConfig.h +++ b/src/CryptoNoteConfig.h @@ -24,8 +24,8 @@ const size_t BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW = 60; //TODO Specify total number of available coins //TODO ((uint64_t)(-1)) equals to 18446744073709551616 coins //TODO or you can define number explicitly UINT64_C(858986905600000000) -const uint64_t MONEY_SUPPLY = ; -const unsigned EMISSION_SPEED_FACTOR = 18; +const uint64_t MONEY_SUPPLY = (uint64_t)(-1); +const unsigned EMISSION_SPEED_FACTOR = 21; static_assert(EMISSION_SPEED_FACTOR <= 8 * sizeof(uint64_t), "Bad EMISSION_SPEED_FACTOR"); //TODO Define number of blocks for block size median calculation @@ -35,11 +35,11 @@ const size_t CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE = 600; //TODO Define number of digits const size_t CRYPTONOTE_DISPLAY_DECIMAL_POINT = 8; //TODO Define minimum fee for transactions -const uint64_t MINIMUM_FEE = ; +const uint64_t MINIMUM_FEE = 100000; const uint64_t DEFAULT_DUST_THRESHOLD = MINIMUM_FEE; //TODO Define preferred block's target time -const uint64_t DIFFICULTY_TARGET = 120; // seconds +const uint64_t DIFFICULTY_TARGET = 91; // seconds const uint64_t EXPECTED_NUMBER_OF_BLOCKS_PER_DAY = 24 * 60 * 60 / DIFFICULTY_TARGET; //TODO There are options to tune CryptoNote's difficulty retargeting function. //TODO We recommend not to change it. @@ -73,7 +73,7 @@ const char MINER_CONFIG_FILE_NAME[] = "miner_conf.json" } // parameters //TODO Put here the name of your currency -const char CRYPTONOTE_NAME[] = ""; +const char CRYPTONOTE_NAME[] = "shacoin"; const char GENESIS_COINBASE_TX_HEX[] = ""; const uint8_t CURRENT_TRANSACTION_VERSION = 1; @@ -83,11 +83,12 @@ const uint8_t BLOCK_MINOR_VERSION_0 = 0; const size_t BLOCKS_IDS_SYNCHRONIZING_DEFAULT_COUNT = 10000; //by default, blocks ids count in synchronizing const size_t BLOCKS_SYNCHRONIZING_DEFAULT_COUNT = 200; //by default, blocks count in blocks downloading const size_t COMMAND_RPC_GET_BLOCKS_FAST_MAX_COUNT = 1000; +const uint64_t CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 0x2b; //TODO This port will be used by the daemon to establish connections with p2p network -const int P2P_DEFAULT_PORT = ; +const int P2P_DEFAULT_PORT = 17236; //TODO This port will be used by the daemon to interact with simlewallet -const int RPC_DEFAULT_PORT = ; +const int RPC_DEFAULT_PORT = 18236; const size_t P2P_LOCAL_WHITE_PEERLIST_LIMIT = 1000; const size_t P2P_LOCAL_GRAY_PEERLIST_LIMIT = 5000; @@ -106,7 +107,7 @@ const char P2P_STAT_TRUSTED_PUB_KEY[] = "8f80f9a5a434a9f1 //TODO Add here your network seed nodes const std::initializer_list SEED_NODES = { - //"your_seed_ip1.com:8080", + "172.24.55.86:17236", //"your_seed_ip2.com:8080", }; From d44b93d86c4e8dcfa4528e9631b079ade54788fe Mon Sep 17 00:00:00 2001 From: Shashank Agarwal <162678882+shashankagarwalgit@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:07:58 +0530 Subject: [PATCH 4/4] Update CMakeLists.txt --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b02ec2896e..d37684b238 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -80,4 +80,4 @@ set_property(TARGET SimpleWallet PROPERTY OUTPUT_NAME "simplewallet") set_property(TARGET PaymentGateService PROPERTY OUTPUT_NAME "walletd") set_property(TARGET Miner PROPERTY OUTPUT_NAME "miner") #TODO Specify the name of daemon for your currency -set_property(TARGET Daemon PROPERTY OUTPUT_NAME "cryptonoted") +set_property(TARGET Daemon PROPERTY OUTPUT_NAME "shacoind")