Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonrpc-feature returned #417

Merged
merged 42 commits into from
Nov 29, 2023
Merged

jsonrpc-feature returned #417

merged 42 commits into from
Nov 29, 2023

Commits on Nov 29, 2023

  1. feat: go from websocket-server to json rpc websocket/http server

    Includes:
      - re-purposing of feature flags
        * metrics is always a thing (on)
        * monitoring is the gated feature
        * websocket-server flag is gone, we only gate push notifications
      - jsonrpc setup and rpc method register
      - prometheus exposition format to json parser
      - Added todo around split networking config
    
    Notes:
      - will not merge this in until example app has been restored with the client changes
    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    27257ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16392e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    234621d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ed774e4 View commit details
    Browse the repository at this point in the history
  5. chore: test setup

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    708369e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6da6e71 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3af2ff1 View commit details
    Browse the repository at this point in the history
  8. chore: cleanup

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    5659f06 View commit details
    Browse the repository at this point in the history
  9. chore: fix warning

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    049a4ba View commit details
    Browse the repository at this point in the history
  10. chore: comment

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    44b8485 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    64bfe77 View commit details
    Browse the repository at this point in the history
  12. feat: Add event notifications (#410)

    # Description
    
    This pull request implements the following changes:
    
    - [x] Add event notifications
    - [x] Add `emit_event` notification utility function
    - [x] Add `emit_receipt` notification utility function
    - [x] Move receipt notifications to event handler notifications
    - [x] Add `ConnnectionEstablished`, `ConnnectionClosed`, `ListeningOn`,
    `OutgoingConnectionError`, and `IncomingConnectionError` network
    notifications
    - [x] Test JSON event notification bytes roundtrip
    - [x] Test JSON event notification string roundtrip
    - [x] Integration test connection notifications with two Homestar nodes
    
    ## Link to issue
    
    Closes #407
    
    ## Type of change
    
    - [x] New feature (non-breaking change that adds functionality)
    
    ## Test plan (required)
    
    We have included unit tests to check roundtrip conversions between JSON
    bytes and strings. In addition, we have included an integration test
    that subscribes and listens for connection messages between Homestar
    nodes.
    
    ---------
    
    Co-authored-by: Zeeshan Lakhani <[email protected]>
    bgins and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    058deef View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    713718e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ff4ebc8 View commit details
    Browse the repository at this point in the history
  15. chore: add one cleanup

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    aa1d673 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    14d7dc2 View commit details
    Browse the repository at this point in the history
  17. chore: test fixins

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    20694da View commit details
    Browse the repository at this point in the history
  18. chore: minor updates

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    f6a3b4f View commit details
    Browse the repository at this point in the history
  19. chore: updates

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    b7ae3f9 View commit details
    Browse the repository at this point in the history
  20. chore: updates

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    0aac079 View commit details
    Browse the repository at this point in the history
  21. chore: updates

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    b88d113 View commit details
    Browse the repository at this point in the history
  22. chore: updates

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    b233e1c View commit details
    Browse the repository at this point in the history
  23. chore: testing

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    522b42a View commit details
    Browse the repository at this point in the history
  24. feat: Add pubsub receipt sharing notifications (#418)

    # Description
    
    This PR implements the following changes:
    
    - [x] Add receipt published and received notifications
    - [x] Update receipt sharing log messages
    - [x] Add receipt sharing integration test
    - [x] Add `remove_db` and `wait_for_socket_connection` test utilities
    - [x] Update JSON `peer_id` key to `peerId`
    
    ## Link to issue
    
    Implements #131 
    
    ## Type of change
    
    - [x] New feature (non-breaking change that adds functionality)
    - [x] Refactor (non-breaking change that updates existing functionality)
    
    ## Test plan (required)
    
    This PR includes an integration test that checks for gossiped receipts
    in websocket notifications and logs.
    
    ---------
    
    Co-authored-by: Zeeshan Lakhani <[email protected]>
    bgins and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    476c47f View commit details
    Browse the repository at this point in the history
  25. refactor: Fix connection notification test (#424)

    # Description
    
    - [x] Fix the connection notification integration test
    - [x] Avoid event hooks to IPFS in tests 
    
    ## Type of change
    
    - [x] Refactor (non-breaking change that updates existing functionality)
    
    ## Test plan (required)
    
    Improved connection notification test included to move away from
    arbitrary waits to event-driven notification tests.
    
    ---------
    
    Co-authored-by: Zeeshan Lakhani <[email protected]>
    bgins and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    7ad88b5 View commit details
    Browse the repository at this point in the history
  26. chore: additional test

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    b9cfa50 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    82f3348 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    0616a33 View commit details
    Browse the repository at this point in the history
  29. refactor: (#429)

    # Description
    
    This PR includes the following changes:
    
    - [x] Set gossip `max_transmit_size`
    - [x] Handle Kademlia `InboundRequest` events
    
    ## Type of change
    
    - [x] Refactor (non-breaking change that updates existing functionality)
    bgins authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    951abe6 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    9f817f2 View commit details
    Browse the repository at this point in the history
  31. chore: builds trial1

    zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    da344c1 View commit details
    Browse the repository at this point in the history
  32. fix: make configuration run without -c (all defaults) (#433)

    Includes:
    
    - also, add starter functions for default .pem/settings initialization
    - error handling around retry, wasms
    - ups the transport timeout
    Zeeshan Lakhani authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    11a8f88 View commit details
    Browse the repository at this point in the history
  33. refactor: static/dynamic nodeinfo and recv deadlines (#435)

    Zeeshan Lakhani authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    0cd381d View commit details
    Browse the repository at this point in the history
  34. refactor: Add Gossipsub Message wrapper (#436)

    # Description
    
    This PR implements the following changes:
    
    - [x] Add gosssipsub message wrapper
    - [x] Rename `store_and_notify` to `publish_and_notify`
    
    The message wrapper includes a header with a nonce to force the gossip
    of duplicate receipts. We will likely expand on the header in future
    work and make the nonce optional.
    
    ## Link to issue
    
    Implements #421.
    
    ## Type of change
    
    - [x] Refactor (non-breaking change that updates existing functionality)
    
    ## Test plan (required)
    
    We've added a unit test to roundtrip a gossiped message to bytes and
    back again. We also have a gossip notifications integration test to
    confirm messages are still sent.
    
    ---------
    
    Co-authored-by: Zeeshan Lakhani <[email protected]>
    bgins and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    59383e5 View commit details
    Browse the repository at this point in the history
  35. fix: schedule + db conflict (#437)

    Zeeshan Lakhani authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    ce0c49f View commit details
    Browse the repository at this point in the history
  36. fix: remove unnecessary decode (#438)

    Fix: remove unnecessary decode of already utf8-ed string from wasmval.
    Zeeshan Lakhani authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    0b37875 View commit details
    Browse the repository at this point in the history
  37. chore: Remove databases after test runs (#444)

    # Description
    
    This PR implements the following changes:
    
    - [x] Remove temporary databases after test runs
    
    ## Type of change
    
    - [x] Refactor (non-breaking change that updates existing functionality)
    
    ## Test plan (required)
    
    The tests should pass and leave no databases behind.
    bgins authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    032427e View commit details
    Browse the repository at this point in the history
  38. chore: send_async where possible (#445)

    Includes:
    
    - a rename of `asyncboundedchannel*` to `asyncchannel` to accomodate
    unbounded channels
    - remove receipt logging with too much output
    Zeeshan Lakhani authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    c858c68 View commit details
    Browse the repository at this point in the history
  39. refactor: Refactor and split-up settings (#451)

    # Description
    
    This PR implements the following changes:
    
    - [x] Break up `[node.network]` settings into smaller groups
    - [x] Move `[monitoring]` settings to `[node.monitoring]`
    - [x] Add `defaults.toml` with complete settings matching the defaults
    - [x] Reduce the settings passed to consumers to the minimum necessary
    - [x] Update test fixtures using the new settings
    - [x] Update and add comments
    
    A complete version of the updated settings will look something like:
    
    ```toml
    [node]
    gc_interval = 1800
    shutdown_timeout = 20
    
    [node.database]
    url = "homestar.db"
    max_pool_size = 100
    
    [node.monitoring]
    process_collector_interval = 5000
    console_subscriber_port = 6669
    
    [node.network]
    events_buffer_len = 1024
    poll_cache_interval = 1000
    
    [node.network.ipfs]
    host = "127.0.0.1"
    port = 5001
    
    [node.network.libp2p]
    listen_address = "/ip4/0.0.0.0/tcp/0"
    node_addresses = []
    announce_addresses = []
    transport_connection_timeout = 60
    max_connected_peers = 32
    max_announce_addresses = 10
    
    [node.network.libp2p.mdns]
    enable = true
    enable_ipv6 = false
    query_interval = 300
    ttl = 540
    
    [node.network.libp2p.rendezvous]
    enable_client = true
    enable_server = false
    registration_ttl = 7200
    discovery_interval = 600
    
    [node.network.libp2p.pubsub]
    enable = false
    duplication_cache_time = 1
    heartbeat = 60
    idle_timeout = 86400
    max_transmit_size = 10485760
    mesh_n_low = 1
    mesh_n_high = 10
    mesh_n = 2
    mesh_outbound_min = 1
    
    [node.network.libp2p.dht]
    p2p_provider_timeout = 30
    receipt_quorum = 2
    workflow_quorum = 3
    
    [node.network.keypair_config]
    random = { }
    
    [node.network.metrics]
    port = 4000
    
    [node.network.rpc]
    host = "::1"
    port = 3030
    max_connections = 10
    server_timeout = 120
    
    [node.network.webserver]
    host = "127.0.0.1"
    port = 1337
    timeout = 120
    websocket_capacity = 2048
    websocket_receiver_timeout = 30000
    
    ```
    
    ## Link to issue
    
    Closes #442 
    
    ## Type of change
    
    - [x] Refactor (non-breaking change that updates existing functionality)
    - [ ] This change requires a documentation update. (It does. Will do.)
    - [x] Comments have been added/updated.
    
    ## Test plan (required)
    
    All existing tests should pass with the updated fixtures.
    bgins authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    3168793 View commit details
    Browse the repository at this point in the history
  40. Update websocket relay example app (#448)

    This PR implements the following changes:
    
    - [x] Update example to use Homestar client:
    https://www.npmjs.com/package/@fission-codes/homestar
    - [x] Remove emulation mode
    
    Implements #390
    
    - [x] Refactor (non-breaking change that updates existing functionality)
    
    The example should be tested manually to verify it works.
    
    ---------
    
    Signed-off-by: Brian Ginsburg <[email protected]>
    Co-authored-by: Hugo Dias <[email protected]>
    2 people authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    7c45cf5 View commit details
    Browse the repository at this point in the history
  41. feat: add npm package to homestar runtime (#434)

    - adds npm packages to homestar-runtime.
    - adds CI/CD to build and publish wrapper package and os specific packages.
    hugomrdias authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    0aa6e3a View commit details
    Browse the repository at this point in the history
  42. chore: comments, logs, & cleanup (#456)

    # Description
    
    Remove many TODOs, add comments on *pub* (*pub* crate), and work through
    logs.
    
    - Includes a few other minor fixins and additions. 
    
    ## Type of change
    
    - [X] Refactor (non-breaking change that updates existing functionality)
    
    Closes #262.
    
    ---------
    
    Signed-off-by: Zeeshan Lakhani <[email protected]>
    Co-authored-by: Brian Ginsburg <[email protected]>
    2 people authored and zeeshanlakhani committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    f794950 View commit details
    Browse the repository at this point in the history