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

Sequential blocks broadcast on the main page #5491

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Apr 22, 2022

Motivation

Prevent broadcasting new block if previous one wasn't indexed yet. The fix is aimed to prevent situation like on this screenshot:

Screenshot-2022-04-12-at-18-00-17 (1)

Changelog

  • Store last broadcasted block number in in-memory cache (ETS).
  • If block to be broadcasted has number > cached last broadcasted number + 1, broadcast function waits until previous blocks broadcasted by periodically requesting cached last broadcasted block number value every 0.5 sec.
  • In case of 4 blocks gap, which is the maximum number of blocks on the main page, broadcast is allowed again.

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-sequential-block-broadcast branch from 4c36682 to 570a054 Compare April 22, 2022 15:36
@vbaranov vbaranov force-pushed the vb-sequential-block-broadcast branch from 570a054 to 5fb3229 Compare April 22, 2022 18:08
@vbaranov vbaranov merged commit 5de55bc into master Apr 22, 2022
@vbaranov vbaranov deleted the vb-sequential-block-broadcast branch April 22, 2022 19:04
sidhujag pushed a commit to syscoin/blockscout that referenced this pull request May 11, 2022
…k-broadcast

Sequential blocks broadcast on the main page
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.

None yet

1 participant