ChainSafe / ChainSafe/forest

Limit drand relay calls in tests

Open
#7,464 0 comments 0 reactions 1 assignee Claimed by @EclesioMeloJunior View on GitHub
Type: Task
Dominant language
Rust
Stars
697
Forks
200
Avg merge
1d 5h
Merged PRs (30d)
65

Description

# Summary

Unit tests should depend on external resources as little as possible (to reduce flakiness and be nice). Right now a single `cargo nextest` would make burst of ~23 calls to the drand HTTPS relay

```
2 api2.drand.sh
2 api3.drand.sh
15 api.drand.sh
4 drand.cloudflare.com
```

This doesn't count possible retries.

# Completion Criteria

- [ ] contrive a way to limit drand relay usage in tests. We already have some mocking mechanisms around there. Doing some memoization might also be fine, but ideally we'd go down to zero foreign calls.
- [ ] check the calls done when running snapshot tests - the snapshot might need to get replaced if the node is able now to get data from block headers

# Additional Links & Resources

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.