Skip to content

Commit

Permalink
Round Voting - updates from PR, fixed minor typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeIsTheKey committed Mar 1, 2024
1 parent b61208c commit 44a83a6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 24 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ jobs:
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
cp src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
Expand All @@ -103,7 +103,7 @@ jobs:
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-tests --enable-debug
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
Expand Down Expand Up @@ -227,8 +227,8 @@ jobs:
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
cp src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
Expand All @@ -240,7 +240,7 @@ jobs:
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-tests --enable-debug
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
run: |
brew install automake libtool pkg-config miniupnpc librsvg libnatpmp zeromq python
pip3 install ds_store mac_alias
pip3 install -U pip setuptools
pip3 install -U pip setuptools
- name: Build Depends
run: |
Expand All @@ -362,8 +362,8 @@ jobs:
run: |
make -j8
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
cp src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum ${TEST_DIR}
strip ${BUILD_DIR}/*
Expand Down Expand Up @@ -490,7 +490,7 @@ jobs:
# run: |
# make -j$(nproc)
# mkdir -p ${BUILD_DIR} ${TEST_DIR}
# mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
# mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
# mv src/test/test_raptoreum ${TEST_DIR}

# - name: Build Debug Binaries
Expand All @@ -501,7 +501,7 @@ jobs:
# ./configure --prefix=`pwd`/depends/arm-linux-gnueabihf --disable-tests --enable-debug
# make -j$(nproc)
# mkdir -p ${BUILD_DIR}_debug
# mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
# mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/

# - name: Generate Checksum and Compress
# run: |
Expand Down Expand Up @@ -618,7 +618,7 @@ jobs:
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${TEST_DIR}
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}/
mv src/test/test_raptoreum ${TEST_DIR}/
- name: Build Debug Binaries
Expand All @@ -629,7 +629,7 @@ jobs:
./configure --prefix=`pwd`/depends/aarch64-linux-gnu --disable-tests --enable-debug
make -j$(nproc)
mkdir -p ${BUILD_DIR}_debug
mv src/{raptoreum-cli,raptoreum-tx,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
mv src/{raptoreum-cli,raptoreumd,qt/raptoreum-qt} ${BUILD_DIR}_debug/
- name: Generate Checksum and Compress
run: |
Expand Down Expand Up @@ -750,8 +750,8 @@ jobs:
run: |
make -j$(nproc)
mkdir -p ${BUILD_DIR} ${BUILD_DIR}_not_strip ${TEST_DIR}
cp src/{raptoreum-cli.exe,raptoreum-tx.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}/
mv src/{raptoreum-cli.exe,raptoreum-tx.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}_not_strip/
cp src/{raptoreum-cli.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}/
mv src/{raptoreum-cli.exe,raptoreumd.exe,qt/raptoreum-qt.exe} ${BUILD_DIR}_not_strip/
mv src/test/test_raptoreum.exe ${TEST_DIR}
strip ${BUILD_DIR}/*
Expand Down
4 changes: 2 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class CMainParams : public CChainParams {
// TODO: JB Need to test these values on mainnet
UpdateManager::Instance().Add
( // Blocks 419329-427391 have version bit set in mainnet, 4031 voting, 4031 grace period
Update(EUpdate::DEPLOYMENT_V17, std::string("v17"), 0, 1, 419329, 4031, 3, 4031, false, VoteThreshold(80, 60, 5), VoteThreshold(0, 0, 1))
Update(EUpdate::DEPLOYMENT_V17, std::string("v17"), 0, 1, 419329, 4031, 12093, 4031, false, VoteThreshold(80, 60, 5), VoteThreshold(0, 0, 1))
);
// UpdateManager::Instance().Add
// (
Expand Down Expand Up @@ -535,7 +535,7 @@ class CDevNetParams : public CChainParams {
(
Update(EUpdate::ROUND_VOTING, std::string("Round Voting"), 1, 100, 2000, 5, 10, 5, false, VoteThreshold(85, 85, 1), VoteThreshold(0, 0, 1))
);

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000000000000000");

Expand Down
2 changes: 1 addition & 1 deletion src/llmq/quorums_commitment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace llmq {

uint256 commitmentHash;
if (UpdateManager::Instance().IsActive(EUpdate::ROUND_VOTING, pQuorumBaseBlockIndex)) {
commitmentHash = CLLMQUtils::BuildCommitmentHash(llmqType, quorumHash, validMembers, quorumUpdateVotes, quorumPublicKey, quorumVvecHash);
commitmentHash = CLLMQUtils::BuildCommitmentHash(llmq_params.type, quorumHash, validMembers, quorumUpdateVotes, quorumPublicKey, quorumVvecHash);
}
else {
commitmentHash = CLLMQUtils::BuildCommitmentHash(llmq_params.type, quorumHash, validMembers, quorumPublicKey, quorumVvecHash);
Expand Down
2 changes: 1 addition & 1 deletion src/update/update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ UpdateManager::~UpdateManager() {};

bool UpdateManager::Add(Update update)
{
// Check for existence first and erase if exist
auto it = updates.find(update.UpdateId());
if (it != updates.end())
updates.erase(it);
// TODO: Check for existence first
updates.emplace(update.UpdateId(), update);
// LogPrint(BCLog::UPDATES, "Updates: UpdateManager Added: %s\n", update.ToString());
LogPrintf("Updates: UpdateManager Added: %s\n", update.ToString());
Expand Down
7 changes: 3 additions & 4 deletions src/update/update.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum class EUpdate
{
DEPLOYMENT_V17 = 0,
ROUND_VOTING = 1,

MAX_VERSION_BITS_DEPLOYMENTS
};

Expand Down Expand Up @@ -105,9 +105,8 @@ class Update
(votingMaxRounds < 1) ||
(graceRounds < 0) ||
(heightActivated < -1) ||
(startHeight % roundSize != 0)/*
//disabled or wont start, need to verify the mainnet update parameter ||
(votingPeriod > votingMaxRounds)*/
(startHeight % roundSize != 0) ||
(votingPeriod > votingMaxRounds)
)
{
throw std::invalid_argument("Invalid argument(s) for Update " + name);
Expand Down
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5099,7 +5099,7 @@ bool ChainstateManager::LoadBlockIndex(const CChainParams &chainparams) {
fAddressIndex = gArgs.GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX);
pblocktree->WriteFlag("addressindex", fAddressIndex);

// Use the provided setting for -addressindex in the new database
// Use the provided setting for -assetindex in the new database
fAssetIndex = gArgs.GetBoolArg("-assetindex", DEFAULT_ASSETINDEX);
pblocktree->WriteFlag("assetindex", fAssetIndex);

Expand Down

0 comments on commit 44a83a6

Please sign in to comment.