Python implementation of the IPv8 layer provide authenticated communication with privacy

Overview

FAQ:

  • Q: Is this the new official Layer 3 solution for the Internet?
  • A: No, the naming is a 10-years-old mockery of the deployment failure of IPv6 (which we sincerely hope will be deployed properly at some point in time).

Linux: Windows: Mac:

Mutation Tests:

Read the Docs:

What is IPv8 ?

IPv8 aims to provide authenticated communication with privacy. The design principle is to enable communication between public key pairs: IP addresses and physical network attachment points are abstracted away. This Python 3 package is an amalgamation of peer-to-peer communication functionality from Dispersy and Tribler, developed over the last 13 years by students and employees of the Delft University of Technology. The IPv8 library allows you to easily create network overlays on which to build your own applications.

IPv8 Objectives

  • Authentication. We offer mutual authentication using strong cryptography. During an IPv8 communication session, both parties can be sure of the other party’s identity. IPv8 users are identified by their public key. The initial key exchange is designed so that secrets are never transmitted across the Internet, not even in encrypted form. We use a standard challenge/response protocol with protection against spoofing, man-in-the-middle, and replay attacks.
  • Privacy. IPv8 is specifically designed for strong privacy protection and end-to-end encryption with perfect forward secrecy. We enhanced the industry standard onion routing protocol, Tor, for usage in a trustless environment (e.g. no trusted central directory servers).
  • No infrastructure dependency. Everybody is equal in the world of IPv8. No central web server, discovery server, or support foundation is needed.
  • Universal connectivity. IPv8 can establish direct communication in difficult network situations. This includes connecting people behind a NAT or firewall. IPv8 includes a single simple and effective NAT traversal technique: UDP hole-punching. This is essential when offering privacy without infrastructure and consumer-grade donated resources.
  • Trust. You can enhance your security if you tell IPv8 which people you know and trust. It tries to build a web-of-trust automatically.

Dependencies

The dependencies for IPv8 are collected in the requirements.txt file and can be installed using pip:

python3 -m pip install --upgrade -r requirements.txt

On Windows or MacOS you will need to install Libsodium separately, as explained here.

Tests

Running the test suite requires the installation of asynctest (python3 -m pip install asynctest). Running tests can be done by running:

python3 run_all_tests.py

Running code coverage requires the coverage package (python3 -m pip install coverage). A coverage report can be generated by running:

python3 create_test_coverage_report.py

Getting started

You can start creating your first network overlay by following the overlay creation tutorial.

We provide additional documentation on configuration, key generation and message serialization formats on our ReadTheDocs page.

Comments
  • Replace lambdas with functions

    Replace lambdas with functions

    Replace lambdas with functions. Remove a use of old_round (total removal depends on Tribler/tribler#5024 and Tribler/anydex-core#31). ~~Other minor refractoring: removing the redundant u prefix from strings; remove cast_to_* functions when it is immediately clear how to manipulate the data.~~

    Fixes #651.

    opened by Solomon1732 28
  • READY: Latest TrustChain block via DHT

    READY: Latest TrustChain block via DHT

    Fixes #369

    Added a new endpoint for retrieving the latest TrustChain block via the DHT mechanism. Added a new callback in the TrustChainCommunity class which is called whenever a block is being added in the DB, irrelevant of the block's type. It is now possible to retrieve the latest TrustChain block of some peer via HTTP requests. Created a new test set for the newly added block retrieval mechanism. In addition to this, made a few changes to the REST API test suite in terms of the communication modules, such as moving classes from one module to another and creating new modules which host logic for HTTP requests and communication for specific endpoints.

    opened by DanGraur 26
  • Use Swagger

    Use Swagger

    We should use Swagger for our REST endpoints. See below for the original exploration of this idea.

    Old

    Nobody wants to write documentation. Instead, we should automatically generate this. Also, nobody likes to do precondition and postcondition checks. We can do both as follows.

    First we can scan all the distinct endpoints available by instantiating a RootEndpoint and inspecting its children. We can then automatically generate documentation from a .restapi variable tied to the REST API handler functions (render_POST, render_GET, etc.).

    We can attach and generate the .restapi variable to these functions statically by using annotations/wrapper functions. Specifically we should expose:

    • RESTInput, which takes an option, a jsontype and a description argument.
    • RESTOutput, which takes a conditional_lambda and a output_format argument.

    RESTInput

    The first input a RESTInput takes is the option. This option specifies what option in the request URI is being described. The jsontype then specifies the JSON datatype, which can be a combination of:

    • number/boolean/null
    • string with specified encoding, for example STR_TYPE["UTF-8"] or STR_TYPE["ASCII"]
    • array/object
    • tuple of (jsontype, description) which adds additional documentation to an inner construction

    Lastly, each input should have a description. This is not very useful when using RESTInput for runtime precondition checking, but mostly for humans reading generated documentation.

    RESTOutput

    The RESTOutput takes a conditional_lambda, which is a lambda function taking the input and returning True if its output format should be applied. I have created a function for converting lambda bytecode to human readable form already, so this is a multi-purpose argument (both for checking postconditions programmatically and for generating documentation). Lastly the output_format specifies what the output matches to (or should match to). The output_format follows the same rules as the jsontype for the RESTInput. The description is once again to explain in human terms what the output is used for.

    Example

    class NetworkEndpoint(resource.Resource):
        """
        This endpoint is responsible for handing all requests regarding the state of the network.
        """
    
        def __init__(self, session):
            resource.Resource.__init__(self)
            self.session = session
    
        # Takes no RESTInput
        @RESTOutput(lambda input: input is None,
                    {
                        "peers": {
                            (STR_TYPE["BASE64"], "The sha1 of the peer's public key."): {
                                "ip": STR_TYPE["BASE64"],
                                "port": NUMBER_TYPE,
                                "public_key": STR_TYPE["BASE64"],
                                "services": [(STR_TYPE["BASE64"], "The sha1 of the Community's public key.")]
                            }
                        }
                    },
                    "All of the known peers and their services.")
        def render_GET(self, request):
            return json.dumps({"peers": self.render_peers()})
    

    Would generate the following documentation:



    NetworkEndpoint

    This endpoint is responsible for handing all requests regarding the state of the network.

    Input

    OptionTypeDescription

    Output

    GivenOutputAnnotation
    input is None{
        "peers": {
            string (base64):
                "ip": string (base64),
                "port": number,
                "public_key": string (base64),
                "services": [
                    string (base64)
                ]
            }
        }
    }

    The sha1 of the peer's public key.




    The sha1 of the Community's public key.





    priority: low 
    opened by qstokkink 19
  • Add documentation for advanced DiscoveryStrategy use

    Add documentation for advanced DiscoveryStrategy use

    This documentation should include the following.

    Configuring Peer discovery:

    • A pointer to the basics of DiscoveryStrategies.
    • How the RandomWalk works and when to use it.
    • How the EdgeWalk works and when to use it.
    • How the RandomChurn works and when to use it.
    • How to parameterize the walk sizes. The default node degree (20-30) makes sense for most use cases, see for example The Role of Network Topology for Distributed Machine Learning by Giovanni Neglia, Gianmarco Calbi, Don Towsley and Gayane Vardoyan. Add notes on creating a new Network() when mixing with communities of unequal parameters.
    • Caution on combining node removal strategies.

    Convergence of the connected Peers:

    • ~~How the Network class actually works and when peers are added, hooking into the peer discovery basics documentation.~~ EDIT: Out of scope. Add a note on sharing peers between communities.
    • ~~How the DiscoveryCommunity consolidates peers and how blocking introduction requests and responses balances peers over communities.~~ EDIT: Out of scope.
    priority: low documentation 
    opened by qstokkink 18
  • Dataclass wrapper for ipv8 Payload

    Dataclass wrapper for ipv8 Payload

    Request for dataclass-based message payloads.

    Since message payloads are used very frequently I suggest we simplify the creation and usage of Payloads. Python data classes might be a promising direction.

    Here is an example: image

    The payload is a wrapper:

    
    class LazierPayload:
        serializer = default_serializer
    
        @staticmethod
        def _type_map(t: Type) -> str:
            if t == int:
                return "Q"
            elif t == bytes:
                return "varlenH"
            elif "Tuple" in str(t) or "List" in str(t) or "Set" in str(t):
                return (
                    "varlenH-list"
                    if "int" in str(t) or "bytes" in str(t)
                    else [typing.get_args(t)[0]]
                )
            elif hasattr(t, "format_list"):
                return t
            else:
                raise NotImplementedError(t, " unknown")
    
        @classmethod
        def init_class(cls):
            # Copy all methods of VariablePayload except init
            d = {
                k: v
                for k, v in VariablePayload.__dict__.items()
                if not str(k).startswith("__")
                and str(k) != "names"
                and str(k) != "format_list"
            }
    
            for (name, method) in d.items():
                setattr(cls, name, method)
            # Populate names and format list
            fields = get_cls_fields(cls)
    
            for f, t in fields.items():
                cls.names.append(f)
                cls.format_list.append(cls._type_map(t))
            return cls
    
        def is_optimal_size(self):
            return check_size_limit(self.to_bytes())
    
        def to_bytes(self) -> bytes:
            return self.serializer.pack_serializable(self)
    
        @classmethod
        def from_bytes(cls, pack: bytes) -> "BamiPayload":
            return cls.serializer.unpack_serializable(cls, pack)[0]
    
    def payload(cls):
        d = {k: v for k, v in LazierPayload.__dict__.items() if not str(k).startswith("__")}
        for k, v in d.items():
            setattr(cls, k, v)
        cls.names = list()
        cls.format_list = list()
    
        # Populate all by mro
        added_classes = set()
        new_mro = []
        has_imp_ser = False
    
        for superclass in cls.__mro__:
            if superclass == ImpSer:
                has_imp_ser = True
            if hasattr(superclass, "names"):
                cls.names.extend(superclass.names)
                cls.format_list.extend(superclass.format_list)
    
        new_mro.append(ImpSer)
        if ImpSer not in added_classes:
            added_classes.add(ImpSer)
    
        if not has_imp_ser:
            new_vals = tuple([ImpSer] + list(cls.__bases__))
            new_cls = type(cls.__name__, new_vals, dict(cls.__dict__))
        else:
            new_cls = cls
    
        return new_cls.init_class()
    

    From the developer point of view the dataclass would act as a VariablePayload.

    Downside: we have to write map from Python types to ipv8 struct types

    priority: medium 
    opened by grimadas 17
  • Create Android port

    Create Android port

    IPv8 should function as an Android app.

    All of the dependencies have been compiled before for the Tribler project, these should/could be reused for the py-to-app compiler.

    priority: medium 
    opened by qstokkink 17
  • WIP: Added latency community

    WIP: Added latency community

    This PR adds the (highly experimental) latency community. The latency community is not enabled by default. To work with the latency community:

    1. Create a new Network class (very important) for the LatencyCommunity.
    2. Load the LatencyCommunity with only the LatencyEdgeWalk strategy into IPv8.
    3. Fetch your partners from the community.accepted_proposals set.

    LatencyEdgeWalk

    The LatencyEdgeWalk strategy will collect a set number of peers from the bootstrap nodes/trackers, 30 by default. Next, the strategy will attempt to get successive network-unique ping-unique (0.05 seconds similarity) peers from each of these 30 edge roots, up until a given edge length (6 by default). As the edges are being grown, the strategy also provides ping measurements if needed.

    After each step in the discovery process the LatencyEdgeWalk strategy will update its registered overlay by setting the overlay's possible_peers attribute to the current list of peers included in the disconnected graph of edges (the ancestry datastructure).

    Every so often (by default 30 seconds), the strategy performs a cleanup of all open connections to peers which are not included in the ancestry.

    At the end of each cycle we distinguish two types of peers:

    • Open connections which cannot be included in a latency-unique edge, we will dub this the total peers.
    • Open connections which are part of a latency-unique edge, which we dub the possible peers.

    LatencyCommunity

    The LatencyCommunity is in charge of the matching of peers. The Community predominantly uses the PeerSelector to advise any matching with others. The overlay itself periodically (by default every 5 seconds) (a) sends out proposals and keeps a window (30 by default) of optimal matches or (b) breaks the current worst match it has if the amount of matches is equal to the required amount (60 by default). Asynchronously the LatencyCommunity may decide to accept or reject incoming proposals.

    The LatencyCommunity provides the last class of peers:

    • Peers which have bilaterraly agreed to form a matching, we dub these matched peers.

    PeerSelector

    This class uses kerning to decide the error of including a peer into a given existing set of choices, according to a specified target distribution. The idea is that a programmer gives both (1) a continuous function (lambda x: preferred_count / x by default) and (2) a list of x-coordinates (bins) to evaluate the function (0.001 through 2.001 with steps of 0.05 by default). This function need to be scaled precisely for the kerning, this is handled automatically by generate_reference for a given preferred peer count and the current binning distribution. We use Gaussian kernel density estimation.

    Gumby & Jenkins

    My personal Jenkins experiment for this PR can be found here: https://jenkins-ci.tribler.org/job/pers/job/latency_noodle_qstokkink/. The source code for the experiment can be found here: https://github.com/qstokkink/gumby/tree/latency_overlay/experiments/latency_overlay.

    Future work

    Even though the basic concept works, the CPU utilization should be improved and the matching algorithm will require some further love.

    opened by qstokkink 16
  • Added a test suite for the REST API, which contains unit tests for th…

    Added a test suite for the REST API, which contains unit tests for th…

    …e various REST requests, a set of dummy peers which can be used for testing, and an interface for different types of inter-peer communication which should facilitate decoupling between the implementation of the communication, and its usage. Currently, the interface has been implemented in the test suite for the HTTP type requests.

    opened by DanGraur 16
  • UPnP-IGD support for NAT traversal

    UPnP-IGD support for NAT traversal

    UPnP provides a way for an application/device to request a port forwarding through the network's NAT from a UPnP-enabled router. This is another technique to enable better NAT traversal. UPnP-IGD uses broadcast HTTP requests over UDP (and is already enabled in Libtorrent). We can copy the logic for announcing the port from there.

    priority: none 
    opened by ichorid 14
  • removed bloom filter code

    removed bloom filter code

    While working on the rust-ipv8 implementation (with @ichorid) we noticed that the bloom filter (originally from dispersy) is absolutely never used in py-ipv8. Therefore this pull request removes it from py-ipv8.

    However this isn't the end of the story. tribler/Tribler does use the bloom filter. We will make a pull request ASAP to add it to tribler/Tribler itself.

    opened by jonay2000 14
  • IPv8 very slow to find peers

    IPv8 very slow to find peers

    This is a screenshot from Tribler running 30 seconds using the current master HEAD (f4dccad6e50e07b01a55b05b9fe0c09ada9deb58):

    afbeelding

    There are no peers at all, perhaps the IPv8 tracker is down?

    Eventually after +- 2 minutes it starts finding peers though: afbeelding

    priority: high 
    opened by qstokkink 14
  • READY: Added Python 3.11 support

    READY: Added Python 3.11 support

    Fixes #1110

    This PR:

    • Adds an __all__ definition for base.py to avoid exporting newly added module-level variables.
    • Adds TestBase support for Python 3.11 using unittest.IsolatedAsyncioTestCase.
    • Fixes RandomChurn using random.sample on a set (only list is supported as of Python 3.11).

    See original issue for implementation substantiation. Other notes:

    • TestBase now inherits from unittest.IsolatedAsyncioTestCase for all Python versions >= 3.8 by default. However, asynctest is still supported up to Python 3.10 and TestBase subclasses can switch to asynctest by setting __asynctest_compatibility_mode__ to True.
    • loop has a class scope in asynctest, an instance scope in unittest, and it needs to be retrieved upon invocation (a property) for Python 3.11.
    • _callSetUp and _callTearDown are overwritten to support the old TestBase behavior of allowing both async def and def setup and teardowns, including its own. For (only) the teardown of TestBase, the asyncTearDown is still explicitly needed.
    opened by qstokkink 1
  • Python 3.11 asynctest support

    Python 3.11 asynctest support

    The IPv8 unit tests fail on Python 3.11 due to the asynctest dependency.

    Traceback (most recent call last):
      File "C:\py-ipv8\run_all_tests.py", line 166, in <module>
        test_class_names = find_all_test_class_names()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\py-ipv8\run_all_tests.py", line 139, in find_all_test_class_names
        test_class_names.extend(derive_test_class_names(found_test))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\py-ipv8\run_all_tests.py", line 126, in derive_test_class_names
        module_instance = importlib.import_module(module_name)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Python311\Lib\importlib\__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 940, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\py-ipv8\ipv8\test\test_community.py", line 1, in <module>
        from .base import TestBase
      File "C:\py-ipv8\ipv8\test\base.py", line 13, in <module>
        import asynctest
      File "C:\Python311\Lib\site-packages\asynctest\__init__.py", line 22, in <module>
        from .case import *
      File "C:\Python311\Lib\site-packages\asynctest\case.py", line 54, in <module>
        import asynctest.selector
      File "C:\Python311\Lib\site-packages\asynctest\selector.py", line 29, in <module>
        from . import mock
      File "C:\Python311\Lib\site-packages\asynctest\mock.py", line 428, in <module>
        class _AwaitEvent:
      File "C:\Python311\Lib\site-packages\asynctest\mock.py", line 433, in _AwaitEvent
        @asyncio.coroutine
         ^^^^^^^^^^^^^^^^^
    AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
    
    priority: medium 
    opened by qstokkink 1
  • Use secondary mechanism to approve PRs that are approved by `Tribler/core`

    Use secondary mechanism to approve PRs that are approved by `Tribler/core`

    This issue is a different approach to core problem of #1091.

    To reiterate: GitHub only sees PR approvals from users with write access as "real" approvals and the security model of this repository seeks to use as little write access as possible. This leads to the situation where nobody can offer formal PR approval, even though members of Tribler/core should be able to offer "real" approvals.

    My new proposal is to use a secondary mechanism that:

    1. Listens for new approvals on a PR.
    2. Checks if the approving user is a member of Tribler/core and separately approves the PR as well.

    To make this secondary approval valid/formal/"real" we can use the @tribler-ci account, the only account that will always have write access.

    ~~These are potential GitHub actions we could use for this: https://github.com/marketplace/actions/auto-approve, https://github.com/marketplace/actions/approve-pull-request~~ EDIT: This approach failed.

    priority: medium 
    opened by qstokkink 15
  • Underspecified result type of `EZPackOverlay._ez_unpack_auth` and `EZPackOverlay._ez_unpack_noauth`

    Underspecified result type of `EZPackOverlay._ez_unpack_auth` and `EZPackOverlay._ez_unpack_noauth`

    Currently, the type of _ez_unpack_auth unpacked payload is not understood correctly by PyCharm:

    2022-05-06_15-25-39

    You can see that PyCharm can only see the base Payload methods and not the methods of IntroductionRequestPayload.

    In the following PR, I suggest a fix that provides the correct result type:

    2022-05-06_15-38-02

    Also, while fixing that issue, I noticed that currently, DataclassPayload defined as

    DataclassPayload = typing.TypeVar('DataclassPayload')
    ...
    AnyPayload = typing.Union[Payload, DataclassPayload]
    AnyPayloadType = typing.Union[typing.Type[Payload], typing.Type[DataclassPayload]]
    

    In my opinion, it is not correct to use TypeVar here. Type variables are for generic functions when the function result type should be derived from the function arguments'. Here, DataclassPayload is not used for generics and does not specify that the class is related to data classes. So, as a part of a fix, I'm replacing it with a protocol that checks that the class is actually a data class.

    priority: unknown 
    opened by kozlovsky 6
  • Document DHTCommunity

    Document DHTCommunity

    The DHTCommunity (and its subclass the DHTDiscoveryCommunity) have very useful functionality to store data and to connect to peers based on their public key. This functionality allows IPv8 to serve as both a distributed file system and allows programmers to both create neighborhood persistence and superpeer networks.

    We may want to leave IPv8-as-a-file-system functionality out of the documentation to avoid competing with Tribler's solution. However, it would be useful to give an example of storing known peers on custom Community.unload() and attempting to reconnect when initializing (i.e., neighborhood persistence). This one example would also cover "find-your-friend"/superpeer functionality.

    priority: low documentation 
    opened by qstokkink 1
  • Specify exact dependency requirements

    Specify exact dependency requirements

    Our requirements.txt file mostly does not specify what the minimum version is we support for each dependency. We should make this more explicit to avoid preventable failures.

    I ran an automated test to check which of the available versions of our dependencies managed to (1) install on my Windows 10 machine and (2) pass our unit tests. The results are as follows (green passed, red failed either step 1 or 2):

    requirements

    priority: low 
    opened by qstokkink 1
Releases(2.9)
  • 2.9(Jun 24, 2022)

    🥳🎉 In celebration of the IPv8 repository's 5-year anniversary! 🥳🎉

    Includes the first 1852 commits (+43 since v2.8) for IPv8, containing:

    • Added ConfigBuilder ephemeral key shortcut
    • Added UDP broadcast bootstrap timeout
    • Added documentation on third-party serialization (and nested payloads)
    • Fixed GitHub issue template labels
    • Fixed CommunityLauncher and test_loader super() usage
    • Fixed vp_compile decorator having wrong return type
    • Fixed anonymization utils using absolute import
    • Fixed bootstrap received addresses callback not checking for cancel
    • Fixed duplicate schema in tunnel REST endpoint
    • Fixed idna Lookup Error
    • Fixed shutdown of RequestCache in tests
    • Fixed test suite crash with 0.0.0.0 subnet mask
    • Updated error when community_id is missing
    • Updated exit data rules
    • Updated issue templates for new tags
    • Updated overlay tutorial to use dataclass payloads
    • Updated retry cache for circuits
    • Updated support for different coverage versions
    Source code(tar.gz)
    Source code(zip)
  • 2.8(Oct 27, 2021)

    Includes the first 1809 commits (+52 since v2.7) for IPv8, containing:

    • Added API documentation generation
    • Added Payload match support
    • Added ReadTheDocs config file
    • Added best practices documentation
    • Added bootstrapping documentation
    • Added dataclass Payload
    • Added option to configure IPv8 with raw private key material
    • Added script to publish standalone TaskManager
    • Added tasks tutorial
    • Added support for custom my_peer instead of key curve in MockIPv8
    • Fixed AddressTester using different LAN check
    • Fixed ReadTheDocs unrendered code-blocks
    • Fixed crashing unitialized endpoint on shutdown
    • Fixed dataclass typing
    • Fixed deprecated config not having fallbacks
    • Fixed missing token for TaskManager PyPi project
    • Fixed readthedocs links
    • Removed old database.py workarounds
    • Updated CONTRIBUTING to exempt tests from linked issues
    • Updated Endpoint initialization to use 'interfaces' configuration
    • Updated MockEndpoint behavior
    • Updated discovery docs directory
    Source code(tar.gz)
    Source code(zip)
  • 2.7(Jun 25, 2021)

    Includes the first 1757 commits (+58 since v2.6) for IPv8, containing:

    • Added RequestCache.passthrough()
    • Added TestBase tutorial
    • Added UDP broadcast bootstrapper
    • Added basic simulation capabilities to IPv8
    • Added link latencies to the IPv8 simulator
    • Fixed CONTRIBUTING.md grammar
    • Fixed compatibility with Python 3.8
    • Fixed estimated WAN address being set to a LAN address
    • Fixed for getting exits from TunnelEndpoint
    • Fixed pytest compatibility
    • Fixed uninitialized EndpointListener._local_interfaces
    • Updated CreatePayloads to use a unique identifier while sending
    • Updated IRMA enroll script
    • Updated hidden services peer discovery
    • Updated hidden services to disallow IPv8 packets over end-to-end circuits
    • Updated prefix decoding before printing
    • Updated simulation tutorial with bootstrap server
    • Updated typing for Peer key
    Source code(tar.gz)
    Source code(zip)
  • 2.6(Feb 24, 2021)

    Includes the first 1699 commits (+45 since v2.5) for IPv8, containing:

    • Added DiscoveryStrategies to OverlaysEndpoint
    • Added RequestCache documentation
    • Added TunnelSettings.from_dict classmethod
    • Added request cache documentation to TOC
    • Added tracker_reporter_plugin script to collect anonymized tracker statistics
    • Fixed DHTCommunityProvider serialization
    • Fixed UDPEndpoint.send when transport is None
    • Fixed awaiting exhaust_callbacks in TestBase
    • Fixed broken image in the peer discovery docs
    • Fixed issue with missing bootstrappers in PexCommunity
    • Fixed result signature for EZPackOverlay._ez_unpack_auth
    • Fixed scripts due to bootstrap refactoring
    • Updated Community bootstrapping to be modular
    • Updated the name of CommunityLauncher
    • Updated tracker script
    Source code(tar.gz)
    Source code(zip)
  • 2.5(Dec 14, 2020)

    Includes the first 1654 commits (+119 since v2.4) for IPv8, containing:

    • Added 'q' format to Serializer defaults
    • Added Community base class IPv6 support
    • Added CommunityLauncher decorators
    • Added Endpoint unit tests
    • Added IPv6 support to DHTCommunity
    • Added Network.snapshot support for all addresses
    • Added Sentry support to the exit node script
    • Added TestBase shortcuts
    • Added address packer to default Serializer
    • Added cache retrieval wrapper
    • Added coverage barplot script generation
    • Added deferred bootstrap DNS resolution
    • Added documentation examples validation script
    • Added fragile packet handling mode in TestBase
    • Added hiddenimports to CommunityLauncher
    • Added identity integration test isolation
    • Added identity integration test scripts
    • Added isolation endpoint tests
    • Added overlay and walk strategy loading from a function
    • Added static typing support
    • Added tests for the REST overlays endpoint
    • Added typing for VariablePayload
    • Added unload_overlay to mock IPv8
    • Fixed Bootstrap script resolving IPv6 tuples
    • Fixed RequestCache futures not being cancelled after shutdown
    • Fixed for introducing peers to outdated addresses
    • Fixed incorrect lan_introduction_address in the IntroductionResponse
    • Fixed new style punctures sent to old style peers
    • Fixed overzealous defensive programming in create_introduction_request
    • Fixed setting anonymization and statistics for overwritten endpoints
    • Fixed tracker peer for intro overwrite
    • Fixed tracker script not being general listener
    • Removed Trustchain (moved to AnyDex)
    • Removed UDPIPv6 from default endpoints
    • Removed generate_key script
    • Removed end-of-life tracker
    • Updated "too many peers" log level to DEBUG
    • Updated CreateRequestCache to use the payload identifier
    • Updated DHTCommunity serialization
    • Updated MockIPv8.unload naming to MockIPv8.stop
    • Updated Network class polish
    • Updated NumberCache.on_timeout to no longer be abstract
    • Updated TunnelCommunity payloads and crypto
    • Updated documentation by extracting examples into Python files
    Source code(tar.gz)
    Source code(zip)
  • 2.4(Oct 5, 2020)

    Includes the first 1535 commits (+31 since v2.3) for IPv8, containing:

    • Added CommunityLauncher (from Gumby)
    • Added pytest support
    • Added unit tests for DispatcherEndpoint
    • Fixed EndpointListener accessing Endpoint._port
    • Fixed pylintrc regular expression
    • Fixed sending to unsupported guessed interface
    • Updated Communities to use a 20-byte community_id instead of a master_peer
    • Updated Serializer to be more efficient
    • Updated the AsyncioEndpoint to not remove all other observers upon disable
    • Updated the GitHub release script and its instructions
    Source code(tar.gz)
    Source code(zip)
  • 2.3(Sep 16, 2020)

    Includes the first 1504 commits (+110 since v2.2) for IPv8, containing:

    • Added convenience add strategy method
    • Added settings for the sign timeouts
    • Added issue templates
    • Added advanced attestation tutorial
    • Added using pseudonym directory in working directory
    • Added a Pull Request template
    • Added mutation test badge to README
    • Added PyPi release GitHub action
    • Added a code of conduct
    • Added NetworkEndpoint REST API tests
    • Added EndpointDispatcher
    • Added multiple Peer interfaces support
    • Added HTTP status code verification to make_request
    • Added bytes_up and bytes_down to DispatcherEndpoint
    • Added speed test functionality to TunnelCommunity
    • Added message ID to tunnel payload classes
    • Added easy way to reset Endpoint byte counters
    • Added advanced identity doc to TOC
    • Fixed MockDHTProvider
    • Fixed Swagger docs when api_key is set
    • Fixed IPv8 exit node script
    • Fixed TaskManagers not being shutdown
    • Fixed encoding hostnames in TunnelCommunity
    • Fixed issue with missing public keys in OverlaysEndpoint
    • Fixed loadin database on CommunicationManager start
    • Fixed PR template folder
    • Fixed EndpointListener LAN estimation
    • Fixed M2CryptoSK.verify
    • Fixed wrong error in MockTunnelExitSocket
    • Fixed GitHub version incrementer script
    • Removed log statement
    • Removed check_num_packets from TunnelExitSocket
    • Removed Endpoint stresstest
    • Removed identity communities from default configuration
    • Removed json_util
    • Removed unnecessary ord calls
    • Updated relay_candidates to filter based on public_key
    • Updated documentation
    • Updated Getting Started in README.md
    • Updated RootEndpoint to be configurable
    • Updated Peer.address to be undeprecated
    • Updated on_ip_address to catch CancelledError
    • Updated message handlers to not use decode_map directly
    • Updated decode_map to be a list
    Source code(tar.gz)
    Source code(zip)
  • 2.2(Jun 29, 2020)

    Includes the first 1394 commits (+97 since v2.1) for IPv8, containing:

    • Added REST endpoint for measuring core drift
    • Added identity datatypes
    • Added token chaining datastructure
    • Added identity manager structures
    • Added ID 2.0 pseudonym management
    • Added v2 ID 2.0 REST API
    • Added Asyncio debug endpoints
    • Added apikey/TLS support to REST API server
    • Added ConfigBuilder
    • Fixed automated GitHub PR script
    • Fixed loosing peer_flags on disconnect
    • Fixed missing imports
    • Fixed coverage report not registering module-import coverage
    • Fixed PingChurn and updated DHT endpoints
    • Fixed bucket refreshing
    • Fixed test runner ignoring failures.
    • Fixed DHT ping assert location
    • Fixed Trustchain update script
    • Fixed deadlock while shutting down RequestCache
    • Updated the host binding for the REST api to be configurable
    • Updated id formats moved into SchemaManager
    • Updated testing infrastructure
    • Updated aesthetics and testing (documentation)
    • Updated tunnel endpoint
    • Updated DHT to use less bandwidth
    • Updated test files and sanity fixes
    • Updated auto version incrementer
    Source code(tar.gz)
    Source code(zip)
  • 2.1(Apr 20, 2020)

    Includes the first 1325 commits (+158 since v2.0) for IPv8, containing:

    • Replace twisted with asyncio
    • Added swagger docs
    • Added option to TaskManager for ignoring certain Exceptions
    • Added VariablePayload compilation decorator
    • Added united system path as scriptpath.py files
    • Added basic tests for the DataChecker class
    • Added ez_send shortcut
    • Added shortcut for adding Payload handlers
    • Added prefix mapping for endpoint
    • Added managed futures to RequestCache
    • Added get_overlay(s) method to MockIPv8
    • Added warning about long-running tasks in TaskManager
    • Fixed url for getting trustchain blocks for a specific user
    • Fixed issue with hidden services tests
    • Fixed trustchain crawler lambda
    • Fixed bootstrap test wrong assertion
    • Fixed readthedocs links
    • Fixed filter peers by community in RandomWalk strategy
    • Fixed tester scripts
    • Fixed script paths
    • Fixed tracker systemd file + error in the script
    • Fixed set size change in tracker
    • Fixed block broadcast in TrustChain
    • Fixed decrementing TTL when received block broadcast
    • Fixed removing inactive peers from tracker
    • Fixed TrustChain genesis block invariant validation
    • Fixed possible README PyPi issues
    • Fixed thread hog when no strategies are running
    • Fixed reuse of ports not being detected
    • Fixed various unhandled exceptions
    • Fixed the fallback argument for 'id_metadata'
    • Fixed binary data in TC tx err 500
    • Fixed AttestationEndpoint test
    • Fixed uncaught socket aton
    • Fixed RequestCache Future cancellation and allow custom timeout actions
    • Fixed duplicate task name
    • Fixed sqlite text type
    • Fixed token error if message arrives before DHT is initialized
    • Fixed resolve tunnel error
    • Fixed attestation tutorial documentation
    • Updated REST tests
    • Updated documentation
    • Updated TunnelCrypto to be compatible with libnacl 1.7
    • Updated usability for registering anonymous tasks
    • Updated project requirements
    • Updated half blocks in TrustChain documentation
    • Updated lambdas with functions
    • Updated verified_peers to set datastructure
    • Updated TrustChain crawler
    • Updated speedup DHT tests
    • Updated set instead of list for relayed_broadcast
    • Updated msg handler type check
    • Updated lazy_community docstrings
    • Updated avoid 'del' where possible
    Source code(tar.gz)
    Source code(zip)
  • v1.10(Jan 18, 2020)

    Includes the first 1167 commits (+61 since v1.9) for IPv8, containing:

    • Added support for trackers on same subnet
    • Added utf-8 decoding for deprecated custom encoding
    • Added multiple attestation requesting
    • Added Android prototype docs
    • Added IPv8 configuration docs
    • Added keys documentation
    • Added serialization documentation
    • Added VariablePayload compilation decorator
    • Added docs IPv8 features, Why does IPv8 exist?
    • Added TunnelCrypto compatibility with libnacl 1.7
    • Fixed trustchain block iter returning offset
    • Fixed puncture without DiscoveryCommunity
    • Fixed links in docs
    • Fixed to documentation
    • Fixed use of random.randint for IRMA
    • Fixed binding on_should_sign_outcome lambda variables at runtime
    • Fixed dictionary changed size errors
    • Fixed bootstrap test wrong assertion
    • Fixed IRMA build_proofs test
    • Fixed project requirements
    • Fixed peer inequality check in Python 2.7
    • Fixed readthedocs links
    • Fixed filter peers by community in RandomWalk strategy
    • Updated max crawl batch to be a setting
    • Updated md docs to rst
    • Updated docs to be Read the Docs compatible
    • Updated verified_peers to set datastructure
    • Updated half blocks in TrustChain documentation
    Source code(tar.gz)
    Source code(zip)
  • 1.9(Oct 16, 2019)

    Includes the first 1106 commits (+73 since v1.8) for IPv8, containing:

    • Added convenience struct for TrustChainBlock creation
    • Added option to disable broadcast for specific blocks
    • Added ping measurements for peers
    • Added irma proof import
    • Added hidden services DHT lookup retry
    • Added support for large block retrieval in DHTs
    • Added Network optimizations
    • Updated doc structure for mkdocs
    • Updated twistd path in systemd files
    • Fixed version incrementer
    • Fixed Python 3 integration
    • Fixed IPs/hostnames that are not str
    • Fixed boneh exact 0-vector certainty calculation
    • Fixed block type loading from database
    • Fixed ensure_* methods from six 1.12
    • Fixed hidden services peer discovery
    • Fixed tracker on same subnet connectability
    • Fixed sleeping on main thread in event loop
    • Fixed references to failure.value.message
    • Fixed loop cancel in strategy LoopingCall
    • Fixed wrapping result of should_sign in maybeDeferred
    • Fixed error when pinging in tunnel community
    • Fixed threading issue in create_circuit
    • Fixed blockcache using unwritable buffer name
    • Fixed REST test teardown
    • Fixed service cache not checking for verified peers
    • Fixed README.md links
    Source code(tar.gz)
    Source code(zip)
  • 1.8(Jun 24, 2019)

    Includes the first 1033 commits (+140 since v1.7) for IPv8, containing:

    • Added retry mechanism for new TC block publishing to DHT
    • Added anonymous communities
    • Added exitnode plugin
    • Added automatic setup.py version incrementer
    • Added Deferred return value to should_sign, crawl_chain methods
    • Added memory cache that holds blocks in your own chain
    • Added range proofs
    • Updated get_latest_blocks behaviour
    • Updated hidden services
    • Updated installation tutorial and add it to README.md
    • Updated attestation SDK
    • Fixed tunnel implementation
    • Fixed Python 3 REST encoding
    • Fixed TC crawling without knowing chain length
    • Removed bloom filter code
    • Removed netifaces requirement
    • Removed run_nose.py
    Source code(tar.gz)
    Source code(zip)
  • v1.7(Apr 13, 2019)

    Includes the first 893 commits (+29 since v1.6) for IPv8, containing:

    • Removed deprecated unpack_multiple_as_list
    • DHT fixes
    • Attestation REST endpoint fixes
    • Switched Bloomfilter to unicode
    • TunnelCommunity optimization
    Source code(tar.gz)
    Source code(zip)
  • v1.6(Feb 15, 2019)

    Includes the first 864 commits (+70 since v1.5) for IPv8, containing:

    • Improvements for Python 3 support
    • Fixed some corner cases when walking
    • Refactored TunnelCommunity
    • Added block withholding prevention through DHT
    • Updated documentation
    • Removed some unused features
    Source code(tar.gz)
    Source code(zip)
  • v1.5(Jan 29, 2019)

    Includes the first 794 commits (+17 since v1.4.1) for IPv8, containing:

    • TrustChain sanitizing logic fix
    • TrustChain chain length piggybacking format
    • Fixed peer discovery sybil region attack vector
    • Smoothed out IPv8 main update loop
    • Community ids for TrustChain/TestnetTrustChain updated
    • Fixed README for external sites
    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Jan 22, 2019)

  • v1.4(Jan 8, 2019)

    Includes the first 764 commits (+23 since v1.3) for IPv8, containing:

    • Optimizations of the DHT community
    • Fix for key loading in Python 3
    • Fix for IdentityCommunity database location
    • Serializer quality of life improvements
    Source code(tar.gz)
    Source code(zip)
  • v1.3(Nov 22, 2018)

    Includes the first 741 commits (+19 since v1.2) for IPv8, containing:

    • Undeprecation of various components.
    • Tracker fixes.
    • Attestation REST API fixes.
    • TrustChain fixes.
    Source code(tar.gz)
    Source code(zip)
  • v1.2(Nov 13, 2018)

    Includes the first 722 commits (+23 since v1.1) for IPv8, containing:

    • New tracker definition.
    • Custom walking strategies.
    • Python 3 unicode fixes.
    • TrustChain cache rescheduling fix.
    Source code(tar.gz)
    Source code(zip)
  • v1.1(Oct 24, 2018)

    Includes the first 699 commits (+33 since v1.0) for IPv8, containing:

    • Less aggressive DHT replication
    • More network analysis tools
    • More unit tests
    • More documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.0(Oct 9, 2018)

    Includes the first 666 commits for IPv8, containing:

    • Plain, signed and hidden messaging
    • Plain and hidden service discovery
    • Random and trust-based walks
    • The TrustChain blockchain
    • TrustChain Identity attestation
    Source code(tar.gz)
    Source code(zip)
Owner
null
This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

Nord Fondkommission AB 2 Dec 15, 2021
A powerful framework for decentralized federated learning with user-defined communication topology

Scatterbrained Decentralized Federated Learning Scatterbrained makes it easy to build federated learning systems. In addition to traditional federated

Johns Hopkins Applied Physics Laboratory 7 Sep 26, 2022
PyBERT is a serial communication link bit error rate tester simulator with a graphical user interface (GUI).

PyBERT PyBERT is a serial communication link bit error rate tester simulator with a graphical user interface (GUI). It uses the Traits/UI package of t

David Banas 59 Dec 23, 2022
This tools just for education only - Layer-7 or HTTP FLOODER

Layer-7-Flooder This tools just for education only - Layer-7 or HTTP FLOODER Require Col1 Before You Run this tools How To Use Download This Source Ex

NumeX 7 Oct 30, 2022
msgspec is a fast and friendly implementation of the MessagePack protocol for Python 3.8+

msgspec msgspec is a fast and friendly implementation of the MessagePack protocol for Python 3.8+. In addition to serialization/deserializat

Jim Crist-Harif 414 Jan 6, 2023
telnet implementation over TCP socket with python

This a P2P implementation of telnet. This program transfers data on TCP sockets as plain text

null 10 May 19, 2022
Python implementation of the Session open group server

API Documentation CLI Reference Want to build from source? See BUILDING.md. Want to deploy using Docker? See DOCKER.md. Installation Instructions Vide

Oxen 36 Jan 2, 2023
A pure python implementation of multicast DNS service discovery

python-zeroconf Documentation. This is fork of pyzeroconf, Multicast DNS Service Discovery for Python, originally by Paul Scott-Murphy (https://github

Jakub Stasiak 483 Dec 29, 2022
QUIC and HTTP/3 implementation in Python

aioquic What is aioquic? aioquic is a library for the QUIC network protocol in Python. It features a minimal TLS 1.3 implementation, a QUIC stack and

null 1.2k Dec 29, 2022
A pure-Python KSUID implementation

Svix - Webhooks as a service Svix-KSUID This library is inspired by Segment's KSUID implementation: https://github.com/segmentio/ksuid What is a ksuid

Svix 83 Dec 16, 2022
BaseSpec is a system that performs a comparative analysis of baseband implementation and the specifications of cellular networks.

BaseSpec is a system that performs a comparative analysis of baseband implementation and the specifications of cellular networks. The key intuition of BaseSpec is that a message decoder in baseband software embeds the protocol specification in a machine-friendly structure to parse incoming messages;

SysSec Lab 35 Dec 6, 2022
A Scapy implementation of SMS-SUBMIT and (U)SIM Application Toolkit command packets.

A Scapy implementation of SMS-SUBMIT and (U)SIM Application Toolkit command packets.

mnemonic 83 Dec 11, 2022
The Delegate Network: An Interactive Voice Response Delegative Democracy Implementation of Liquid Democracy

The Delegate Network Overview The delegate network is a completely transparent, easy-to-use and understand version of what is sometimes called liquid

James Bowery 2 Feb 25, 2022
netpy - more than implementation of netcat 🐍🔥

netpy - more than implementation of netcat ????

Mahmoud S. ElGammal 1 Jan 26, 2022
A simple implementation of an RPC toolkit

Simple RPC With Raw Sockets Repository for the Data network course project: Introduction In this project, you will attempt to code a simple implementa

Milad Samimifar 1 Mar 25, 2022
Medusa is a cross-platform agent compatible with both Python 3.8 and Python 2.7.

Medusa Medusa is a cross-platform agent compatible with both Python 3.8 and Python 2.7. Installation To install Medusa, you'll need Mythic installed o

Mythic Agents 123 Nov 9, 2022
ProtOSINT is a Python script that helps you investigate Protonmail accounts and ProtonVPN IP addresses

ProtOSINT ProtOSINT is a Python script that helps you investigate ProtonMail accounts and ProtonVPN IP addresses. Description This tool can help you i

pixelbubble 249 Dec 23, 2022
A Python tool used to automate the execution of the following tools : Nmap , Nikto and Dirsearch but also to automate the report generation during a Web Penetration Testing

?? WebMap A Python tool used to automate the execution of the following tools : Nmap , Nikto and Dirsearch but also to automate the report generation

Iliass Alami Qammouri 274 Jan 1, 2023
Light, simple RPC framework for Python

Agileutil是一个Python3 RPC框架。基于微服务架构,封装了rpc/http/orm/log等常用组件,提供了简洁的API,开发者可以很快上手,快速进行业务开发。

null 16 Nov 22, 2022