erigontech / erigontech/erigon
Refator domains API to include a context
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.5k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 455
Description
See: https://github.com/erigontech/erigon/pull/17783
I added to allow passing of contextual metering into the aggregator TX:
```go
func (at *AggregatorRoTx) MeteredGetLatest(domain kv.Domain, k []byte, tx kv.Tx, maxStep kv.Step, metrics *changeset.DomainMetrics, start time.Time) (v []byte, step kv.Step, ok bool, err error)
```
This would be more consistent with standard go metering practice if we passed this via a context.Context, but the TX API does not include a context. The above was implemented as tactical fix.
Not also we probably want to add tracing into oTX's for the same reason so we can trace the contribution to high level activities made by these lower level funtions. If we do this we should probably also pass the logger via the context, which is also standard go practice, rather than adding it as a function argument (this thoough is quite a major refactor).
Contributor guide
Assessment
This issue has not been assessed yet.