Skip to content

Feat/api daemon#494

Open
zeroXbrock wants to merge 34 commits intomainfrom
feat/api-daemon
Open

Feat/api daemon#494
zeroXbrock wants to merge 34 commits intomainfrom
feat/api-daemon

Conversation

@zeroXbrock
Copy link
Member

Motivation

Manage multiple [long-running] scenarios remotely.

Solution

Host a JSON-RPC server that manages contender sessions.

  • log streaming over WS or SSE
  • per-session seeds to prevent accidental tx/nonce conflicts
  • spam a scenario multiple times w/o repeating funding/setup
  • RPC methods: add_session, get_session, spam, stop, remove_session

TODO:

  • add an endpoint to fund the spammers
  • add a keystore to the server; enable multiple users to fund accounts simultaneously (currently relying on one key for all funding, which also causes conflicts when initializing multiple scenarios at once (calling add_session))
  • maybe more endpoints? What else about the scenario/spammer would we like to control?

PR Checklist

  • Added Tests
  • Added Documentation
  • Ran cargo +nightly clippy --workspace --lib --examples --tests --benches --all-features --locked --fix
  • Ran cargo fmt --all
  • Note breaking changes in PR description, if applicable
  • update changelogs
    • Update CHANGELOG.md in each affected crate
    • add a high-level description in the root changelog

- cli just drops the ref, which shuts it down naturally
- orchestrator (when run in server) doesn't, so we need to invoke
  the CancellationToken's cancel() function manually
  ... before marking status as Ready
 + stream log for 'stop' method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants