From 78c6c19876eef98be786ea967153bae4511d81fe Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 2 May 2024 12:17:56 -0500 Subject: [PATCH 1/2] GH-97 Change some additional leap references to spring --- .github/workflows/build.yaml | 4 ++-- libraries/chain/finality/finalizer.cpp | 2 +- libraries/chain/include/eosio/chain/finality/finalizer.hpp | 4 ++-- libraries/libfc/include/fc/crypto/base64.hpp | 6 +++--- unittests/snapshot_tests.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7e06f61147..cb74a40886 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -285,9 +285,9 @@ jobs: run: | zstdcat build.tar.zst | tar x - if: ${{ matrix.test == 'build-tree' }} - name: Set leap_DIR env var + name: Set spring_DIR env var run: | - echo "leap_DIR=$PWD/build/lib/cmake/leap" >> "$GITHUB_ENV" + echo "spring_DIR=$PWD/build/lib/cmake/spring" >> "$GITHUB_ENV" - if: ${{ matrix.test == 'make-dev-install' }} name: spring dev-install run: | diff --git a/libraries/chain/finality/finalizer.cpp b/libraries/chain/finality/finalizer.cpp index bb3a4fbc2c..35100dd805 100644 --- a/libraries/chain/finality/finalizer.cpp +++ b/libraries/chain/finality/finalizer.cpp @@ -232,7 +232,7 @@ void my_finalizers_t::set_keys(const std::map& finaliz // -------------------------------------------------------------------------------------------- // Can be called either: // - when transitioning to IF (before any votes are to be sent) -// - at leap startup, if we start at a block which is either within or past the IF transition. +// - at spring startup, if we start at a block which is either within or past the IF transition. // In either case, we are never updating existing finalizer safety information. This is only // to ensure that the safety information will have defaults that ensure safety as much as // possible, and allow for liveness which will allow the finalizers to eventually vote. diff --git a/libraries/chain/include/eosio/chain/finality/finalizer.hpp b/libraries/chain/include/eosio/chain/finality/finalizer.hpp index fec83366be..eb965b2ddc 100644 --- a/libraries/chain/include/eosio/chain/finality/finalizer.hpp +++ b/libraries/chain/include/eosio/chain/finality/finalizer.hpp @@ -18,7 +18,7 @@ // are an essential part of the Savanna consensus algorithm. // - every time a finalizer votes, it may update its own safety info in memory // - finalizer safety info is appropriately initialized (iff not already present -// in the persistent file) at Leap startup. +// in the persistent file) at Spring startup. // // my_finalizers_t: // --------------- @@ -77,7 +77,7 @@ namespace eosio::chain { mutable fc::datastream persist_file; // we want to keep the file open for speed std::map finalizers; // the active finalizers for this node, loaded at startup, not mutated afterwards fsi_map inactive_safety_info; // loaded at startup, not mutated afterwards - fsi_t default_fsi = fsi_t::unset_fsi(); // default provided at leap startup + fsi_t default_fsi = fsi_t::unset_fsi(); // default provided at spring startup mutable bool inactive_safety_info_written{false}; public: diff --git a/libraries/libfc/include/fc/crypto/base64.hpp b/libraries/libfc/include/fc/crypto/base64.hpp index 5e025fdc0f..3edee59033 100644 --- a/libraries/libfc/include/fc/crypto/base64.hpp +++ b/libraries/libfc/include/fc/crypto/base64.hpp @@ -75,7 +75,7 @@ RetString base64_decode(const String& s, bool remove_linebreaks = false, bool ur template RetString base64_encode(const unsigned char* s, size_t len, bool url = false); -// Convenient methods for existing Leap uses +// Convenient methods for existing Spring uses std::string base64_encode(char const* s, unsigned int len); std::vector base64_decode( const std::string& s); @@ -150,7 +150,7 @@ inline unsigned int pos_of_char(const unsigned char chr, bool url) { //(Pablo Martin-Gomez, https://github.com/Bouska) // // Original version throw std::runtime_error("Input is not valid base64-encoded data."); - // Throw FC assert and the same error text to match existing Leap usages. + // Throw FC assert and the same error text to match existing Spring usages. FC_ASSERT(false, "encountered non-base64 character"); } @@ -349,7 +349,7 @@ inline RetString base64_encode_mime(const String& s) { return detail::encode_mime(s); } -// Convenient methods for existing Leap uses +// Convenient methods for existing Spring uses inline std::string base64_encode(char const* s, unsigned int len) { return base64_encode((unsigned char const*)s, len, false); } diff --git a/unittests/snapshot_tests.cpp b/unittests/snapshot_tests.cpp index d4ac1646bb..ac2654b851 100644 --- a/unittests/snapshot_tests.cpp +++ b/unittests/snapshot_tests.cpp @@ -449,7 +449,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(test_compatible_versions, SNAPSHOT_SUITE, snapshot // ---------------------------------------------------------- // 1. update `current_version` and the list of versions in `for` loop // 2. run: `unittests/unit_test -t "snapshot_tests/test_com*" -- --save-snapshot` to generate new snapshot files - // 3. copy the newly generated files (see `ls -lrth ./unittests/snapshots/snap_*` to `leap/unittests/snapshots` + // 3. copy the newly generated files (see `ls -lrth ./unittests/snapshots/snap_*` to `spring/unittests/snapshots` // for example `cp ./unittests/snapshots/snap_v7.* ../unittests/snapshots` // 4. edit `unittests/snapshots/CMakeLists.txt` and add the `configure_file` commands for the 3 new files. // now the test should pass. From 59861d97340d4da1c4319578debdac3a41c95aa7 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 2 May 2024 15:07:20 -0500 Subject: [PATCH 2/2] GH-97 Reference contracts updated to use Spring --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cb74a40886..65014cfbf7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -336,7 +336,7 @@ jobs: apt-get -y install cmake build-essential - name: Build & Test reference-contracts run: | - cmake -S reference-contracts -B reference-contracts/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On -DSYSTEM_ENABLE_LEAP_VERSION_CHECK=Off -DSYSTEM_ENABLE_CDT_VERSION_CHECK=Off + cmake -S reference-contracts -B reference-contracts/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On -DSYSTEM_ENABLE_SPRING_VERSION_CHECK=Off -DSYSTEM_ENABLE_CDT_VERSION_CHECK=Off cmake --build reference-contracts/build -- -j $(nproc) cd reference-contracts/build/tests ctest --output-on-failure -j $(nproc)