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

API server refactor & fee features #26

Merged
merged 7 commits into from
Feb 20, 2022
Merged

API server refactor & fee features #26

merged 7 commits into from
Feb 20, 2022

Conversation

mononaut
Copy link
Collaborator

Big refactor of the backend API server to enable extension of transactions with prevout data and calculation of transaction fees, as well as:

  • Improved concurrency.
  • Better handling of RPC calls.
  • Accurate reporting of mempool size.
  • Serving new block data over http instead of holding up websocket events.

Front end display of fees and feerates in the TxInfo and BlockInfo views.

Ccolor-by-feerate feature, with a new color scheme.

resolves #8, resolves #9, and progress towards #10

Avoid sending large block data messages over websocket,
which block transaction updates, especially on lower
bandwidth connections.

Instead, only send the block id over websocket, and
then fetch over http with good caching
Fetch prevouts for solo and block transactions,
and calculate input values & tx fees.

Naive initial implementation with no caching,
so block processing is sloooooooooooooow.
API:
- Better RPC handling (cache credentials)
- Process transaction prevouts in dedicated Tasks
- Consume ZMQ sequence msgs
- Track mempool count precisely
- Cache prevouts for mempool transactions
- Send mempool count with every client msg, instead of reconstructing client-side
- Only send block ids over websocket, let clients fetch the full block data via http

Client:
- Simplify transaction queue to avoid setTimeouts
  - improves experience in background tabs
  - no longer need to hold back txs, as duplicates are now handled API-side
- Use API-supplied mempool count, instead of tracking it client-side
- Make mempoolCount a Svelte spring store, so updates transition smoothly
@mononaut mononaut merged commit d8cc46b into master Feb 20, 2022
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.

Display transactions fees and fee-rates Calculate transaction fees
1 participant