From 9e32b02adad4421688e4657e170bba0c582a71d6 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 15 Dec 2022 22:21:19 -0800 Subject: [PATCH] improve docs --- README.md | 14 +++++--------- TODO.md | 11 ++++++----- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ca8aafb9..acf75ed4 100644 --- a/README.md +++ b/README.md @@ -107,20 +107,16 @@ Health check 3 servers and error if the first one doesn't match the others. web3_proxy_cli https://eth.llamarpc.com/ https://rpc.ankr.com/eth https://cloudflare-eth.com ``` -## Database entities - -This command only needs to be run during development. Production should use the already generated entities. - -When developing new database migrations, **after you migrate**, run this command to generate updated entity files. It's best to keep the migration and entity changes in the same commit. +## Adding new database tables ``` cargo install sea-orm-cli ``` -``` -sea-orm-cli generate entity -u mysql://root:dev_web3_proxy@127.0.0.1:13306/dev_web3_proxy -o entities/src --with-serde both -``` -After running the above, you will need to manually fix some columns: `Vec` -> `sea_orm::prelude::Uuid` and `i8` -> `bool`. Related: +1. (optional) drop the current dev db +2. `sea-orm-cli migrate` +3. `sea-orm-cli generate entity -u mysql://root:dev_web3_proxy@127.0.0.1:13306/dev_web3_proxy -o entities/src --with-serde both` +4. After running the above, you will need to manually fix some columns: `Vec` -> `sea_orm::prelude::Uuid` and `i8` -> `bool`. Related: ## Flame Graphs diff --git a/TODO.md b/TODO.md index f65cee06..090f7849 100644 --- a/TODO.md +++ b/TODO.md @@ -256,6 +256,11 @@ These are roughly in order of completition - [x] be sure to save the timestamp in a way that our request routing logic can make use of it - [x] node selection still needs improvements. we still send to syncing nodes if they are close - try consensus heads first! only if that is empty should we try others. and we should try them sorted by block height and then randomly chosen from there + +## V1 + +These are not yet ordered. There might be duplicates. We might not actually need all of these. + - [ ] having the whole block in status is very verbose. trim it down - [ ] `cost estimate` script - sum bytes and number of requests. prompt hosting costs. divide @@ -266,11 +271,7 @@ These are roughly in order of completition - it won't happen with users often because they should be sticky to one proxy, but unauthenticated users will definitely hit this - one option: we need the insert to be an upsert, but how do we merge historgrams? - [ ] put display name into our prod configs - -## V1 - -These are not yet ordered. There might be duplicates. We might not actually need all of these. - +- [ ] don't use systemtime. use chrono - [ ] soft limit needs more thought - it should be the min of total_sum_soft_limit (from only non-lagged servers) and min_sum_soft_limit - otherwise it won't track anything and will just give errors.