0xMiden / 0xMiden/node

Rate limiting on client sync state

Đang mở
#1,805 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
104
Fork
138
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
56

Mô tả

While benchmarking the web client's sync state against a local node with a seeded store, the rate limiting default values cause the sync to fail:
```
Caused by:
0: grpc request failed for get_notes_by_id: request was rate-limited or the node's resources are exhausted; retry after a delay
1: code: 'Some resource has been exhausted', message: "Too Many Requests! Wait for 0s"
```

Setting the node with more relaxed rate limiting allows the sync to complete successfully.

This might differ on testnet due to the network latency on each request. Anyway, we might want to check these values considering the normal client behaviour, or perhaps we should introduce a backoff on the client side to avoid being rate limited, thus making the sync slower.

----
To reproduce it:

On the node side (use branch `tomasarrachea-seed-store-consume-notes`):
1. Start the seeded node:
```bash
cargo run --release --bin miden-node-stress-test -- seed-collector --data-directory ./data --num-blocks 200

cargo run --release --bin miden-node -- bundled start --data-directory ./data --rpc.url http://localhost:57291
```
2. Check the seeded account id:
```sh
cat data/accounts.txt
```

On the client side (branch `tomasarrachea-sync-benchmark`):
1. Run the client benchmark against that account:
```sh
cargo run --release -p miden-client-bench -- sync --account-id
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.