Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change some additional leap references to spring #104

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/finality/finalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void my_finalizers_t::set_keys(const std::map<std::string, std::string>& 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.
Expand Down
4 changes: 2 additions & 2 deletions libraries/chain/include/eosio/chain/finality/finalizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
// ---------------
Expand Down Expand Up @@ -77,7 +77,7 @@ namespace eosio::chain {
mutable fc::datastream<fc::cfile> persist_file; // we want to keep the file open for speed
std::map<bls_public_key, finalizer> 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:
Expand Down
6 changes: 3 additions & 3 deletions libraries/libfc/include/fc/crypto/base64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ RetString base64_decode(const String& s, bool remove_linebreaks = false, bool ur
template <typename RetString = std::string>
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<char> base64_decode( const std::string& s);
Expand Down Expand Up @@ -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");
}

Expand Down Expand Up @@ -349,7 +349,7 @@ inline RetString base64_encode_mime(const String& s) {
return detail::encode_mime<RetString, String>(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<std::string>((unsigned char const*)s, len, false);
}
Expand Down
2 changes: 1 addition & 1 deletion unittests/snapshot_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading