Skip to content

scraper, project, superblock: Implement automated greylisting #2778

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

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f6245a3
Initial machinery in project.h/cpp and blockchain.cpp for greylist st…
jamescowens Apr 28, 2024
9cda503
Scraper greylisting machinery (Part 1)
jamescowens May 1, 2024
c3c2936
Implement NotifyProjectChanged core signal
jamescowens Nov 25, 2024
322520e
Extend listprojects
jamescowens Nov 25, 2024
178b055
Enhance GUI to understand new greylisting status
jamescowens Jan 3, 2025
0daf7c1
Baseline changes for superblock v3 contracts
jamescowens Jan 4, 2025
2d05817
Initial implementation of AutoGreylist
jamescowens Jan 6, 2025
4dc35e6
Modify scraper code to accommodate all cpid total credit computation …
jamescowens Jan 7, 2025
ebf7858
Modify scraper and superblock code to support automatic greylisting (…
jamescowens Jan 12, 2025
c7ab778
Specify contract version 2 for superblocks in superblock_tests.cpp
jamescowens Jan 12, 2025
6510349
Modify scraper and superblock code (part 3)
jamescowens Jan 12, 2025
d540691
Add hidden entry for superblockv3height startup parameter for testing
jamescowens Jan 13, 2025
dc6cd75
Enhance SuperblockToJson for superblock v3
jamescowens Jan 13, 2025
79d7c3f
Add sending ProjectsAllCpidTotalCredits part to ScraperSendFileManife…
jamescowens Jan 13, 2025
8062bdd
Implement FromDoubleToString that allows specification of precision
jamescowens Jan 13, 2025
892c93c
Improve CScraperManifest::ToJson() to display project all cpid total …
jamescowens Jan 13, 2025
9c5da17
Additional changes to scraper from debugging
jamescowens Jan 13, 2025
39138cb
Changes to make clang initializer order checker happy
jamescowens Jan 13, 2025
a865103
Ensure auto greylist override in Whitelist::Snapshot doesn't modify u…
jamescowens Jan 14, 2025
1f9393e
Fix m_meets_greylisting_criteria determination
jamescowens Jan 15, 2025
406ac4a
Suppress greylisted projects on explainmagnitude output.
jamescowens Jan 15, 2025
3f93bcf
Fix NetworkWideStatsEntry initialization
jamescowens Jan 15, 2025
bba131a
Ensure AutoGreylist correctly deals with newly whitelisted projects
jamescowens Jan 15, 2025
648d97f
Add AUTO_GREYLIST_OVERRIDE to project status
jamescowens Jan 19, 2025
3efc659
Modify addkey and project constructor to deal with auto greylist over…
jamescowens Jan 19, 2025
5b9bafd
Add auto greylist update history and make other improvements
jamescowens Jan 19, 2025
69c6c4c
Wire in greylist history to getautogreylist
jamescowens Jan 19, 2025
08c1904
Change order of precedence for excluded project status in UI.
jamescowens Jan 19, 2025
16ee46e
Add documentation and other minor adjustments
jamescowens Jan 19, 2025
181c374
Change around the AutoGreylist initialization
jamescowens Jan 19, 2025
0477325
Update copyright on changed/added files.
jamescowens Jan 19, 2025
be3cfa4
Modify UpdateGreylistCandidateEntry and AutoGreylist::Reset()
jamescowens Jan 20, 2025
bb27ab8
Implement auto greylist boost unit test
jamescowens Jan 23, 2025
87563c3
Adjust vGreylistedProjects and include in convergencereport
jamescowens Jan 26, 2025
c7bb045
Add m_requires_ext_adapter to project entry and associated machinery
jamescowens Jan 26, 2025
9a4ef8c
Add version validation for superblock and project contracts
jamescowens Jan 26, 2025
9236467
Correct missing beaconChanged and researcherChanged signals in resear…
jamescowens Jan 27, 2025
7c1420a
Change iterator to reference to silence clang warning
jamescowens Feb 2, 2025
482d81e
Minor adjustments and documentation cleanup after self review
jamescowens Feb 3, 2025
d708d05
Add automated_greylisting_design_highlights.md to doc folder
jamescowens Feb 3, 2025
b8bce75
Adjust locking on Whitelist::GetProjectsFirstActive() to avoid potent…
jamescowens Feb 3, 2025
bfe4317
Correct Quorum::Hash on v3 serialized superblocks
jamescowens Feb 3, 2025
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
Prev Previous commit
Next Next commit
Update copyright on changed/added files.
  • Loading branch information
jamescowens committed Apr 8, 2025
commit 047732579b6acaaa5070b72a4399e5b6c2cefaf0
1 change: 1 addition & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2020 The Bitcoin Core developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions src/chainparams.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2020 The Bitcoin Core developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2019 The Bitcoin Core developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/beacon.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/beacon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/contract/registry_db.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/project.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/project.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/protocol.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/protocol.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/quorum.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/scraper/fwd.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/scraper/scraper.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/scraper/scraper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.
#ifndef GRIDCOIN_SCRAPER_SCRAPER_H
Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/scraper/scraper_net.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/scraper/scraper_net.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/scraper/scraper_registry.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2023 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/scraper/scraper_registry.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2023 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/sidestake.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/sidestake.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2024 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/superblock.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/gridcoin/superblock.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
3 changes: 2 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -905,7 +906,7 @@ bool AppInit2(ThreadHandlerPtr threads)
}

//6-10-2014: R Halford: Updating Boost version to 1.5.5 to prevent sync issues; print the boost version to verify:
//5-04-2018: J Owens: Boost now needs to be 1.65 or higher to avoid thread sleep problems with system clock resets.
//5-04-2018: J Owens: Boost now needs to be 1.65 or higher to avoid thread sleep problems with system clock resets.
std::string boost_version = "";
std::ostringstream s;
s << boost_version << "Using Boost "
Expand Down
2 changes: 1 addition & 1 deletion src/qt/researcher/projecttablemodel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/qt/researcher/researchermodel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/qt/researcher/researchermodel.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions src/rpc/client.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
7 changes: 4 additions & 3 deletions src/rpc/server.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -221,9 +222,9 @@ UniValue help(const UniValue& params, bool fHelp)
"developer -----> Returns help for developer commands\n"
"network -------> Returns help for network related commands\n"
"voting --------> Returns help for voting related commands\n"
"\n"
"You can support the development of Gridcoin by donating GRC to the\n"
"Gridcoin Foundation at this address: bc3NA8e8E3EoTL1qhRmeprbjWcmuoZ26A2\n";
"\n"
"You can support the development of Gridcoin by donating GRC to the\n"
"Gridcoin Foundation at this address: bc3NA8e8E3EoTL1qhRmeprbjWcmuoZ26A2\n";

// Allow to process through if params size is > 0
string strCommand;
Expand Down
1 change: 1 addition & 0 deletions src/rpc/server.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/test/gridcoin/project_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 1 addition & 1 deletion src/test/gridcoin/superblock_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2021 The Gridcoin developers
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
4 changes: 4 additions & 0 deletions src/test/test_gridcoin.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2014-2025 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

#define BOOST_TEST_MODULE Gridcoin Test Suite
#include <boost/test/unit_test.hpp>

Expand Down
1 change: 1 addition & 0 deletions src/util/string.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2019 The Bitcoin Core developers
// Copyright (c) 2025 The Gridcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down
4 changes: 4 additions & 0 deletions src/util/string.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// Copyright (c) 2019-2020 The Bitcoin Core developers
// Copyright (c) 2025 The Gridcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

// Distributed under the MIT software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.

Expand Down