Skip to content

Conversation

brunoerg
Copy link
Contributor

Fixes #27140

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 21, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK jonatack

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #27452 (test: cover addrv2 anchors by adding TorV3 to CAddress in messages.py by pinheadmz)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot added the Tests label Mar 21, 2023
@fanquake
Copy link
Member

https://cirrus-ci.com/task/6600092300345344

 test  2023-03-21T23:55:59.273000Z TestFramework (ERROR): Unexpected exception caught during testing 
                                   Traceback (most recent call last):
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\test_framework.py", line 132, in main
                                       self.run_test()
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\p2p_segwit.py", line 285, in run_test
                                       self.test_standardness_v0()
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\p2p_segwit.py", line 112, in func_wrapper
                                       func(self, *args, **kwargs)
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\p2p_segwit.py", line 660, in test_standardness_v0
                                       self.generate(self.nodes[0], 1)
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\test_framework.py", line 665, in generate
                                       sync_fun() if sync_fun else self.sync_all()
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\test_framework.py", line 729, in sync_all
                                       self.sync_blocks(nodes)
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\test_framework.py", line 694, in sync_blocks
                                       best_hash = [x.getbestblockhash() for x in rpc_connections]
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\test_framework.py", line 694, in <listcomp>
                                       best_hash = [x.getbestblockhash() for x in rpc_connections]
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\coverage.py", line 49, in __call__
                                       return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\authproxy.py", line 147, in __call__
                                       response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
                                     File "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\test\functional\test_framework\authproxy.py", line 110, in _request
                                       self.__conn.request(method, path, postdata, headers)
                                     File "C:\Python39\lib\http\client.py", line 1257, in request
                                       self._send_request(method, url, body, headers, encode_chunked)
                                     File "C:\Python39\lib\http\client.py", line 1303, in _send_request
                                       self.endheaders(body, encode_chunked=encode_chunked)
                                     File "C:\Python39\lib\http\client.py", line 1252, in endheaders
                                       self._send_output(message_body, encode_chunked=encode_chunked)
                                     File "C:\Python39\lib\http\client.py", line 1012, in _send_output
                                       self.send(msg)
                                     File "C:\Python39\lib\http\client.py", line 952, in send
                                       self.connect()
                                     File "C:\Python39\lib\http\client.py", line 925, in connect
                                       self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
                                   OSError: [WinError 10022] An invalid argument was supplied
 test  2023-03-21T23:55:59.280000Z TestFramework (DEBUG): Closing down network thread 

@maflcko
Copy link
Member

maflcko commented Mar 22, 2023

@fanquake See #18623 ?

@brunoerg brunoerg force-pushed the 2023-03-improv-deserialize-v2 branch from a9749f4 to a4111b7 Compare March 22, 2023 16:56
@brunoerg brunoerg marked this pull request as ready for review March 22, 2023 18:49
@brunoerg
Copy link
Contributor Author

brunoerg commented Mar 22, 2023

@fanquake That error seems to be unrelated to this PR

Co-authored-by: Matthew Zipkin <pinheadmz@gmail.com>
@brunoerg brunoerg force-pushed the 2023-03-improv-deserialize-v2 branch from a4111b7 to 8ef33e2 Compare April 13, 2023 18:14
@brunoerg
Copy link
Contributor Author

Force-pushed changing the approach for torv3 addresses, added @pinheadmz as co-author.

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK. This is very similar to a subset of the work in #27452, though a bit less complete here for the messages.py changes.

I'm not sure how these changes were coordinated/worked on, but maybe this could be a separate commit in the other pull, which could possibly be split into preparatory and implementation commits.

assert self.net in (self.NET_IPV4, self.NET_I2P)
assert self.net in (self.NET_IPV4, self.NET_IPV6,
self.NET_I2P, self.NET_CJDNS,
self.NET_TORV2, self.NET_TORV3)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line seems better as done in #27452 with assert self.net in self.ADDRV2_NET_NAME

@@ -237,16 +241,28 @@ class CAddress:

# see https://github.com/bitcoin/bips/blob/master/bip-0155.mediawiki
NET_IPV4 = 1
NET_IPV6 = 2
NET_TORV2 = 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As also mentioned in #27452 (comment), we can drop the torv2 code entirely. Tor v2 been removed from the Tor network and isn't coming back.

@brunoerg
Copy link
Contributor Author

Closing this in favor of #27452

@brunoerg brunoerg closed this Jun 23, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for all networks in deserialize_v2 in test_framework
6 participants