Skip to content
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

Closes #489: Compute Circulating Supply and expose via backend #504

Closed
wants to merge 1 commit into from

Conversation

khorolets
Copy link
Member

@khorolets khorolets commented Dec 16, 2020

Closes #489

As for Acceptance Criteria

The value is re-computed every 2 hours (note: adjust the number if necessary)

The value is re-computed every 1 hour instead of 2 because it takes ~20s to run.

Non-mainnet networks return undefined

returns 404, didn't change that

@render
Copy link

render bot commented Dec 16, 2020

Copy link
Collaborator

@frol frol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. We need to confirm that the values are in line with the expectations

};

// viewLockupState function taken from https://github.com/near/account-lookup/blob/master/script.js
const viewLockupState = async (contractId, blockHeight) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just something that I noticed and was curious about; is it safe for viewLockupState() to retry indefinitely when it encounters any type of error, with no boundary to how many times it retries, and no error reporting if it has to retry many times to finish? Feels like this could permanently deadlock if fed e.g. a bad contractId? Same with while(true) loops on L126 & L152 of this file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaximusHaximus Thanks for pointing those out! This is a draft PR that we needed to collect the figures in the first place. Since then we have done more exploration of the space, and @telezhnaya will take it over from here solidifying the implementation and having graceful retry strategies.

telezhnaya pushed a commit that referenced this pull request May 21, 2021
telezhnaya pushed a commit that referenced this pull request May 21, 2021
@frol
Copy link
Collaborator

frol commented May 21, 2021

Closing in favor of #636

@frol frol closed this May 21, 2021
telezhnaya added a commit that referenced this pull request May 24, 2021
    @khorolets solution that needs to be finished
    #504
    Decided not to apply changes to frontend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compute Circulating Supply and expose via backend
3 participants