-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decrease token metadata update interval #1691
Conversation
Triggering supply update when we encounter a token transfer in indexer seems to be a better idea to me |
Pull Request Test Coverage Report for Build ee7b562b-e559-4f77-aaaa-fecfae6ca2ab
💛 - Coveralls |
I can add it but we still need fetching in the controller because there are already a lot stale tokens |
If I understand correctly, the complete update of all of them should be triggered by application server restart anyway. |
no, it'll be 2 days after the restart |
It sends a message to itself immediately. My point is, we should strive to import blocks with most of relevant metadata in near-realtime on a steady and predictable pace. This way we won't need to add ad-hoc out-of-band requests from frontend to indexer. The problem with such requests is that they create an attack vector by exposing indexer to outer world and allowing external users to influence its request rate. |
@@ -13,19 +13,13 @@ defmodule Indexer.Token.FetcherTest do | |||
describe "init/3" do | |||
test "returns uncataloged tokens", %{json_rpc_named_arguments: json_rpc_named_arguments} do | |||
insert(:token, cataloged: true) | |||
%Token{contract_address_hash: uncatalog_address} = insert(:token, cataloged: false) | |||
%Token{contract_address_hash: uncatalog_address} = insert(:token, cataloged: false) |> IO.inspect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IO.inspect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad
fixes #1689
Motivation
Update interval for token metadata is one week. The app is being deployed more often recently so token metadata cannot be updated.
Changelog