Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nounder/daimo-tx-latency
https://github.com/nounder/daimo-tx-latency
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nounder/daimo-tx-latency
- Owner: nounder
- Created: 2024-06-27T00:50:48.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-02T19:22:48.000Z (5 months ago)
- Last Synced: 2024-08-27T01:42:15.493Z (3 months ago)
- Language: TypeScript
- Size: 301 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Measure latency from broadcasting a transaction to its inclusion in a block:
```
(broadcast tx) -> (first appeareance of a block) -> (block timestamp)
```Transaction is sent directly with `eth_sendRawTransaction` RPC call. All related
calls necessary to make a transaction (gas, block number, nonce) were done
outside of timing window for higher measurement accuracy.# Configure
```sh
# setup dotenv file
cp .env.example .env# edit the config according to comments inside
vim .env
```Make sure you have `deno` and `duckdb` installed
# Usage
```sh
# start broadcasting and tracking transactions
deno run -A main.ts | tee /dev/tty | rg -r '' '\t' > out/events.jsonl# dump stats
duckdb < events.sql
```