Ejemplo n.º 1
0
 def send_handshake(self) -> None:
     # TODO: move import out once this is in the helios codebase
     from helios.utils.version import construct_helios_client_identifier
     data = dict(version=self.version,
                 client_version_string=construct_helios_client_identifier(),
                 capabilities=self.peer.capabilities,
                 listen_port=self.peer.listen_port,
                 remote_pubkey=self.peer.privkey.public_key.to_bytes())
     header, body = Hello(self.cmd_id_offset).encode(data)
     self.send(header, body)
 def get_node_info(self) -> EthstatsData:
     return {
         'name': self.node_id,
         'contact': self.node_contact,
         'node': construct_helios_client_identifier(),
         'net': self.context.chain_config.network_id,
         'port': self.context.chain_config.port,
         'os': platform.system(),
         'os_v': platform.release(),
         'client': __version__,
         'canUpdateHistory': False,
     }
Ejemplo n.º 3
0
def display_launch_logs(chain_config: ChainConfig) -> None:
    logger = logging.getLogger('helios')
    logger.info(HELIOS_HEADER)
    logger.info(construct_helios_client_identifier())
    logger.info("Helios DEBUG log file is created at %s", str(chain_config.logfile_path))
Ejemplo n.º 4
0
 async def clientVersion(self) -> str:
     """
     Returns the current client version.
     """
     return construct_helios_client_identifier()
Ejemplo n.º 5
0
         'id': 3,
         'jsonrpc': '2.0'
     },
 ),
 (
     build_request('eth_mining'),
     {
         'result': False,
         'id': 3,
         'jsonrpc': '2.0'
     },
 ),
 (
     build_request('web3_clientVersion'),
     {
         'result': construct_helios_client_identifier(),
         'id': 3,
         'jsonrpc': '2.0'
     },
 ),
 (
     build_request('web3_sha3', ['0x89987239849872']),
     {
         'result':
         '0xb3406131994d9c859de3c4400e12f630638e1e992c6453358c16d0e6ce2b1a70',
         'id': 3,
         'jsonrpc': '2.0',
     },
 ),
 (
     build_request('web3_sha3', ['0x']),