Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Feature privacy #10267

Merged
merged 194 commits into from
Apr 30, 2021
Merged
Changes from 1 commit
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
a0b6ad9
extend block_header_state
huangminghuang Feb 26, 2021
c4a4490
Changes for PR comments
huangminghuang Mar 1, 2021
9902181
Merge pull request #10096 from EOSIO/huangminghuang/bhs-extension
brianjohnson5972 Mar 1, 2021
97d3925
Changed to use the version from chain_snapshot_header
huangminghuang Mar 1, 2021
37cfa92
add global_property_object extension
huangminghuang Mar 2, 2021
f2fc7b5
EPE-672: Added unit test framework
rusty-block-one Mar 5, 2021
5fd0176
EPE-672: unittest
rusty-block-one Mar 5, 2021
9cbb2bf
add/remove participants
huangminghuang Mar 4, 2021
ef52336
EPE-672: Feedback changes
rusty-block-one Mar 5, 2021
afd5601
Merge branch 'huangminghuang/security-group-change' into hook-registr…
victorj8 Mar 8, 2021
de8be5d
Merge pull request #10112 from EOSIO/unittest
brianjohnson5972 Mar 8, 2021
cf36ebf
EPE-721: Add connection management
rusty-block-one Mar 4, 2021
992ef2b
EPE-672: add security group
rusty-block-one Mar 8, 2021
efeef44
implements security group intrinsics
huangminghuang Mar 8, 2021
ddb6310
add snapshot recovery test
huangminghuang Mar 8, 2021
68a3f79
add contract/action callback field to global properties
victorj8 Mar 8, 2021
51f6d91
wip
rusty-block-one Mar 8, 2021
ded04b8
add default constructor for snapshot_global_property_object::extensio…
huangminghuang Mar 8, 2021
23a5024
EPE-672: Review feedback
rusty-block-one Mar 9, 2021
075caf0
Merge branch 'security-group' into EPE-721
rusty-block-one Mar 9, 2021
ca764ad
another workaround for libstdc++ bug
huangminghuang Mar 9, 2021
5568071
certificate generation scripts for tests added
Mar 9, 2021
d52a711
fix protocol feature digest
huangminghuang Mar 9, 2021
d19ac12
Merge branch 'huangminghuang/security-group-intrinsics' into hook-reg…
victorj8 Mar 9, 2021
92348a5
add some constructors for extension_v1 required by libstdc++
victorj8 Mar 9, 2021
299f2bd
wip
rusty-block-one Mar 9, 2021
0ae40c8
Merge pull request #10118 from EOSIO/privacy-tests-cert-setup
brianjohnson5972 Mar 9, 2021
b367d71
EPE-672: Review feedback
rusty-block-one Mar 9, 2021
32c17d3
change recover from state commit
huangminghuang Mar 9, 2021
b8c20a4
wip
rusty-block-one Mar 9, 2021
b3a9627
fix a reflection problem with global_property_object
victorj8 Mar 9, 2021
d089a31
update commit for resume from state test
victorj8 Mar 9, 2021
8f70735
Merge pull request #10115 from EOSIO/security-group
rusty-block-one Mar 9, 2021
66b8e46
wip
rusty-block-one Mar 9, 2021
5e979dd
Merge branch 'feature-privacy' into EPE-721
rusty-block-one Mar 9, 2021
78c5a6b
tls options added to net_plugin
Mar 10, 2021
1ecfaaf
renamed command line options
Mar 10, 2021
7974437
EPE-672: Add security group to net_plugin
rusty-block-one Mar 10, 2021
bca9344
comments updates after net_plugin options rename
Mar 10, 2021
1fb0f20
Merge pull request #10121 from EOSIO/net-plugin-tls
brianjohnson5972 Mar 10, 2021
135391c
address PR comments & add contract test
huangminghuang Mar 10, 2021
bb2c620
Merge pull request #10116 from EOSIO/huangminghuang/security-group-in…
brianjohnson5972 Mar 11, 2021
18884d6
PR Feedback changes
rusty-block-one Mar 11, 2021
66e43ad
delete extension_v1 struct from snapshot_global_property_object
victorj8 Mar 11, 2021
c9aca34
PR Feedback for net_plugin security group message handling
rusty-block-one Mar 11, 2021
d1bc614
Fix security_group_manager unit test
rusty-block-one Mar 11, 2021
23da2a8
Changed --help to display and exit and changed range of files names t…
brianjohnson5972 Mar 11, 2021
32648b0
changing certificate generation script naming
Mar 12, 2021
430bc65
PR Feedback for net_plugin security group message handling
rusty-block-one Mar 12, 2021
ae8921a
PR Feedback for net_plugin security group message handling
rusty-block-one Mar 12, 2021
37ae91d
Merge pull request #10122 from EOSIO/EPE-721
rusty-block-one Mar 12, 2021
37ca095
Merge branch 'develop' into feature-privacy
huangminghuang Mar 12, 2021
7ebb035
Merge branch 'develop' into transaction-sponsorship
Mar 12, 2021
bfdde96
Added a flag to configure the cluster for security groups.
brianjohnson5972 Mar 12, 2021
0029b50
added ec option to test certificates generation
Mar 14, 2021
b879e11
Changed eosio-launcher to treat bios as -1 for spec*-num parameters.
brianjohnson5972 Mar 15, 2021
36d1f9c
Added providing node mapping to topo parameter to select the exact co…
brianjohnson5972 Mar 16, 2021
d48ea78
Merge remote-tracking branch 'origin/transaction-sponsorship' into hu…
huangminghuang Mar 16, 2021
fa9581c
update ship protocol for global property changes
huangminghuang Mar 16, 2021
d76726c
update resume from state commit
huangminghuang Mar 16, 2021
f08d963
changes in the middle of implementation
Mar 16, 2021
91d2cf5
Fixed code for unreported nodes in custom shaped topology.
brianjohnson5972 Mar 16, 2021
13ee62a
Added the privacy_startup_network test script.
brianjohnson5972 Mar 16, 2021
ae13158
partial TLS implementation of net plugin
Mar 17, 2021
c80ef87
address PR comments
huangminghuang Mar 17, 2021
4e64869
Fixed number ordering of producers and relay nodes and topology confi…
brianjohnson5972 Mar 17, 2021
feee04b
Only currently working for 1 producer, will investigate and fix later.
brianjohnson5972 Mar 17, 2021
9c0ae25
Added passing pnodes to launch.
brianjohnson5972 Mar 17, 2021
5178148
Merge pull request #10142 from EOSIO/huangminghuang/ship-gpo
brianjohnson5972 Mar 17, 2021
f2bdbf4
Peer review comment fixes.
brianjohnson5972 Mar 17, 2021
c571480
Missed changing parameter name in last fix.
brianjohnson5972 Mar 18, 2021
76ff2f2
Merge remote-tracking branch 'origin/feature-privacy' into bdj__priva…
brianjohnson5972 Mar 18, 2021
7bd4fc3
Fixed path to generated certificates.
brianjohnson5972 Mar 18, 2021
8e495b2
Changed to use with idiom for opening files and removed python 2 stri…
brianjohnson5972 Mar 18, 2021
82a7256
security groups implementation added to net plugin
Mar 18, 2021
045f6dc
Merge pull request #10153 from EOSIO/bdj__privacy-integration-test_EP…
brianjohnson5972 Mar 18, 2021
1a1e6dd
Fixed file number for bios.
brianjohnson5972 Mar 18, 2021
cd45058
Merge pull request #10159 from EOSIO/bdj__privacy-integration-test-fi…
brianjohnson5972 Mar 18, 2021
e853a86
Moved useful protocol feature methods into Node.py.
brianjohnson5972 Mar 18, 2021
26b4c86
Activating the SECURITY_GROUP protocol feature.
brianjohnson5972 Mar 18, 2021
a1a63b2
bfs added to command line parameters
Mar 19, 2021
c7f63b1
Merge branch 'feature-privacy' into tls-net-plugin-impl
Mar 19, 2021
01b56ef
change of commandline parameter in tests
Mar 19, 2021
fccc758
optimization & bugfixes in net_plugin
Mar 19, 2021
d56ba12
bugfixes + refactoring of net plugin
Mar 23, 2021
b4cd62e
bugfixes to net_plugin tls and tests
Mar 25, 2021
e7f2276
Minor changes to add accounts and load contract to exercise security …
brianjohnson5972 Mar 29, 2021
7187129
Change configSecurityGroup to automatically NOT use the bios bootfile…
brianjohnson5972 Mar 29, 2021
32f4e47
Merge remote-tracking branch 'origin/feature-privacy' into bdj__priva…
brianjohnson5972 Mar 29, 2021
90348f4
Added improved error handling.
brianjohnson5972 Mar 29, 2021
86b65ed
Fixing PR comment, and cleaning up uses of global that should be nonl…
brianjohnson5972 Mar 29, 2021
b5071cc
Could not use nonlocal in this case.
brianjohnson5972 Mar 29, 2021
c74a148
Trying to prevent error on CentOS.
brianjohnson5972 Mar 29, 2021
3ab6049
Merge pull request #10205 from EOSIO/bdj__privacy-integration-test-bo…
brianjohnson5972 Mar 30, 2021
75e4823
Moved useful protocol feature methods into Node.py.
brianjohnson5972 Mar 18, 2021
8c6389e
Activating the SECURITY_GROUP protocol feature.
brianjohnson5972 Mar 18, 2021
69d4232
Minor changes to add accounts and load contract to exercise security …
brianjohnson5972 Mar 29, 2021
17e2cbe
Change configSecurityGroup to automatically NOT use the bios bootfile…
brianjohnson5972 Mar 29, 2021
fa1e796
Added improved error handling.
brianjohnson5972 Mar 29, 2021
9c976cc
Fixing PR comment, and cleaning up uses of global that should be nonl…
brianjohnson5972 Mar 29, 2021
8c78f31
Could not use nonlocal in this case.
brianjohnson5972 Mar 29, 2021
05e7f79
Trying to prevent error on CentOS.
brianjohnson5972 Mar 29, 2021
31829e1
added openssl to EC2 docker images
Mar 30, 2021
43926e4
PR concerns addressed and centos fix
Mar 31, 2021
da55179
Merge pull request #10145 from EOSIO/tls-net-plugin-impl
brianjohnson5972 Mar 31, 2021
90f7301
logs fix + certain systems tests fix
Apr 7, 2021
6138d87
corrected behavior of tls for some corner cases
Apr 8, 2021
e010290
tls connection bugfix
Apr 8, 2021
196b6f7
Node.py test bugfix
Apr 8, 2021
e090180
bugfixes to privacy feature
Apr 8, 2021
8977c50
PR review concerns addressed + bugfixes
Apr 9, 2021
2bf22ef
PR review concerns addressed
Apr 9, 2021
f191f96
Merge pull request #10229 from EOSIO/tls-fix
dimas1185 Apr 9, 2021
40af6c5
Extra diagnostics for CentOS failure.
brianjohnson5972 Mar 30, 2021
8c05ad5
Fixed use of non-shared containers in multi-index container.
brianjohnson5972 Apr 8, 2021
0181fa3
Fixed setting participating_ correctly for invalid participant names.
brianjohnson5972 Apr 8, 2021
5f7cd70
More global_property_object changes.
brianjohnson5972 Apr 9, 2021
c879f90
Integration test script fixes.
brianjohnson5972 Apr 9, 2021
6ea1411
Added simpler scenario for security group testing.
brianjohnson5972 Apr 9, 2021
caf3eb4
Added wasm and abi for simple test usage.
brianjohnson5972 Apr 9, 2021
be01172
Fixed incorrect use of nonlocal.
brianjohnson5972 Apr 12, 2021
8fb7c8d
Cleanup of debug log statement.
brianjohnson5972 Apr 12, 2021
8764643
Made simple test to verify security group functionality.
brianjohnson5972 Apr 12, 2021
8a34e9d
Fixed apply_block functionality for bringing pending security group i…
brianjohnson5972 Apr 12, 2021
99abc09
Additional verification for test.
brianjohnson5972 Apr 12, 2021
0f77739
Made setters for proposed_security_group_participants and transaction…
brianjohnson5972 Apr 13, 2021
85ac2aa
Moved common methods to Cluster and more cleanup.
brianjohnson5972 Apr 13, 2021
c825ceb
Fixing resume from state.
brianjohnson5972 Apr 13, 2021
ba88c84
Cleanup.
brianjohnson5972 Apr 13, 2021
83d46ab
Changed prodCount for single producers to ensure that LIB trails enou…
brianjohnson5972 Apr 13, 2021
bb668ec
Moved parseProducers from Cluster to Node and made member function an…
brianjohnson5972 Apr 14, 2021
21ca57e
Added more senarios to test.
brianjohnson5972 Apr 14, 2021
e8a4e30
Cleaned up unused parameter.
brianjohnson5972 Apr 15, 2021
23f8510
Added method for identifying the node for the provided producer.
brianjohnson5972 Apr 15, 2021
5e82833
Merge pull request #10245 from EOSIO/bdj__privacy-apply-block-fix_EPE…
brianjohnson5972 Apr 16, 2021
27433a9
Improvement for activating features and allowing more control for blo…
brianjohnson5972 Apr 16, 2021
b9d27b8
Added scenarios of adding and removing participants and covers scenar…
brianjohnson5972 Apr 16, 2021
e2182ce
Adding more non-producing nodes for the test.
brianjohnson5972 Apr 16, 2021
fafcfaa
Making logic more straightforward.
brianjohnson5972 Apr 16, 2021
ca8a056
Merge pull request #10253 from EOSIO/bdj__privacy-simple-test-improve…
brianjohnson5972 Apr 16, 2021
853c53b
Peer Review comment changes.
brianjohnson5972 Apr 16, 2021
185975b
Missed committing change.
brianjohnson5972 Apr 16, 2021
c55a0a6
Cleanup
brianjohnson5972 Apr 16, 2021
518bb8d
Fixed reversed logic for createAction.
brianjohnson5972 Apr 17, 2021
f2f963d
tls integration tests added
Apr 17, 2021
7c2ebcb
tests fix
Apr 17, 2021
3c0a244
Fixing more errors.
brianjohnson5972 Apr 17, 2021
3029fe0
Fix another error.
brianjohnson5972 Apr 17, 2021
353314e
Reduced the number of API nodes
brianjohnson5972 Apr 19, 2021
472a394
Merge pull request #10258 from EOSIO/bdj__missed-comments-for-gh-10253
brianjohnson5972 Apr 19, 2021
6747cf4
Merge branch 'feature-privacy' into tls-tests
dimas1185 Apr 19, 2021
146b9e3
Update tester.cpp
shahabi8 Apr 19, 2021
402f557
Update security_group_tests.cpp
shahabi8 Apr 19, 2021
be6c565
Update tester.hpp
shahabi8 Apr 19, 2021
b8f74c5
Update security_group_tests.cpp
shahabi8 Apr 19, 2021
08b9caa
Merge pull request #10259 from EOSIO/tls-tests
dimas1185 Apr 20, 2021
b1fc7b6
Merge pull request #10269 from EOSIO/epe_913_fix_to_test_participants…
brianjohnson5972 Apr 20, 2021
4b1076b
Added retrieving the participant name from the command line for a Node.
brianjohnson5972 Apr 20, 2021
457a22c
Improved logging for Security Group changes.
brianjohnson5972 Apr 20, 2021
abf570c
Added SecurityGroup helper python class.
brianjohnson5972 Apr 20, 2021
9e74dea
Initial conversion to using SecurityGroup.
brianjohnson5972 Apr 20, 2021
523bf9e
Moved more code into SecurityGroup.
brianjohnson5972 Apr 21, 2021
3d50eef
Merge remote-tracking branch 'origin/feature-privacy' into bdj__priva…
brianjohnson5972 Apr 21, 2021
ac8ebb0
Added block delay to ensure repeating a duplicate remove transactin d…
brianjohnson5972 Apr 21, 2021
22cb780
Pulled activation of SECURITY_GROUP feature into SecurityGroup and PR…
brianjohnson5972 Apr 21, 2021
6225f30
More cleanup.
brianjohnson5972 Apr 22, 2021
7f3ca45
Merge pull request #10282 from EOSIO/bdj__privacy-security-group-scri…
brianjohnson5972 Apr 22, 2021
d617d9c
Update security_group_tests.cpp
shahabi8 Apr 22, 2021
1ec27f1
Update security_group_tests.cpp
shahabi8 Apr 22, 2021
31312a7
Update security_group_tests.cpp
shahabi8 Apr 22, 2021
40adba0
Finished Test Case #1.
brianjohnson5972 Apr 23, 2021
d85c4e9
Fixed the comment test descriptions.
brianjohnson5972 Apr 23, 2021
9b42334
Merge pull request #10285 from EOSIO/epe_913_fix_to_test_participants…
brianjohnson5972 Apr 23, 2021
d0139d1
Merge remote-tracking branch 'origin/develop' into bdj__merge-develop…
brianjohnson5972 Apr 23, 2021
37bc68a
Merge pull request #10292 from EOSIO/bdj__merge-develop_2021-04-23
brianjohnson5972 Apr 23, 2021
236cceb
Added comment to better explain what relay and API nodes are.
brianjohnson5972 Apr 23, 2021
b4c6961
Fixing handling for unstarted nodes.
brianjohnson5972 Apr 23, 2021
cc4d02f
Fixed returning value.
brianjohnson5972 Apr 23, 2021
465616c
Merge pull request #10288 from EOSIO/bdj__privacy-test-case-1_EPE-832
brianjohnson5972 Apr 23, 2021
aff0b79
Buildkite failure debug statement.
brianjohnson5972 Apr 26, 2021
a99c899
Fixing issue with duplicate transactions getting rejected.
brianjohnson5972 Apr 26, 2021
c7941be
Fixed waitForNextBlock to work for BlockType.lib and also reusing wai…
brianjohnson5972 Apr 27, 2021
bf048e2
Changed the test to have a minimum of 4 nodes and fixed duplicate pub…
brianjohnson5972 Apr 27, 2021
1f8bdb5
Removing transaction_hook.
brianjohnson5972 Apr 28, 2021
228a4c9
Fixed typo.
brianjohnson5972 Apr 28, 2021
180082d
Added mutex in security_group_manager to protect it instead of using …
brianjohnson5972 Apr 28, 2021
01d2ba6
Reverted changes for adding mutex for security_group_manager and spli…
brianjohnson5972 Apr 29, 2021
4e98375
Peer review cleanup.
brianjohnson5972 Apr 29, 2021
861832d
Reverting change for testing.
brianjohnson5972 Apr 29, 2021
8cd1d19
Removed transaction_hook from abieos.
brianjohnson5972 Apr 30, 2021
73ea43f
Made method name clearer and clean-up.
brianjohnson5972 Apr 30, 2021
4258bdf
Corrected error handling for TLS configuration parameters.
brianjohnson5972 Apr 30, 2021
dd3a99b
More PR comment fixes.
brianjohnson5972 Apr 30, 2021
7fc3c1c
Merge remote-tracking branch 'origin/develop' into feature-privacy
brianjohnson5972 Apr 30, 2021
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
Added mutex in security_group_manager to protect it instead of using …
…connections_mtx.
brianjohnson5972 committed Apr 28, 2021
commit 180082da300810c99e61aaa2253b92eda17082a7
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
#include <eosio/chain/types.hpp>

#include <boost/container/flat_set.hpp>
#include <shared_mutex>

#include <atomic>

@@ -23,6 +24,7 @@ namespace eosio {
bool is_in_security_group(chain::account_name participant) const {
return cache_.empty() || (cache_.find(participant) != cache_.end());
linhuang-blockone marked this conversation as resolved.
Show resolved Hide resolved
}
mutable std::shared_mutex mtx_;
private:
uint32_t version_ {0}; ///! The security group version
participant_list_t cache_; ///! Cache of participants in the security group
8 changes: 4 additions & 4 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
@@ -266,7 +266,7 @@ namespace eosio {
bool use_socket_read_watermark = false;
/** @} */

mutable std::shared_mutex connections_mtx; // protects both connections and security_group
mutable std::shared_mutex connections_mtx;
std::set< connection_ptr > connections; // todo: switch to a thread safe container to avoid big mutex over complete collection
security_group_manager security_group;

@@ -884,7 +884,7 @@ namespace eosio {
if(my_impl->ssl_enabled) {
account_name participant = participant_name_ ? *participant_name_ : account_name{};
linhuang-blockone marked this conversation as resolved.
Show resolved Hide resolved

std::lock_guard<std::shared_mutex> connection_guard(my_impl->connections_mtx);
std::shared_lock<std::shared_mutex> sg_guard(my_impl->security_group.mtx_);
bool participating = my_impl->security_group.is_in_security_group(participant);

fc_dlog( logger, "[${peer}] participant: [${name}] participating: [${enabled}]",
@@ -3657,7 +3657,7 @@ namespace eosio {
}
}

// called from any thread
// called from application thread
void net_plugin_impl::update_security_group(const block_state_ptr& bs) {
// update cache
//
@@ -3669,7 +3669,7 @@ namespace eosio {
if(security_group.current_version() == update.version) {
return;
}
std::lock_guard<std::shared_mutex> connection_guard(connections_mtx);
std::lock_guard<std::shared_mutex> sg_guard(security_group.mtx_);
if(!security_group.update_cache(update.version, update.participants)) {
return;
}