Bitcoin Forum
May 29, 2024, 07:21:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: REGTEST communication over the network protocol on: August 14, 2020, 08:06:38 AM
Thanks that was a good tip for me.

It says:
2020-08-14T07:53:14Z Added connection to 127.0.0.1:50698 peer=10
2020-08-14T07:53:14Z connection from 127.0.0.1:50698 accepted
2020-08-14T07:53:14Z PROCESSMESSAGE: INVALID MESSAGESTART version peer=10
2020-08-14T07:53:14Z disconnecting peer=10
2020-08-14T07:53:14Z Cleared nodestate for peer=10

Getting that output I assume the protocol version is wrong. But checking with getnetworkinfo:
{
  "version": 200000,
  "subversion": "/Satoshi:0.20.0/",
  "protocolversion": 70015,
  "localservices": "0000000000000409",
  "localservicesnames": [
    "NETWORK",
    "WITNESS",
    "NETWORK_LIMITED"
  ],
  "localrelay": true,
  "timeoffset": 0,
  "networkactive": true,
  "connections": 0,
  "networks": [
    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "ipv6",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "onion",
      "limited": true,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    }
  ],
  "relayfee": 0.00001000,
  "incrementalfee": 0.00001000,
  "localaddresses": [
  ],
  "warnings": ""
}


The protocolversion seems the same.
2  Bitcoin / Bitcoin Technical Support / Re: REGTEST communication over the network protocol on: August 13, 2020, 09:13:48 AM
Remember it's port 18444, and only works with nodes that are running regtest themselves. I think regtest has a higher minimum version requirement, e.g. always SegWit?

What exactly do you mean with " always SegWit"?

I manged it to run a regtest network with 3 nodes. With my program I connect to one of the nodes via tcp. The problem is that when I send the version message there is no reply (should be version and verack). My version messages content is the same as in the protocol documentation. (https://en.bitcoin.it/wiki/Protocol_documentation#version) plus the header. My specific question was if there is a difference in the fields e.g. user_agent from the real network to the regtest. I already changed the magic value field (in the header). The content of the fields I sent are the following (before packing them):

Header
magic_number: 0xfabfb5da
command: "\x00" * (12 - len('version')))
length: len(payload)
checksum: e.g b'\x13+\x07\xf2'
payload: version payload from below

Version payload
version: 70015
services: 0
timestamp: number like 1596794043
addr_recv: 127.0.0.1:18444
addr_from: 0.0.0.0:0
nonce: number like 615169444417225228
user_agent: b'\x0F/Satoshi:0.7.2/'
start_height: 478000
relay: 0

And the one regtest node I want to speak to is running on 127.0.0.1:18444
3  Bitcoin / Bitcoin Technical Support / REGTEST communication over the network protocol on: August 12, 2020, 03:10:48 PM
Hello

Bitcoin Client Software and Version Number: Bitcoin core 0.20.0 (regtest)
Operating System: Linux Mint 19.1
Description of Problem:
I wrote a program which is communication over the network protocol (specified in https://en.bitcoin.it/wiki/Protocol_documentation) with a bitcoin node. More in detail sending getaddr messages. For the handshake at the beginning I have to send a version (and verack) message. When I run my own node on the main network everything works fine. But now I wanted to play around an use a regtest network instead. Doing my research i only found out, that i have to change the magic number. Doing this when sending a version message I get nothing back as response. Is there something else I have to consider when communication with a regtest node?.


Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!