Node for thenewboston digital currency network.

Overview

Project setup

For project setup see INSTALL.rst

Community

Join the community to stay updated on the most recent developments, project roadmaps, and random discussions about completely unrelated topics.

Donate

All donations will go to thenewboston to help fund the team to continue to develop the community and create new content.

Coin Address
thenewboston Logo b6e21072b6ba2eae6f78bc3ade17f6a561fa4582d5494a5120617f2027d38797
Bitcoin Logo 3GZYi3w3BXQfyb868K2phHjrS4i8LooaHh
Ethereum Logo 0x0E38e2a838F0B20872E5Ff55c82c2EE7509e6d4A

License

thenewboston is MIT licensed

Comments
  • Generate blockchain data structure description from code

    Generate blockchain data structure description from code

    The aim it to avoid parallel support of documentation, so as soon as you make the change you can regenerate the documentation.

    Requirements:

    • It must be a CLI tool
    • Output is ReStructured mark up

    TODO:

    • [DONE] Support multiple block types -> done here: https://github.com/thenewboston-developers/thenewboston-node/pull/188
    • [DONE] Properly read docstrings for attribute (also allow empty docstrings)
    • [DONE] Generate example values with factories (or memory blockchain instead of hardcoding)
    • [DONE] Add documentation generation to gitflow actions
    • [DONE] Expand object to actual types
    • [DONE] Rename account root files to blockchain state
    • [DONE] Properly describe datetime type
    • [DONE] Review comments of this task for missing TODOs
    • [DONE] Add doc generation to linter
    • [DONE] Implicit docstrings for dataclasses
    • [DONE] Make sure documentation update produces same hashes / signatures, etc (take care to constantify timestamps)
    • [DONE] Fix having "node_type": "PRIMARY_VALIDATOR"
    • [DONE] Add example value for each field
    • [DONE] Correctly represent optionality for serialized fields
    • [MOVED OUT] Reread the docs and if there are improvement required -> https://github.com/thenewboston-developers/thenewboston-node/issues/218
    • [MOVED OUT] Review and update docstrings for dataclass attributes -> https://github.com/thenewboston-developers/thenewboston-node/issues/218
    opened by dmugtasimov 37
  • REST API method to get path to latest available blockchain state

    REST API method to get path to latest available blockchain state

    TODO:

    • Use thenewboston_node.business_logic.blockchain.file_blockchain.get_blockchain_state_filename_meta
    • GET /api/v1/blockchain-states-meta/?limit=&offset=&ordering=
    • ordering by block_number in both directions must be supported. do not forget to handle special case of blockchain genesis state ( implement by yielding blockchain states in either direction)
    • GET /api/v1/blockchain-states-meta/{block_number}/ (if leading zeros are provided then they should be striped from block_number
    • Use blockchain application
    • Base "urls" on "network_addresses" of the declared node

    Response example:

    [
            {
    		"last_block_number": null,
                    "url_path": "/blockchain/account-root-files/0/0/0/0/0/0/0/0/000000000!-arf.msgpack.xz",
    		"urls": ["http://3.143.205.184:8555/blockchain/account-root-files/0/0/0/0/0/0/0/0/000000000!-arf.msgpack.xz"]
    	},
    	{
    		"last_block_number": 10,
                    "url_path": "/blockchain/account-root-files/0/0/0/0/0/0/0/0/0000000010-arf.msgpack.xz",
    		"urls": ["http://3.143.205.184:8555/blockchain/account-root-files/0/0/0/0/0/0/0/0/0000000010-arf.msgpack.xz"]
    	}
    ]
    

    Use this code for pagination:

    from collections import OrderedDict
    
    from rest_framework.pagination import LimitOffsetPagination
    from rest_framework.response import Response
    
    
    class CustomLimitOffsetPaginationBase(LimitOffsetPagination):
        default_limit = 5
        max_limit = 20
    
        def get_paginated_dict(self, data):
            raise NotImplementedError('Must be implemented in a child class')
    
        def get_paginated_response(self, data):
            return Response(self.get_paginated_dict(data))
    
    
    class CustomLimitOffsetPagination(CustomLimitOffsetPaginationBase):
    
        def get_paginated_dict(self, data):
            return OrderedDict((('count', self.count), ('results', data)))
    
    opened by dmugtasimov 34
  • Add create /api/v1/signed-change-requests/ end-point

    Add create /api/v1/signed-change-requests/ end-point

    DEPENDS ON:

    • https://github.com/thenewboston-developers/thenewboston-node/issues/223

    TODO:

    • ~~Add POST /api/v1/signed-change-requests/ end-point~~
    • If the receiving node is PV:
      • ~~add block generated from signed change request to the blockchain~~
      • validate that signed change request has correct fee transaction (at least the published amount)
        • [MOVED OUT] https://github.com/thenewboston-developers/thenewboston-node/issues/472
        • [MOVED OUT] https://github.com/thenewboston-developers/thenewboston-node/issues/473
      • ~~validate the signed change request itself~~
      • ~~validate the signed change request against current state of the blockchain~~
      • if any of the validations do not pass respond to the calling node with the an error
      • [MOVED OUT] notify confirmation validators about the new block -> https://github.com/thenewboston-developers/thenewboston-node/issues/113
    • ~~If the receiving node is a regular node or CV: validate the signed change request and send it to current PV~~
    opened by dmugtasimov 19
  • Synchronize creation of blockchain states and blockchunks

    Synchronize creation of blockchain states and blockchunks

    TODO:

    • Finalize block chunk when blockchain state is created
    • Base block chunk filename on blockchain state
    • Selfcure case when blockchain state is created, but block chunk is not finalized
    opened by dmugtasimov 17
  • Implement APIBlockchain.yield_blocks_slice()

    Implement APIBlockchain.yield_blocks_slice()

    TODO:

    • [DONE] Download as little block chunks as possible
    • [DONE] Generalize and reuse thenewboston_node.business_logic.utils.blockchain_state.read_blockchain_state_file_from_source
    • [DONE] Mock file_object.read() to unittest: read_compressed_file allow to pass open_function which can be mocked
    • [DONE] Unittest various edge cases: all blocks in the same block chunk, slice crosses two blockchunks, slice in the incomplete last block chunk, empty slice, remote node does not contain the required slice, etc
    • [DONE] Use /api/v1/block-chunks-meta to firgure out which chunks to be downloaded
    • [DONE] DO NOT cache data for now. We will do it later
    • [DONE] ~~To reduce number of API calls implement filtering by start_block_number on API side and use it from client. It must be done in DRF-style (similar to how we tweaked OrderingFilter). So we can get all chunks between from_block_number and to_block_number and one chunk before from_block_number (by using ordering=-start_block_number&limit=1). GET /api/v1/block-chunks-meta/ is meant in this item.~~
    • [DONE] Care about edge case when time passes between API call and the actual download of the incomplete binary which manages to become finalized. Therefore we should query the API with max available limit and download all binaries, but if some of them (the last one in 99.99% cases) is no longer available then we must retry by making a new API call and downloading it by new name. Take about not duplicating downloads.
    opened by dmugtasimov 15
  • Minimal node blockchain sync

    Minimal node blockchain sync

    DEPENDS ON:

    • https://github.com/thenewboston-developers/thenewboston-node/issues/297
    • https://github.com/thenewboston-developers/thenewboston-node/issues/387

    TODO:

    • [DONE] Implement sync_minimal(source_blockchain: BlockchainBase, target_blockchain: BlockchainBase) function
    • Implement APIBlockchain -> partially moved out https://github.com/thenewboston-developers/thenewboston-node/issues/387
    • [DONE] If we do not have the latest blockchain state then get it
    • [DONE] Drop previous blockchain states to avoid gaps (this will be changed back with https://github.com/thenewboston-developers/thenewboston-node/issues/290 )
    • [DONE] Download all blocks remained after latest blockchain state
    • Deal with convergence issue (where blockchain gets more blocks and blockchain states while we are syncing - which may require resync indefinitely)
    • Another issue to deal with is that different nodes may have different number of blocks in their blockchain
    • Yet another issue is that PV will probably be most up to date node always
    • [DONE] Enable caching after changing the way we put blocks in chunks -> do not put blocks to chunks until finalized -> https://github.com/thenewboston-developers/thenewboston-node/issues/297
    opened by dmugtasimov 13
  • Add blockchain state validation (with signature)

    Add blockchain state validation (with signature)

    TODO:

    • When a node produces a blockchain state it signs it or attaches a signature received from primary validator (in latter case it should validate the correctness of the signature)
    • Use SignableMixin, it may require nest the blockchain state into message attribute
    • Blockchain state validation must optionally include validation that the current primary validator has signed it (this can be learned from primary_validator_schedule and last_block_number
    • Also we need to be able to attach a signature from primary validator to locally generated blockchain state (and then validate) - this is because nodes will be receiving just signatures which they should validate against current blockchain state
    • Invalid blockchain state cannot be added to the blockchain
    opened by dmugtasimov 12
  • Implement node start

    Implement node start

    Node start:

    • [DONE] ~~If it is the very first start and there is no blockchain at all then use the blockchain state stored in the docker image (optionally we can try to download the latest blockchain state from fixed location)~~
    • [DONE] ~~Get a list of declared nodes from the blockchain state~~
    • [MOVED OUT] Connect to one of the nodes from the list of declared nodes and update the local copy of the blockchain (either download the latest blockchain state or blocks or both) -> https://github.com/thenewboston-developers/thenewboston-node/issues/417
    • [DONE] Inspect the current blockchain state if it the node is already declared
    • [DONE] If the node is declared then validate its network address
    • [MOVED OUT] If the node is not declared or the network address requires update then issue a signed change request to the current PV to declare itself -> https://github.com/thenewboston-developers/thenewboston-node/issues/428
    • [DONE] If PV schedule does not exist in the blockchain then declare itself a PV
    • [DONE] Once we have first PV new docker images with contain it in the stored blockchain state and no more nodes will declare themselves as a PV (we need to prioritize beta blockchain)
    • [DONE] Support serialized beta blockchain

    TODO:

    • [MOVED OUT] Allow to initialize on start either from alpha account root file or from beta blockchain start -> https://github.com/thenewboston-developers/thenewboston-node/issues/255
    • [DONE] Store blockchain state in docker image to allow to initialize from it
    • [MOVED OUT] Implement a method to download the latest available blockchain from another node -> https://github.com/thenewboston-developers/thenewboston-node/issues/251
    depends node start node deployment 
    opened by dmugtasimov 12
  • Add method to the blockchain to get node current role by account number

    Add method to the blockchain to get node current role by account number

    TODO:

    • it should be a method on a blockchain class
    • values (implement enum): null, 1 - PV, 2 - CV, 3 - regular
    • add to GET /api/v1/nodes/{}/ response as role attribute
    • a node is CV if it is scheduled as PV in the future, PV if it is current PV, null if a node is not declared on the account and 3 otherwise
    opened by dmugtasimov 11
  • Assert that all dataclass attributes of AccountState are optional [complete for 500 TNBC]

    Assert that all dataclass attributes of AccountState are optional [complete for 500 TNBC]

    The task is to implement this TODO:

    # TODO(dmu) CRITICAL: Assert all attributes are optional
    

    We need to assert that all dataclass attributes of AccountState are optional, so if later a developer creates new attribute which is non-optional the code will fail-fast.

    bounty owed 
    opened by dmugtasimov 11
  • List account transactions API end-point

    List account transactions API end-point

    TODO:

    • GET /api/v1/accounts/{id}/transactions/
    • Pagination
    • Ordering asc/desc chronologically
    • If node does not have complete blockchain (all blocks till number 0) and transaction beyond known blocks are requested raise NotImplemented error (later we will have to implement sync initialization or otherwise redirection of client to get the entire list of transaction from somewhere else, for example from current PV)
    • Use serializer based on transaction dataclass
    • Add a TODO about a need of caching implementation
    opened by dmugtasimov 10
  • Fix node blockchain synchronization with itself

    Fix node blockchain synchronization with itself

    root@ubuntu-s-1vcpu-1gb-nyc1-01:~# bash <(wget -qO- https://raw.githubusercontent.com/thenewboston-developers/thenewboston-node/master/scripts/deploy.sh)
    
    Redirecting output to ‘wget-log.6’.
    Removing login credentials for docker.pkg.github.com
    Interactive docker registry login (username=github username; password=github personal access token (not github password)
    Username: dmugtasimov
    Password: 
    WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
    Configure a credential helper to remove this warning. See
    https://docs.docker.com/engine/reference/commandline/login/#credentials-store
    
    Login Succeeded
    --2021-10-29 15:38:17--  https://raw.githubusercontent.com/thenewboston-developers/thenewboston-node/master/docker-compose.yml
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2814 (2.7K) [text/plain]
    Saving to: ‘docker-compose.yml’
    
    docker-compose.yml                        100%[====================================================================================>]   2.75K  --.-KB/s    in 0s      
    
    2021-10-29 15:38:17 (23.5 MB/s) - ‘docker-compose.yml’ saved [2814/2814]
    
    Pulling db            ... done
    Pulling celery-broker ... done
    Pulling celery        ... done
    Pulling node          ... done
    Pulling reverse-proxy ... done
    Running migrations...
    Creating root_celery-broker_1 ... done
    Creating root_node_run        ... done
    Operations to perform:
      Apply all migrations: admin, auth, blockchain, contenttypes, sessions
    Running migrations:
      Applying blockchain.0001_initial... OK
    Initializing blockchain (if it has not been initialized yet)...
    Creating root_node_run ... done
    Synchronizing blockchain...
    Creating root_node_run ... done
    2021-10-29 15:41:28,269 WARNING thenewboston_node.core.clients.node Could not GET http://89.207.223.150:8555/api/v1/blockchain-states-meta/?limit=1&ordering=-last_block_number
    Traceback (most recent call last):
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
        conn = connection.create_connection(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
        raise err
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
        sock.connect(sa)
    TimeoutError: [Errno 110] Connection timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
        httplib_response = self._make_request(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
        conn.request(method, url, **httplib_request_kw)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
        super(HTTPConnection, self).request(method, url, body=body, headers=headers)
      File "/usr/local/lib/python3.9/http/client.py", line 1255, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/usr/local/lib/python3.9/http/client.py", line 1301, in _send_request
        self.endheaders(body, encode_chunked=encode_chunked)
      File "/usr/local/lib/python3.9/http/client.py", line 1250, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "/usr/local/lib/python3.9/http/client.py", line 1010, in _send_output
        self.send(msg)
      File "/usr/local/lib/python3.9/http/client.py", line 950, in send
        self.connect()
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
        conn = self._new_conn()
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
        raise NewConnectionError(
    urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f50733bb580>: Failed to establish a new connection: [Errno 110] Connection timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
        resp = conn.urlopen(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
        retries = retries.increment(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
    urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='89.207.223.150', port=8555): Max retries exceeded with url: /api/v1/blockchain-states-meta/?limit=1&ordering=-last_block_number (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f50733bb580>: Failed to establish a new connection: [Errno 110] Connection timed out'))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/project/thenewboston_node/core/clients/node.py", line 64, in http_get
        response = requests_get(url)
      File "/opt/project/thenewboston_node/core/clients/node.py", line 28, in requests_get
        return requests.get(url, *args, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/api.py", line 75, in get
        return request('get', url, params=params, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/api.py", line 61, in request
        return session.request(method=method, url=url, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
        resp = self.send(prep, **send_kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
        r = adapter.send(request, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
        raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPConnectionPool(host='89.207.223.150', port=8555): Max retries exceeded with url: /api/v1/blockchain-states-meta/?limit=1&ordering=-last_block_number (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f50733bb580>: Failed to establish a new connection: [Errno 110] Connection timed out'))
    2021-10-29 15:41:28,282 WARNING thenewboston_node.core.management.commands.sync_blockchain Could not synchronize blockchain with 22e9c497ed4c7d9da7b04388a1d10d6383c2e28b3b4c4de1abc550eef350e984 at http://89.207.223.150:8555/
    Traceback (most recent call last):
      File "/opt/project/thenewboston_node/core/management/commands/sync_blockchain.py", line 36, in handle
        sync_minimal_to_file_blockchain(source, blockchain)
      File "/opt/project/thenewboston_node/business_logic/utils/blockchain.py", line 191, in sync_minimal_to_file_blockchain
        sync_minimal(source, temporary_file_blockchain)
      File "/opt/project/thenewboston_node/business_logic/utils/blockchain.py", line 145, in sync_minimal
        source_bs_last_block_number = source_blockchain.get_last_blockchain_state_last_block_number()
      File "/opt/project/thenewboston_node/business_logic/blockchain/api_blockchain.py", line 40, in get_last_blockchain_state_last_block_number
        raise NotImplementedError('Handling connection related issues is not implemented')
    NotImplementedError: Handling connection related issues is not implemented
    Successfully synchronized blockchain with http://142.93.244.155:8555/
    Creating root_node_run ... done
    Node identifier: ba645f4f87d3e7fd3a1302ffd2da81144115dff976ae002e8c110d6cdc999ac9
    Node is declared as Node(network_addresses=['http://142.93.244.155:8555/'], fee_amount=3, identifier='ba645f4f87d3e7fd3a1302ffd2da81144115dff976ae002e8c110d6cdc999ac9', fee_account=None)
    Expected node declaration: Node(network_addresses=['http://142.93.244.155:8555/'], fee_amount=3, identifier='ba645f4f87d3e7fd3a1302ffd2da81144115dff976ae002e8c110d6cdc999ac9', fee_account=None)
    Node declaration is intact
    Creating root_node_run ... done
    2021-10-29 15:43:59,821 WARNING thenewboston_node.core.clients.node Could not GET http://89.207.223.150:8555/api/v1/blockchain-states-meta/?limit=1&ordering=-last_block_number
    Traceback (most recent call last):
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
        conn = connection.create_connection(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection
        raise err
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection
        sock.connect(sa)
    TimeoutError: [Errno 110] Connection timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
        httplib_response = self._make_request(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
        conn.request(method, url, **httplib_request_kw)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
        super(HTTPConnection, self).request(method, url, body=body, headers=headers)
      File "/usr/local/lib/python3.9/http/client.py", line 1255, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/usr/local/lib/python3.9/http/client.py", line 1301, in _send_request
        self.endheaders(body, encode_chunked=encode_chunked)
      File "/usr/local/lib/python3.9/http/client.py", line 1250, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "/usr/local/lib/python3.9/http/client.py", line 1010, in _send_output
        self.send(msg)
      File "/usr/local/lib/python3.9/http/client.py", line 950, in send
        self.connect()
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
        conn = self._new_conn()
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
        raise NewConnectionError(
    urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7efc1711c580>: Failed to establish a new connection: [Errno 110] Connection timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
        resp = conn.urlopen(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
        retries = retries.increment(
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
    urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='89.207.223.150', port=8555): Max retries exceeded with url: /api/v1/blockchain-states-meta/?limit=1&ordering=-last_block_number (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7efc1711c580>: Failed to establish a new connection: [Errno 110] Connection timed out'))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/project/thenewboston_node/core/clients/node.py", line 64, in http_get
        response = requests_get(url)
      File "/opt/project/thenewboston_node/core/clients/node.py", line 28, in requests_get
        return requests.get(url, *args, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/api.py", line 75, in get
        return request('get', url, params=params, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/api.py", line 61, in request
        return session.request(method=method, url=url, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
        resp = self.send(prep, **send_kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
        r = adapter.send(request, **kwargs)
      File "/root/.cache/pypoetry/virtualenvs/thenewboston-node-gHi8t1rX-py3.9/lib/python3.9/site-packages/requests/adapters.py", line 516, in send
        raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPConnectionPool(host='89.207.223.150', port=8555): Max retries exceeded with url: /api/v1/blockchain-states-meta/?limit=1&ordering=-last_block_number (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7efc1711c580>: Failed to establish a new connection: [Errno 110] Connection timed out'))
    2021-10-29 15:43:59,833 WARNING thenewboston_node.core.management.commands.sync_blockchain Could not synchronize blockchain with 22e9c497ed4c7d9da7b04388a1d10d6383c2e28b3b4c4de1abc550eef350e984 at http://89.207.223.150:8555/
    Traceback (most recent call last):
      File "/opt/project/thenewboston_node/core/management/commands/sync_blockchain.py", line 36, in handle
        sync_minimal_to_file_blockchain(source, blockchain)
      File "/opt/project/thenewboston_node/business_logic/utils/blockchain.py", line 191, in sync_minimal_to_file_blockchain
        sync_minimal(source, temporary_file_blockchain)
      File "/opt/project/thenewboston_node/business_logic/utils/blockchain.py", line 145, in sync_minimal
        source_bs_last_block_number = source_blockchain.get_last_blockchain_state_last_block_number()
      File "/opt/project/thenewboston_node/business_logic/blockchain/api_blockchain.py", line 40, in get_last_blockchain_state_last_block_number
        raise NotImplementedError('Handling connection related issues is not implemented')
    NotImplementedError: Handling connection related issues is not implemented
    Successfully synchronized blockchain with http://142.93.244.155:8555/
    Recreating root_db_1            ... done
    Recreating root_celery-broker_1 ... done
    Recreating root_node_1          ... done
    Creating root_celery_1          ... done
    Recreating root_reverse-proxy_1 ... done
    Removing login credentials for docker.pkg.github.com
    Node has not started yet, waiting 5 seconds for retry (1)
    Node has not started yet, waiting 5 seconds for retry (2)
    
    moved to jira 
    opened by dmugtasimov 0
  • Inject test money to beta dev-test environment network

    Inject test money to beta dev-test environment network

    We need money for testing. Find a way to inject test money into beta dev-test environment network. Most probably do it while initializing from alpha. Add a caution to avoid keeping those test money in production.

    moved to jira 
    opened by dmugtasimov 0
  • Validate node fee for signed change request

    Validate node fee for signed change request

    A node that receives a signed change request is interested to get paid. TODO:

    • When a node (regular node or CV, but not PV. PV task: https://github.com/thenewboston-developers/thenewboston-node/issues/473 ) receives a coin transfer signed change request it must validate that it contains a proper fee for the receiving node (use node declaration blockchain record to see what are expected fees and receiving account)
    • Implement validation on serializer level
    • Reject signed change requests that has fees less than expected
    moved to jira 
    opened by dmugtasimov 0
  • Fix /api/v1/signed-change-requests/ online API documentation

    Fix /api/v1/signed-change-requests/ online API documentation

    TODO:

    • It must correctly describe support of Coin Transfer and Node Declaration signed change requests
    • It must be easily extendable as we add support for new signed change requests types
    moved to jira 
    opened by dmugtasimov 0
Owner
thenewboston
Developers for thenewboston digital currency.
thenewboston
Pytorch Implementation of Adversarial Deep Network Embedding for Cross-Network Node Classification

Pytorch Implementation of Adversarial Deep Network Embedding for Cross-Network Node Classification (ACDNE) This is a pytorch implementation of the Adv

陈志豪 8 Oct 13, 2022
This is a simple backtesting framework to help you test your crypto currency trading. It includes a way to download and store historical crypto data and to execute a trading strategy.

You can use this simple crypto backtesting script to ensure your trading strategy is successful Minimal setup required and works well with static TP a

Andrei 154 Sep 12, 2022
Blender Python - Node-based multi-line text and image flowchart

MindMapper v0.8 Node-based text and image flowchart for Blender Mindmap with shortcuts visible: Mindmap with shortcuts hidden: Notes This was requeste

SpectralVectors 58 Oct 8, 2022
A PyTorch Implementation of "Watch Your Step: Learning Node Embeddings via Graph Attention" (NeurIPS 2018).

Attention Walk ⠀⠀ A PyTorch Implementation of Watch Your Step: Learning Node Embeddings via Graph Attention (NIPS 2018). Abstract Graph embedding meth

Benedek Rozemberczki 303 Dec 9, 2022
G-NIA model from "Single Node Injection Attack against Graph Neural Networks" (CIKM 2021)

Single Node Injection Attack against Graph Neural Networks This repository is our Pytorch implementation of our paper: Single Node Injection Attack ag

Shuchang Tao 18 Nov 21, 2022
A Pytorch implementation of "Splitter: Learning Node Representations that Capture Multiple Social Contexts" (WWW 2019).

Splitter ⠀⠀ A PyTorch implementation of Splitter: Learning Node Representations that Capture Multiple Social Contexts (WWW 2019). Abstract Recent inte

Benedek Rozemberczki 201 Nov 9, 2022
Self-supervised learning on Graph Representation Learning (node-level task)

graph_SSL Self-supervised learning on Graph Representation Learning (node-level task) How to run the code To run GRACE, sh run_GRACE.sh To run GCA, sh

Namkyeong Lee 3 Dec 31, 2021
An example showing how to use jax to train resnet50 on multi-node multi-GPU

jax-multi-gpu-resnet50-example This repo shows how to use jax for multi-node multi-GPU training. The example is adapted from the resnet50 example in d

Yangzihao Wang 20 Jul 4, 2022
Text completion with Hugging Face and TensorFlow.js running on Node.js

Katana ML Text Completion ?? Description Runs with with Hugging Face DistilBERT and TensorFlow.js on Node.js distilbert-model - converter from Hugging

Katana ML 2 Nov 4, 2022
Node-level Graph Regression with Deep Gaussian Process Models

Node-level Graph Regression with Deep Gaussian Process Models Prerequests our implementation is mainly based on tensorflow 1.x and gpflow 1.x: python

null 1 Jan 16, 2022
Converts geometry node attributes to built-in attributes

Attribute Converter Simplifies converting attributes created by geometry nodes to built-in attributes like UVs or vertex colors, as a single click ope

Ivan Notaros 12 Dec 22, 2022
Simple node deletion tool for onnx.

snd4onnx Simple node deletion tool for onnx. I only test very miscellaneous and limited patterns as a hobby. There are probably a large number of bugs

Katsuya Hyodo 6 May 15, 2022
A library for building and serving multi-node distributed faiss indices.

About Distributed faiss index service. A lightweight library that lets you work with FAISS indexes which don't fit into a single server memory. It fol

Meta Research 170 Dec 30, 2022
List of all dependencies affected by node-ipc malicious commit

node-ipc-dependencies-list List of all dependencies affected by node-ipc malicious commit as of 17/3/2022 - 19/3/2022 (timestamp) Please improve upon

null 99 Oct 15, 2022
Provided is code that demonstrates the training and evaluation of the work presented in the paper: "On the Detection of Digital Face Manipulation" published in CVPR 2020.

FFD Source Code Provided is code that demonstrates the training and evaluation of the work presented in the paper: "On the Detection of Digital Face M

null 88 Nov 22, 2022
Histocartography is a framework bringing together AI and Digital Pathology

Documentation | Paper Welcome to the histocartography repository! histocartography is a python-based library designed to facilitate the development of

null 155 Nov 23, 2022
Digital Twin Mobility Profiling: A Spatio-Temporal Graph Learning Approach

Digital Twin Mobility Profiling: A Spatio-Temporal Graph Learning Approach This is the implementation of traffic prediction code in DTMP based on PyTo

chenxin 1 Dec 19, 2021
MATLAB codes of the book "Digital Image Processing Fourth Edition" converted to Python

Digital Image Processing Python MATLAB codes of the book "Digital Image Processing Fourth Edition" converted to Python TO-DO: Refactor scripts, curren

Merve Noyan 24 Oct 16, 2022
A fast, dataset-agnostic, deep visual search engine for digital art history

imgs.ai imgs.ai is a fast, dataset-agnostic, deep visual search engine for digital art history based on neural network embeddings. It utilizes modern

Fabian Offert 5 Dec 14, 2022