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

TorV3 Backport ZIP155: For test purposes only #5366

Draft
wants to merge 134 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
c1201dc
Combine common error strings for different options so translations ca…
luke-jr Dec 26, 2015
7cca797
net: require lookup functions to specify all arguments
theuni Apr 13, 2016
f7e7659
net: manually resolve dns seed sources
theuni Apr 13, 2016
15c30d7
net: resolve outside of storage structures
theuni Apr 13, 2016
0cee429
net: disable resolving from storage structures
theuni Apr 13, 2016
55708f5
Introduce enum ServiceFlags for service flags
sipa Jun 8, 2016
6c1454b
fix GetAdjustedTime reversion, and pass NODE_NONE to CAddress
zancas Sep 21, 2021
8cf62ae
remove SetServices
zancas Sep 21, 2021
ba1d17d
Revert changes from CserviceFlags cherry-pick to prefer zcash logic a…
zancas Sep 21, 2021
6e1a9c6
pass NODE_NONE as a second arg where ommitted
zancas Sep 21, 2021
bb8a1af
revert unnecessary changes pulled in with the addition of ServiceFlags
zancas Sep 22, 2021
16774a6
Removed extranious lines
AloeareV Sep 22, 2021
b6649b2
net: Split resolving out of CNetAddr
theuni May 31, 2016
634738e
net: Split resolving out of CService
theuni May 31, 2016
b7c6cba
copy static helper from addrman_tests.cpp
zancas Sep 23, 2021
0bfe4c5
net: Split resolving out of CSubNet
theuni May 31, 2016
7095826
net: Add direct tests for new CSubNet constructors
theuni May 31, 2016
82064de
net: move CNetAddr/CService/CSubNet out of netbase
theuni May 31, 2016
0b021bc
revert incorrect change to SerializationOp calls
zancas Sep 23, 2021
4ffb715
net: narrow include scope after moving to netaddress
theuni May 31, 2016
46625fb
explicitly include netbase.h in gtests
zancas Sep 23, 2021
8cdc833
net: Have LookupNumeric return a CService directly
theuni Aug 4, 2016
68e39cd
net: fixup nits
theuni Aug 12, 2016
aefb74a
test: add two edge case tests for CSubNet
vasild May 15, 2020
8d1f697
scripted-diff: Replace NET_TOR with NET_ONION
wodry Jul 2, 2018
b8a1835
backport single-line definition of GetAddrBytes
zancas Sep 23, 2021
a824fbc
net: improve encapsulation of CNetAddr
vasild May 13, 2020
498ef00
net: document `enum Network`
vasild May 14, 2020
13b1b17
net: add an internal subnet for representing unresolved hostnames
theuni May 24, 2017
69d417a
net: document `enum Network`
vasild May 14, 2020
f216563
Add Slice: a (pointer, size) array view that acts like a container
sipa Apr 4, 2018
9dd3e05
check rpc calls for expected exceptions, FAIL when wrong-or-no exception
zancas Sep 27, 2021
d9a8e1a
netaddress: Update CNetAddr for ORCHIDv2
dongcarl Mar 28, 2019
59dce12
net: extract conditional to bool CNetAddr::IsHeNet
jonatack Feb 5, 2020
483f5c1
CNetAddr: Add IsBindAny method to check for INADDR_ANY
luke-jr Oct 20, 2018
7d8534c
Introduce new serialization macros without casts
sipa Jul 7, 2017
96fa4e2
Avoid dereference-of-casted-pointer
sipa Jul 7, 2017
39a1933
Support serialization as another type without casting
sipa Jul 7, 2017
e8f0189
Convert addrdb/addrman to new serialization
sipa Jul 7, 2017
78eda4c
Fixed outdated use of READWRITEMANY
AloeareV Sep 29, 2021
d6ed0b0
Introduce CHashVerifier to hash read data
sipa Apr 25, 2017
f30969b
Deduplicate addrdb.cpp and use CHashWriter/Verifier
sipa Apr 21, 2017
4616f46
Support deserializing into temporaries
sipa Jul 8, 2017
18b4026
Add static_assert to prevent VARINT(<signed value>)
ryanofsky Feb 13, 2017
13fd76b
add ommitted VarIntMode flag to relevant VARINT calls
zancas Oct 1, 2021
45f015e
Add a generic approach for (de)serialization of objects using code in…
sipa Jan 8, 2020
3b32b98
Convert VARINT to the formatter/Using approach
zancas Oct 1, 2021
b6cd764
Get rid of VARINT default argument
sipa Feb 7, 2020
cd95f41
port VARINT to VARINT_MODE where mode is explicitly used
zancas Oct 1, 2021
c638d20
prevector: add C++11-like data() method
laanwj Sep 30, 2016
bb73863
serialize: Deprecate `begin_ptr` / `end_ptr`
laanwj Sep 30, 2016
c37db9b
Refactor: Removed begin/end_ptr functions.
kallewoof Dec 9, 2016
f90041a
Add native support for serializing char arrays without FLATDATA
sipa Mar 21, 2018
fa3af89
Support serializing Span<unsigned char> and use that instead of FLATDATA
sipa Apr 4, 2018
4160900
Add FORMATTER_METHODS, similar to SERIALIZE_METHODS, but for formatters
sipa Jan 18, 2020
3e57340
Add a constant for the maximum vector allocation (5 Mbyte)
sipa Sep 6, 2017
abd5134
Add custom vector-element formatter
sipa Jan 18, 2020
4757d5b
Make std::vector and prevector reuse the VectorFormatter logic
sipa Jan 29, 2020
19b6329
Convert CCompactSize to proper formatter
sipa Feb 4, 2020
a8b7e36
Make VectorFormatter support stateful formatters
ryanofsky Feb 16, 2020
f0b100e
Add CustomUintFormatter
sipa Feb 16, 2020
703cfad
Merge BigEndian functionality into CustomUintFormatter
sipa Mar 11, 2020
0c3735b
Extend CustomUintFormatter to support enums
ryanofsky Mar 30, 2020
c11c6c0
Add SER_READ and SER_WRITE for read/write-dependent statements
ryanofsky Mar 30, 2020
b5ae2ee
Convert everything except wallet/qt to new serialization
sipa Mar 11, 2020
7826ea3
Do not shadow variables in networking code
paveljanik Aug 15, 2016
5bd20ee
net: save the network type explicitly in CNetAddr
vasild May 14, 2020
d0fee54
net: don't accept non-left-contiguous netmasks
vasild Aug 24, 2020
fa45937
net: improve encapsulation of CNetAddr
vasild May 13, 2020
071e2a7
net: Minor accumulated cleanups
tjps Jan 26, 2018
f61ba91
fix uninitialized read when stringifying an addrLocal
kazcw Nov 14, 2018
c91d7b6
Do not increment nAttempts by more than one for every Good connection.
gmaxwell Apr 19, 2015
c9fd358
Add more methods to Span class
sipa Apr 23, 2018
61e7475
Make VerifyWitnessProgram use a Span stack
sipa Mar 18, 2020
18a7388
Support conversion between Spans of compatible types
sipa Mar 29, 2020
047b65c
Make Span size type unsigned
sipa Mar 29, 2020
4ebecbf
Make pointer-based Span construction safer
sipa Mar 29, 2020
45a240b
Add Span constructors for arrays and vectors
sipa Mar 30, 2020
eb786c2
Add sanity check asserts to span when -DDEBUG
sipa Jun 4, 2020
98a7759
Add MakeUCharSpan, to help constructing Span<[const] unsigned char>
sipa Jun 18, 2020
e9c33bc
doc: Document Span pitfalls
sipa Jun 24, 2020
1c41916
span: Add Span::empty() and use it in script/descriptor
Jul 19, 2020
421dbf1
gitignore *configure~*
zancas Oct 11, 2021
706a742
cherry-pick GetNetClass definition and invocation
naumenkogs Dec 24, 2019
a27acdd
add dropped close bracket
zancas Oct 11, 2021
27f5b56
Use ASNs for mapped IPv4 addresses correctly
sipa Jan 29, 2020
a975a25
net: change CNetAddr::ip to have flexible size
vasild Aug 24, 2020
23fb43f
correct GetAddrBytes declaration
zancas Oct 11, 2021
f683243
util: Add ParseUInt32
laanwj Jun 8, 2016
31fa6c6
retrieve accidentally ommitted ParseUInt8 declaration
zancas Oct 12, 2021
4c918c9
remove unused IsMulticast method
zancas Oct 12, 2021
3887a05
hack in older invocation of Hash
zancas Oct 12, 2021
0e3111e
call SetLegacyIPv6 in place of SetRaw, prefer std::make_unique to Mak…
zancas Oct 12, 2021
ea2238c
netpermissions.{h, cpp} do not exist yet
zancas Oct 12, 2021
510dae5
conservatively keep std::string because of second arg
zancas Oct 12, 2021
cc71b96
fix typo
zancas Oct 12, 2021
baa7c1c
Drop IsLimited in favor of IsReachable
Empact Jan 10, 2019
360709f
prefer IsReachable and comment out tests for later analysis
zancas Oct 12, 2021
eb476a7
revert c_str()
zancas Oct 12, 2021
5816f7c
util: Don't allow base58-decoding of std::string:s containing non-bas…
practicalswift Dec 11, 2019
460ef32
use correct base58 invocation
zancas Oct 12, 2021
13dab44
adjust names
zancas Oct 12, 2021
4ed412f
net: Avoid using C-style NUL-terminated strings as arguments in the n…
practicalswift Dec 11, 2019
9f3ae14
revert ConnectThroughProxy
zancas Oct 12, 2021
811c033
re-revert reference to nonextant 'request'
zancas Oct 12, 2021
ab33377
util: move HasPrefix() so it can be reused
vasild Aug 31, 2020
9ab383e
test: move HasReason so it can be reused
vasild Aug 31, 2020
5c9d3b3
net: CNetAddr: add support to (un)serialize as ADDRv2
vasild May 19, 2020
8f74822
comment out third test
zancas Oct 12, 2021
881eadd
net: recognize TORv3/I2P/CJDNS networks
vasild Aug 27, 2020
c84d6de
add span.h to utilstrencodings.h
zancas Oct 12, 2021
d98b755
Implement keccak-f[1600] and SHA3-256
sipa Aug 30, 2020
03407f2
comment out tests until appropriate test code can be back-ported HIGH…
zancas Oct 12, 2021
6e4ed7d
Add FastRandomContext::rand256() and ::randbytes()
sipa May 2, 2017
c9bc6fe
use insecure_randbits as name
zancas Oct 20, 2021
44d8aec
set test insecure_rand to state in 1119927df03
zancas Oct 20, 2021
03f6a28
Make CHash256 and CHash160 consume Spans
sipa Jun 18, 2020
73e18ec
this Hash isn't implemented in zcash
zancas Oct 20, 2021
3cb026f
comment out assertion in spurious test and change to lower case name
zancas Oct 20, 2021
b9ee309
remove test of nonextant SHA256D64
zancas Oct 20, 2021
8b9f55c
Support bypassing range check in ReadCompactSize
sipa Oct 9, 2020
df8f19b
Convert LimitedString to formatter
sipa May 20, 2020
c510def
adapted from 201a4596d92d640d5eb7e76cc8d959228fa09dbb
zancas Oct 26, 2021
65fd791
net: CAddress & CAddrMan: (un)serialize as ADDRv2
vasild May 19, 2020
8d97eed
attempt to use CAddress() in place of Init()
zancas Oct 26, 2021
0325124
HACK in Format::V1_BIP155
zancas Oct 13, 2021
ca67de1
reinsert void Init for CAddress
zancas Oct 26, 2021
7473b8f
remove unused constructors and conflict marker
zancas Oct 26, 2021
b2ea131
remove unsupported service types from tests
zancas Oct 13, 2021
726029a
correct test vector counts
zancas Oct 13, 2021
842e727
net: add CVectorWriter and CNetMsgMaker
theuni Nov 10, 2016
6a97885
minimal changes to net.h and net_processing.cpp
zancas Oct 18, 2021
ef9322e
minimal changes to net.h and netaddress.{h,cpp}
zancas Oct 18, 2021
22a18dd
update torcontrol.cpp
zancas Oct 19, 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
remove SetServices
  • Loading branch information
zancas committed Oct 28, 2021
commit 8cf62ae68b20c9e88bf656e58e9b6fe8b1846edc
18 changes: 0 additions & 18 deletions src/addrman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,24 +512,6 @@ void CAddrMan::Connected_(const CService& addr, int64_t nTime)
info.nTime = nTime;
}

void CAddrMan::SetServices_(const CService& addr, ServiceFlags nServices)
{
CAddrInfo* pinfo = Find(addr);

// if not found, bail out
if (!pinfo)
return;

CAddrInfo& info = *pinfo;

// check whether we are talking about the exact same CService (including same port)
if (info != addr)
return;

// update info
info.nServices = nServices;
}

int CAddrMan::RandomInt(int nMax){
return GetRandInt(nMax);
}
12 changes: 0 additions & 12 deletions src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@ class CAddrMan
//! Mark an entry as currently-connected-to.
void Connected_(const CService &addr, int64_t nTime);

//! Update an entry's service bits.
void SetServices_(const CService &addr, ServiceFlags nServices);

public:
/**
* serialized format:
Expand Down Expand Up @@ -579,15 +576,6 @@ class CAddrMan
Check();
}
}

void SetServices(const CService &addr, ServiceFlags nServices)
{
LOCK(cs);
Check();
Connected_(addr, nTime);
Check();
}

};

#endif // BITCOIN_ADDRMAN_H