-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add un ser unittests #10
base: master
Are you sure you want to change the base?
Commits on Oct 28, 2021
-
Combine common error strings for different options so translations ca…
…n be shared and reused (cherry picked from commit 5e10922)
Configuration menu - View commit details
-
Copy full SHA for c1201dc - Browse repository at this point
Copy the full SHA c1201dcView commit details -
net: require lookup functions to specify all arguments
To make it clear where DNS resolves are happening (cherry picked from commit e9fc71e)
Configuration menu - View commit details
-
Copy full SHA for 7cca797 - Browse repository at this point
Copy the full SHA 7cca797View commit details -
net: manually resolve dns seed sources
Note: Some seeds aren't actually returning an IP for their name entries, so they're being added to addrman with a source of [::]. This commit shouldn't change that behavior, for better or worse. (cherry picked from commit a98cd1f)
Configuration menu - View commit details
-
Copy full SHA for f7e7659 - Browse repository at this point
Copy the full SHA f7e7659View commit details -
net: resolve outside of storage structures
Rather than allowing CNetAddr/CService/CSubNet to launch DNS queries, require that addresses are already resolved. This greatly simplifies async resolve logic, and makes it harder to accidentally leak DNS queries. (cherry picked from commit 3675699)
Configuration menu - View commit details
-
Copy full SHA for 15c30d7 - Browse repository at this point
Copy the full SHA 15c30d7View commit details -
net: disable resolving from storage structures
CNetAddr/CService/CSubnet can no longer resolve DNS. (cherry picked from commit d39f5b4)
Configuration menu - View commit details
-
Copy full SHA for 0cee429 - Browse repository at this point
Copy the full SHA 0cee429View commit details -
Introduce enum ServiceFlags for service flags
(cherry picked from commit ee06e04)
Configuration menu - View commit details
-
Copy full SHA for 55708f5 - Browse repository at this point
Copy the full SHA 55708f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c1454b - Browse repository at this point
Copy the full SHA 6c1454bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cf62ae - Browse repository at this point
Copy the full SHA 8cf62aeView commit details -
Revert changes from CserviceFlags cherry-pick to prefer zcash logic a…
…round use of nServices
Configuration menu - View commit details
-
Copy full SHA for ba1d17d - Browse repository at this point
Copy the full SHA ba1d17dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e1a9c6 - Browse repository at this point
Copy the full SHA 6e1a9c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb8a1af - Browse repository at this point
Copy the full SHA bb8a1afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 16774a6 - Browse repository at this point
Copy the full SHA 16774a6View commit details -
net: Split resolving out of CNetAddr
(cherry picked from commit 31d6b1d)
Configuration menu - View commit details
-
Copy full SHA for b6649b2 - Browse repository at this point
Copy the full SHA b6649b2View commit details -
net: Split resolving out of CService
(cherry picked from commit f96c7c4)
Configuration menu - View commit details
-
Copy full SHA for 634738e - Browse repository at this point
Copy the full SHA 634738eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b7c6cba - Browse repository at this point
Copy the full SHA b7c6cbaView commit details -
net: Split resolving out of CSubNet
(cherry picked from commit b6c3ff3)
Configuration menu - View commit details
-
Copy full SHA for 0bfe4c5 - Browse repository at this point
Copy the full SHA 0bfe4c5View commit details -
net: Add direct tests for new CSubNet constructors
(cherry picked from commit 1017b8a)
Configuration menu - View commit details
-
Copy full SHA for 7095826 - Browse repository at this point
Copy the full SHA 7095826View commit details -
net: move CNetAddr/CService/CSubNet out of netbase
(cherry picked from commit 21e5b96)
Configuration menu - View commit details
-
Copy full SHA for 82064de - Browse repository at this point
Copy the full SHA 82064deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b021bc - Browse repository at this point
Copy the full SHA 0b021bcView commit details -
net: narrow include scope after moving to netaddress
Net functionality is no longer needed for CAddress/CAddrman/etc. now that CNetAddr/CService/CSubNet are dumb storage classes. (cherry picked from commit 21ba407)
Configuration menu - View commit details
-
Copy full SHA for 4ffb715 - Browse repository at this point
Copy the full SHA 4ffb715View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46625fb - Browse repository at this point
Copy the full SHA 46625fbView commit details -
net: Have LookupNumeric return a CService directly
Also fix up a few small issues: - Lookup with "badip:port" now sets the port to 0 - Don't allow assert to have side-effects (cherry picked from commit 8945384)
Configuration menu - View commit details
-
Copy full SHA for 8cdc833 - Browse repository at this point
Copy the full SHA 8cdc833View commit details -
(cherry picked from commit 9e9d644)
Configuration menu - View commit details
-
Copy full SHA for 68e39cd - Browse repository at this point
Copy the full SHA 68e39cdView commit details -
test: add two edge case tests for CSubNet
(cherry picked from commit ccef5d7)
Configuration menu - View commit details
-
Copy full SHA for aefb74a - Browse repository at this point
Copy the full SHA aefb74aView commit details -
scripted-diff: Replace NET_TOR with NET_ONION
-BEGIN VERIFY SCRIPT- sed --in-place'' --expression='s/NET_TOR/NET_ONION/g' $(git grep -I --files-with-matches 'NET_TOR') -END VERIFY SCRIPT- The --in-place'' hack is required for sed on macOS to edit files in-place without passing a backup extension. (cherry picked from commit 07c493f)
Configuration menu - View commit details
-
Copy full SHA for 8d1f697 - Browse repository at this point
Copy the full SHA 8d1f697View commit details -
backport single-line definition of GetAddrBytes
( cherry-plucked from: b691f2d ) In github context: bitcoin/bitcoin@b691f2d#diff-9281caf81406a5c4e11f572f613a4cc9769f39c66579ed75a4c957f30b39d836
Configuration menu - View commit details
-
Copy full SHA for b8a1835 - Browse repository at this point
Copy the full SHA b8a1835View commit details -
net: improve encapsulation of CNetAddr
Do not access `CNetAddr::ip` directly from `CService` methods. This improvement will help later when we change the type of `CNetAddr::ip` (in the BIP155 implementation). Co-authored-by: Carl Dong <[email protected]> (cherry picked from commit bc74a40)
Configuration menu - View commit details
-
Copy full SHA for a824fbc - Browse repository at this point
Copy the full SHA a824fbcView commit details -
(cherry picked from commit 100c64a)
Configuration menu - View commit details
-
Copy full SHA for 498ef00 - Browse repository at this point
Copy the full SHA 498ef00View commit details -
net: add an internal subnet for representing unresolved hostnames
We currently do two resolves for dns seeds: one for the results, and one to serve in addrman as the source for those addresses. There's no requirement that the source hostname resolves to the stored identifier, only that the mapping is unique. So rather than incurring the second lookup, combine a private subnet with a hash of the hostname. The resulting v6 ip is guaranteed not to be publicy routable, and has only a negligible chance of colliding with a user's internal network (which would be of no consequence anyway). (cherry picked from commit 7f31762)
Configuration menu - View commit details
-
Copy full SHA for 13b1b17 - Browse repository at this point
Copy the full SHA 13b1b17View commit details -
(cherry picked from commit 100c64a)
Configuration menu - View commit details
-
Copy full SHA for 69d417a - Browse repository at this point
Copy the full SHA 69d417aView commit details -
Add Slice: a (pointer, size) array view that acts like a container
(cherry picked from commit 833bc08)
Configuration menu - View commit details
-
Copy full SHA for f216563 - Browse repository at this point
Copy the full SHA f216563View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9dd3e05 - Browse repository at this point
Copy the full SHA 9dd3e05View commit details -
netaddress: Update CNetAddr for ORCHIDv2
The original ORCHID prefix was deprecated as of 2014-03, the new ORCHIDv2 prefix was allocated by RFC7343 as of 2014-07. We did not consider the original ORCHID prefix routable, and I don't see any reason to consider the new one to be either. (cherry picked from commit 8be3f30)
Configuration menu - View commit details
-
Copy full SHA for d9a8e1a - Browse repository at this point
Copy the full SHA d9a8e1aView commit details -
net: extract conditional to bool CNetAddr::IsHeNet
and remove redundant public declaration (cherry picked from commit c90b9a2)
Configuration menu - View commit details
-
Copy full SHA for 59dce12 - Browse repository at this point
Copy the full SHA 59dce12View commit details -
CNetAddr: Add IsBindAny method to check for INADDR_ANY
(cherry picked from commit d6a1287)
Configuration menu - View commit details
-
Copy full SHA for 483f5c1 - Browse repository at this point
Copy the full SHA 483f5c1View commit details -
Introduce new serialization macros without casts
This new approach uses a static method which takes the object as a argument. This has the advantage that its constness can be a template parameter, allowing a single implementation that sees the object as const for serialization and non-const for deserialization, without casts. More boilerplate is included in the new macro as well. (cherry picked from commit ca33451)
Configuration menu - View commit details
-
Copy full SHA for 7d8534c - Browse repository at this point
Copy the full SHA 7d8534cView commit details -
Avoid dereference-of-casted-pointer
(cherry picked from commit 0aadc11)
Configuration menu - View commit details
-
Copy full SHA for 96fa4e2 - Browse repository at this point
Copy the full SHA 96fa4e2View commit details -
Support serialization as another type without casting
This adds a READWRITEAS(type, obj) macro which serializes obj as if it were casted to (const type&) when const, and to (type&) when non-const. This makes it usable in serialization code that uses a single implementation for both serialization and deserializing, which doesn't know the constness of the object involved. (cherry picked from commit 818dc74)
Configuration menu - View commit details
-
Copy full SHA for 39a1933 - Browse repository at this point
Copy the full SHA 39a1933View commit details -
Convert addrdb/addrman to new serialization
(cherry picked from commit 9250a08)
Configuration menu - View commit details
-
Copy full SHA for e8f0189 - Browse repository at this point
Copy the full SHA e8f0189View commit details -
Configuration menu - View commit details
-
Copy full SHA for 78eda4c - Browse repository at this point
Copy the full SHA 78eda4cView commit details -
Introduce CHashVerifier to hash read data
This is necessary later, when we drop the nVersion field from the undo data. At that point deserializing and reserializing the data won't roundtrip anymore, and thus that approach can't be used to verify checksums anymore. With this CHashVerifier approach, we can deserialize while hashing the exact serialized form that was used. This is both more efficient and more correct in that case. (cherry picked from commit e484652)
Configuration menu - View commit details
-
Copy full SHA for d6ed0b0 - Browse repository at this point
Copy the full SHA d6ed0b0View commit details -
Deduplicate addrdb.cpp and use CHashWriter/Verifier
(cherry picked from commit cf68a48)
Configuration menu - View commit details
-
Copy full SHA for f30969b - Browse repository at this point
Copy the full SHA f30969bView commit details -
Support deserializing into temporaries
Currently, the READWRITE macro cannot be passed any non-const temporaries, as the SerReadWrite function only accepts lvalue references. Deserializing into a temporary is very common, however. See for example things like 's >> VARINT(n)'. The VARINT macro produces a temporary wrapper that holds a reference to n. Fix this by accepting non-const rvalue references instead of lvalue references. We don't propagate the rvalue-ness down, as there are no useful optimizations that only apply to temporaries. Then use this new functionality to get rid of many (but not all) uses of the 'REF' macro (which casts away constness). (cherry picked from commit 172f5fa)
Configuration menu - View commit details
-
Copy full SHA for 4616f46 - Browse repository at this point
Copy the full SHA 4616f46View commit details -
Add static_assert to prevent VARINT(<signed value>)
Using VARINT with signed types is dangerous because negative values will appear to serialize correctly, but then deserialize as positive values mod 128. This commit changes the VARINT macro to trigger an error by default if called with an signed value, and updates broken uses of VARINT to pass a special flag that lets them keep working with no change in behavior. (cherry picked from commit 499d95e)
Configuration menu - View commit details
-
Copy full SHA for 18b4026 - Browse repository at this point
Copy the full SHA 18b4026View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13fd76b - Browse repository at this point
Copy the full SHA 13fd76bView commit details -
Add a generic approach for (de)serialization of objects using code in…
… other classes This adds the (internal) Wrapper class, and the Using function that uses it. Given a class F that implements Ser(stream, const object&) and Unser(stream, object&) functions, this permits writing e.g. READWRITE(Using<F>(object)). (cherry picked from commit ca62563)
Configuration menu - View commit details
-
Copy full SHA for 45f015e - Browse repository at this point
Copy the full SHA 45f015eView commit details -
Convert VARINT to the formatter/Using approach
( cherry-picked _MANUALLY_ from 2f1b2f4 )
Configuration menu - View commit details
-
Copy full SHA for 3b32b98 - Browse repository at this point
Copy the full SHA 3b32b98View commit details -
Get rid of VARINT default argument
This removes the need for the GNU C++ extension of variadic macros. (cherry picked from commit 0e0fa27)
Configuration menu - View commit details
-
Copy full SHA for b6cd764 - Browse repository at this point
Copy the full SHA b6cd764View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd95f41 - Browse repository at this point
Copy the full SHA cd95f41View commit details -
prevector: add C++11-like data() method
This returns a pointer to the beginning of the vector's data. (cherry picked from commit 47314e6)
Configuration menu - View commit details
-
Copy full SHA for c638d20 - Browse repository at this point
Copy the full SHA c638d20View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb73863 - Browse repository at this point
Copy the full SHA bb73863View commit details -
Refactor: Removed begin/end_ptr functions.
(cherry picked from commit 8c1dbc5)
Configuration menu - View commit details
-
Copy full SHA for c37db9b - Browse repository at this point
Copy the full SHA c37db9bView commit details -
Add native support for serializing char arrays without FLATDATA
Support is added to serialize arrays of type char or unsigned char directly, without any wrappers. All invocations of the FLATDATA wrappers that are obsoleted by this are removed. This includes a patch by Russell Yanofsky to make char casting type safe. The serialization of CSubNet is changed to serialize a bool directly rather than though FLATDATA. This makes the serialization independent of the size of the bool type (and will use 1 byte everywhere). (cherry picked from commit a7c45bc)
Configuration menu - View commit details
-
Copy full SHA for f90041a - Browse repository at this point
Copy the full SHA f90041aView commit details -
Support serializing Span<unsigned char> and use that instead of FLATDATA
(cherry picked from commit 9272d70)
Configuration menu - View commit details
-
Copy full SHA for fa3af89 - Browse repository at this point
Copy the full SHA fa3af89View commit details -
Add FORMATTER_METHODS, similar to SERIALIZE_METHODS, but for formatters
(cherry picked from commit ca34c5c)
Configuration menu - View commit details
-
Copy full SHA for 4160900 - Browse repository at this point
Copy the full SHA 4160900View commit details -
Add a constant for the maximum vector allocation (5 Mbyte)
(cherry picked from commit 37d800b)
Configuration menu - View commit details
-
Copy full SHA for 3e57340 - Browse repository at this point
Copy the full SHA 3e57340View commit details -
Add custom vector-element formatter
This allows a very compact notation for serialization of vectors whose elements are not serialized using their default encoding. (cherry picked from commit abf8624)
Configuration menu - View commit details
-
Copy full SHA for abd5134 - Browse repository at this point
Copy the full SHA abd5134View commit details -
Make std::vector and prevector reuse the VectorFormatter logic
(cherry picked from commit 3cd8ab9)
Configuration menu - View commit details
-
Copy full SHA for 4757d5b - Browse repository at this point
Copy the full SHA 4757d5bView commit details -
Convert CCompactSize to proper formatter
(cherry picked from commit 3ca574c)
Configuration menu - View commit details
-
Copy full SHA for 19b6329 - Browse repository at this point
Copy the full SHA 19b6329View commit details -
Make VectorFormatter support stateful formatters
(cherry picked from commit 56dd9f0)
Configuration menu - View commit details
-
Copy full SHA for a8b7e36 - Browse repository at this point
Copy the full SHA a8b7e36View commit details -
(cherry picked from commit e574fff)
Configuration menu - View commit details
-
Copy full SHA for f0b100e - Browse repository at this point
Copy the full SHA f0b100eView commit details -
Merge BigEndian functionality into CustomUintFormatter
(cherry picked from commit 769ee5f)
Configuration menu - View commit details
-
Copy full SHA for 703cfad - Browse repository at this point
Copy the full SHA 703cfadView commit details -
Extend CustomUintFormatter to support enums
Extracted by Pieter Wuille from a comment by Russ Yanofsky, see bitcoin/bitcoin#18317 (comment). (cherry picked from commit 6f9a1e5)
Configuration menu - View commit details
-
Copy full SHA for 0c3735b - Browse repository at this point
Copy the full SHA 0c3735bView commit details -
Add SER_READ and SER_WRITE for read/write-dependent statements
Extracted and extended by Pieter Wuille from a comment by Russ Yanofsky (see bitcoin/bitcoin#18317 (comment)). (cherry picked from commit d06fedd)
Configuration menu - View commit details
-
Copy full SHA for c11c6c0 - Browse repository at this point
Copy the full SHA c11c6c0View commit details -
Convert everything except wallet/qt to new serialization
(only picked changes to tests and netaddress.h, other changes are outside the scope of this cherry-pick) (cherry picked from commit 4eb5643)
Configuration menu - View commit details
-
Copy full SHA for b5ae2ee - Browse repository at this point
Copy the full SHA b5ae2eeView commit details -
Do not shadow variables in networking code
(cherry picked from commit b7c349d)
Configuration menu - View commit details
-
Copy full SHA for 7826ea3 - Browse repository at this point
Copy the full SHA 7826ea3View commit details -
net: save the network type explicitly in CNetAddr
Before this change, we would analyze the contents of `CNetAddr::ip[16]` in order to tell which type is an address. Change this by introducing a new member `CNetAddr::m_net` that explicitly tells the type of the address. This is necessary because in BIP155 we will not be able to tell the address type by just looking at its raw representation (e.g. both TORv3 and I2P are "seemingly random" 32 bytes). As a side effect of this change we no longer need to store IPv4 addresses encoded as IPv6 addresses - we can store them in proper 4 bytes (will be done in a separate commit). Also the code gets somewhat simplified - instead of `memcmp(ip, pchIPv4, sizeof(pchIPv4)) == 0` we can use `m_net == NET_IPV4`. Co-authored-by: Carl Dong <[email protected]> (cherry picked from commit bcfebb6)
Configuration menu - View commit details
-
Copy full SHA for 5bd20ee - Browse repository at this point
Copy the full SHA 5bd20eeView commit details -
net: don't accept non-left-contiguous netmasks
A netmask that contains 1-bits after 0-bits (the 1-bits are not contiguous on the left side) is invalid [1] [2]. The code before this PR used to parse and accept such non-left-contiguous netmasks. However, a coming change that will alter `CNetAddr::ip` to have flexible size would make juggling with such netmasks more difficult, thus drop support for those. [1] https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#Subnet_masks [2] https://tools.ietf.org/html/rfc4632#section-5.1 (cherry picked from commit 1ea57ad)
Configuration menu - View commit details
-
Copy full SHA for d0fee54 - Browse repository at this point
Copy the full SHA d0fee54View commit details -
net: improve encapsulation of CNetAddr
Do not access `CNetAddr::ip` directly from `CService` methods. This improvement will help later when we change the type of `CNetAddr::ip` (in the BIP155 implementation). Co-authored-by: Carl Dong <[email protected]> (cherry picked from commit bc74a40)
Configuration menu - View commit details
-
Copy full SHA for fa45937 - Browse repository at this point
Copy the full SHA fa45937View commit details -
net: Minor accumulated cleanups
(cherry picked from commit 2c084a6)
Configuration menu - View commit details
-
Copy full SHA for 071e2a7 - Browse repository at this point
Copy the full SHA 071e2a7View commit details -
fix uninitialized read when stringifying an addrLocal
Reachable from either place where SetIP is used when our best-guess addrLocal for a peer is IPv4, but the peer tells us it's reaching us at an IPv6 address. In that case, SetIP turns an IPv4 address into an IPv6 address without setting the scopeId, which is subsequently read in GetSockAddr during CNetAddr::ToStringIP and passed to getnameinfo. Fix by ensuring every constructor initializes the scopeId field with something. (cherry picked from commit b7b36de)
Configuration menu - View commit details
-
Copy full SHA for f61ba91 - Browse repository at this point
Copy the full SHA f61ba91View commit details -
Do not increment nAttempts by more than one for every Good connection.
This slows the increase of the nAttempts in addrman while partitioned, even if the node hasn't yet noticed the partitioning. (cherry picked from commit 6182d10)
Configuration menu - View commit details
-
Copy full SHA for c91d7b6 - Browse repository at this point
Copy the full SHA c91d7b6View commit details -
Add more methods to Span class
This introduces a rudimentary begin(), end(), operator[], and subspan to Span. (cherry picked from commit 29943a9)
Configuration menu - View commit details
-
Copy full SHA for c9fd358 - Browse repository at this point
Copy the full SHA c9fd358View commit details -
Make VerifyWitnessProgram use a Span stack
This allows for very cheap transformations on the range of elements that are to be passed to ExecuteWitnessScript. (cherry picked from commit 2b0fcff)
Configuration menu - View commit details
-
Copy full SHA for 61e7475 - Browse repository at this point
Copy the full SHA 61e7475View commit details -
Support conversion between Spans of compatible types
(cherry picked from commit 0fbde48)
Configuration menu - View commit details
-
Copy full SHA for 18a7388 - Browse repository at this point
Copy the full SHA 18a7388View commit details -
This matches a change in the C++20 std::span proposal. (cherry picked from commit 1f790a1)
Configuration menu - View commit details
-
Copy full SHA for 047b65c - Browse repository at this point
Copy the full SHA 047b65cView commit details -
Make pointer-based Span construction safer
This prevents constructing a Span<A> given two pointers into an array of B (where B is a subclass of A), at least without explicit cast to pointers to A. (cherry picked from commit bb3d38f)
Configuration menu - View commit details
-
Copy full SHA for 4ebecbf - Browse repository at this point
Copy the full SHA 4ebecbfView commit details -
Add Span constructors for arrays and vectors
(cherry picked from commit ab303a1)
Configuration menu - View commit details
-
Copy full SHA for 45a240b - Browse repository at this point
Copy the full SHA 45a240bView commit details -
Add sanity check asserts to span when -DDEBUG
(cherry picked from commit 26acc8d)
Configuration menu - View commit details
-
Copy full SHA for eb786c2 - Browse repository at this point
Copy the full SHA eb786c2View commit details -
Add MakeUCharSpan, to help constructing Span<[const] unsigned char>
Based on a suggestion by Russell Yanofsky. (cherry picked from commit e63dcc3)
Configuration menu - View commit details
-
Copy full SHA for 98a7759 - Browse repository at this point
Copy the full SHA 98a7759View commit details -
(cherry picked from commit 3502a60)
Configuration menu - View commit details
-
Copy full SHA for e9c33bc - Browse repository at this point
Copy the full SHA e9c33bcView commit details -
span: Add Span::empty() and use it in script/descriptor
(cherry picked from commit fa2ae0a)
Configuration menu - View commit details
-
Copy full SHA for 1c41916 - Browse repository at this point
Copy the full SHA 1c41916View commit details -
Configuration menu - View commit details
-
Copy full SHA for 421dbf1 - Browse repository at this point
Copy the full SHA 421dbf1View commit details -
cherry-pick GetNetClass definition and invocation
Return mapped AS in RPC call getpeerinfo If ASN bucketing is used, return a corresponding AS used in bucketing for a given peer. (cherry picked from commit e4658aa)
Configuration menu - View commit details
-
Copy full SHA for 706a742 - Browse repository at this point
Copy the full SHA 706a742View commit details -
Configuration menu - View commit details
-
Copy full SHA for a27acdd - Browse repository at this point
Copy the full SHA a27acddView commit details -
Use ASNs for mapped IPv4 addresses correctly
(cherry picked from commit 38c2395)
Configuration menu - View commit details
-
Copy full SHA for 27f5b56 - Browse repository at this point
Copy the full SHA 27f5b56View commit details -
net: change CNetAddr::ip to have flexible size
Before this change `CNetAddr::ip` was a fixed-size array of 16 bytes, not being able to store larger addresses (e.g. TORv3) and encoded smaller ones as 16-byte IPv6 addresses. Change its type to `prevector`, so that it can hold larger addresses and do not disguise non-IPv6 addresses as IPv6. So the IPv4 address `1.2.3.4` is now encoded as `01020304` instead of `00000000000000000000FFFF01020304`. Rename `CNetAddr::ip` to `CNetAddr::m_addr` because it is not an "IP" or "IP address" (TOR addresses are not IP addresses). In order to preserve backward compatibility with serialization (where e.g. `1.2.3.4` is serialized as `00000000000000000000FFFF01020304`) introduce `CNetAddr` dedicated legacy serialize/unserialize methods. Adjust `CSubNet` accordingly. Still use `CSubNet::netmask[]` of fixed 16 bytes, but use the first 4 for IPv4 (not the last 4). Only allow subnetting for IPv4 and IPv6. Co-authored-by: Carl Dong <[email protected]> (cherry picked from commit 102867c)
Configuration menu - View commit details
-
Copy full SHA for a975a25 - Browse repository at this point
Copy the full SHA a975a25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23fb43f - Browse repository at this point
Copy the full SHA 23fb43fView commit details -
Add error and range-checking parsers for unsigned 32 bit numbers. The 32-bit variant is required for parsing sequence numbers from the command line in `bitcoin-tx` (see #8164 for discussion). Also adds tests, and updates `developer-notes.md`. (cherry picked from commit e012f3c)
Configuration menu - View commit details
-
Copy full SHA for f683243 - Browse repository at this point
Copy the full SHA f683243View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31fa6c6 - Browse repository at this point
Copy the full SHA 31fa6c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c918c9 - Browse repository at this point
Copy the full SHA 4c918c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3887a05 - Browse repository at this point
Copy the full SHA 3887a05View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e3111e - Browse repository at this point
Copy the full SHA 0e3111eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ea2238c - Browse repository at this point
Copy the full SHA ea2238cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 510dae5 - Browse repository at this point
Copy the full SHA 510dae5View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc71b96 - Browse repository at this point
Copy the full SHA cc71b96View commit details -
Configuration menu - View commit details
-
Copy full SHA for baa7c1c - Browse repository at this point
Copy the full SHA baa7c1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 360709f - Browse repository at this point
Copy the full SHA 360709fView commit details -
Configuration menu - View commit details
-
Copy full SHA for eb476a7 - Browse repository at this point
Copy the full SHA eb476a7View commit details -
util: Don't allow base58-decoding of std::string:s containing non-bas…
…e58 characters (cherry picked from commit d945c6f)
Configuration menu - View commit details
-
Copy full SHA for 5816f7c - Browse repository at this point
Copy the full SHA 5816f7cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 460ef32 - Browse repository at this point
Copy the full SHA 460ef32View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13dab44 - Browse repository at this point
Copy the full SHA 13dab44View commit details -
net: Avoid using C-style NUL-terminated strings as arguments in the n…
…etbase interface (cherry picked from commit 9574de8)
Configuration menu - View commit details
-
Copy full SHA for 4ed412f - Browse repository at this point
Copy the full SHA 4ed412fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f3ae14 - Browse repository at this point
Copy the full SHA 9f3ae14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 811c033 - Browse repository at this point
Copy the full SHA 811c033View commit details -
util: move HasPrefix() so it can be reused
Move the function `HasPrefix()` from `netaddress.cpp` to `util/string.h` so it can be reused by `CNetAddr` methods (and possibly others). (cherry picked from commit d2bb681)
Configuration menu - View commit details
-
Copy full SHA for ab33377 - Browse repository at this point
Copy the full SHA ab33377View commit details -
test: move HasReason so it can be reused
This file was previously removed, and.. perhaps will be again. src/test/util/setup_common.h Move the class `HasReason` from `miner_tests.cpp` to `setup_common.h` so that it can be reused by other tests. (cherry picked from commit fe42411)
Configuration menu - View commit details
-
Copy full SHA for 9ab383e - Browse repository at this point
Copy the full SHA 9ab383eView commit details -
net: CNetAddr: add support to (un)serialize as ADDRv2
Co-authored-by: Carl Dong <[email protected]> (cherry picked from commit e0d7357)
Configuration menu - View commit details
-
Copy full SHA for 5c9d3b3 - Browse repository at this point
Copy the full SHA 5c9d3b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f74822 - Browse repository at this point
Copy the full SHA 8f74822View commit details -
net: recognize TORv3/I2P/CJDNS networks
Recognizing addresses from those networks allows us to accept and gossip them, even though we don't know how to connect to them (yet). Co-authored-by: eriknylund <[email protected]> (cherry picked from commit 7be6ff6)
Configuration menu - View commit details
-
Copy full SHA for 881eadd - Browse repository at this point
Copy the full SHA 881eaddView commit details -
Configuration menu - View commit details
-
Copy full SHA for c84d6de - Browse repository at this point
Copy the full SHA c84d6deView commit details -
Implement keccak-f[1600] and SHA3-256
(cherry picked from commit 2ac8bf9)
Configuration menu - View commit details
-
Copy full SHA for d98b755 - Browse repository at this point
Copy the full SHA d98b755View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03407f2 - Browse repository at this point
Copy the full SHA 03407f2View commit details -
Add FastRandomContext::rand256() and ::randbytes()
FastRandomContext now provides all functionality that the real Rand* functions provide. (cherry picked from commit 37e864e)
Configuration menu - View commit details
-
Copy full SHA for 6e4ed7d - Browse repository at this point
Copy the full SHA 6e4ed7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9bc6fe - Browse repository at this point
Copy the full SHA c9bc6feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 44d8aec - Browse repository at this point
Copy the full SHA 44d8aecView commit details -
Make CHash256 and CHash160 consume Spans
Note this doesn't build, missing identifier: SHA256D64 (cherry picked from commit e549bf8)
Configuration menu - View commit details
-
Copy full SHA for 03f6a28 - Browse repository at this point
Copy the full SHA 03f6a28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73e18ec - Browse repository at this point
Copy the full SHA 73e18ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3cb026f - Browse repository at this point
Copy the full SHA 3cb026fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9ee309 - Browse repository at this point
Copy the full SHA b9ee309View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b9f55c - Browse repository at this point
Copy the full SHA 8b9f55cView commit details -
Convert LimitedString to formatter
(cherry picked from commit 92beff1)
Configuration menu - View commit details
-
Copy full SHA for df8f19b - Browse repository at this point
Copy the full SHA df8f19bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c510def - Browse repository at this point
Copy the full SHA c510defView commit details -
net: CAddress & CAddrMan: (un)serialize as ADDRv2
Change the serialization of `CAddrMan` to serialize its addresses in ADDRv2/BIP155 format by default. Introduce a new `CAddrMan` format version (3). Add support for ADDRv2 format in `CAddress` (un)serialization. Co-authored-by: Carl Dong <[email protected]> (cherry picked from commit 201a459) (cherry picked from commit bd2c485)
Configuration menu - View commit details
-
Copy full SHA for 65fd791 - Browse repository at this point
Copy the full SHA 65fd791View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d97eed - Browse repository at this point
Copy the full SHA 8d97eedView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0325124 - Browse repository at this point
Copy the full SHA 0325124View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca67de1 - Browse repository at this point
Copy the full SHA ca67de1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7473b8f - Browse repository at this point
Copy the full SHA 7473b8fView commit details -
remove unsupported service types from tests
(cherry picked from commit 27d53eb)
Configuration menu - View commit details
-
Copy full SHA for b2ea131 - Browse repository at this point
Copy the full SHA b2ea131View commit details -
Configuration menu - View commit details
-
Copy full SHA for 726029a - Browse repository at this point
Copy the full SHA 726029aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 842e727 - Browse repository at this point
Copy the full SHA 842e727View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a97885 - Browse repository at this point
Copy the full SHA 6a97885View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef9322e - Browse repository at this point
Copy the full SHA ef9322eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 22a18dd - Browse repository at this point
Copy the full SHA 22a18ddView commit details
Commits on Nov 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b97dfd7 - Browse repository at this point
Copy the full SHA b97dfd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5f4da8 - Browse repository at this point
Copy the full SHA b5f4da8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ee66e4 - Browse repository at this point
Copy the full SHA 9ee66e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f37e6e9 - Browse repository at this point
Copy the full SHA f37e6e9View commit details
Commits on Nov 17, 2021
-
net: advertise support for ADDRv2 via new message
Introduce a new message `sendaddrv2` to signal support for ADDRv2. Send the new message immediately after sending the `VERACK` message. Add support for receiving and parsing ADDRv2 messages. Send ADDRv2 messages (instead of ADDR) to a peer if he has advertised support for it. Co-authored-by: Carl Dong <[email protected]> (cherry picked from commit 353a3fd)
Configuration menu - View commit details
-
Copy full SHA for 46fb77e - Browse repository at this point
Copy the full SHA 46fb77eView commit details
Commits on Nov 18, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 5a49fd8 - Browse repository at this point
Copy the full SHA 5a49fd8View commit details
Commits on Nov 19, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 6535c8e - Browse repository at this point
Copy the full SHA 6535c8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 48bb561 - Browse repository at this point
Copy the full SHA 48bb561View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5653867 - Browse repository at this point
Copy the full SHA 5653867View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ef2d0f - Browse repository at this point
Copy the full SHA 6ef2d0fView commit details
Commits on Nov 28, 2021
-
rm incorrect comment, note other incorrect, begin test of deserializi…
…ng torv3 to addrdb
Configuration menu - View commit details
-
Copy full SHA for 7670fb2 - Browse repository at this point
Copy the full SHA 7670fb2View commit details
Commits on Nov 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for df94812 - Browse repository at this point
Copy the full SHA df94812View commit details -
Configuration menu - View commit details
-
Copy full SHA for a6bdfec - Browse repository at this point
Copy the full SHA a6bdfecView commit details
Commits on Dec 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 20f2d87 - Browse repository at this point
Copy the full SHA 20f2d87View commit details -
Configuration menu - View commit details
-
Copy full SHA for e593e36 - Browse repository at this point
Copy the full SHA e593e36View commit details
Commits on Dec 3, 2021
-
rm LogPrintfs, change serialization format numbering, comment out exp…
…ected BOOST fails
Configuration menu - View commit details
-
Copy full SHA for 5fb7f2b - Browse repository at this point
Copy the full SHA 5fb7f2bView commit details
Commits on Dec 6, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8c70dc8 - Browse repository at this point
Copy the full SHA 8c70dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7380394 - Browse repository at this point
Copy the full SHA 7380394View commit details
Commits on Dec 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8b1bf1c - Browse repository at this point
Copy the full SHA 8b1bf1cView commit details
Commits on Dec 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b23ffdc - Browse repository at this point
Copy the full SHA b23ffdcView commit details