Skip to content

Commit

Permalink
Remove validator throttle (#1828)
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 authored Oct 4, 2024
1 parent e0db143 commit 8bf66ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-mayflies-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@penumbra-zone/query': patch
---

Remove validator info throttle
14 changes: 0 additions & 14 deletions packages/query/src/block-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,6 @@ export class BlockProcessor implements BlockProcessorInterface {
}
}

// TODO: refactor. there is definitely a better way to do this. batch
// endpoint issue https://github.com/penumbra-zone/penumbra/issues/4688
private async updateValidatorInfos(nextEpochStartHeight: bigint): Promise<void> {
// It's important to clear the table so any stale (jailed, tombstoned, etc) entries are filtered out.
await this.indexedDb.clearValidatorInfos();
Expand All @@ -663,18 +661,6 @@ export class BlockProcessor implements BlockProcessorInterface {
validatorInfoResponse,
nextEpochStartHeight,
);

// this loop requests delegation token metadata for each validator
// individually. there may be very many, so we must artificially delay
// this loop or the RPC may hard-ratelimit us.
await new Promise(
resolve =>
void setTimeout(
resolve,
// an entire second
1000,
),
);
}
}

Expand Down

0 comments on commit 8bf66ea

Please sign in to comment.