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

[venus] consensus: validate block within range / 共识:验证区块进来的时间 #5931

Closed
1 task
Fatman13 opened this issue Apr 24, 2023 · 2 comments
Closed
1 task
Assignees
Labels
C-triage Category: Need triage CU-chain-service Venus chain service related issues P2 Medium - we should get to this soon

Comments

@Fatman13
Copy link
Collaborator

Fatman13 commented Apr 24, 2023

@diwufeiwen 大佬,这个是不是就是你之前说的,直接协议里面验证后来的区块,直接否定掉?

关联:

This will reject blocks in pubsub validation if they're either:

  • Too far into the future (5 blocks beyond the expected head).
  • Too far into the past (before finality).

Specifically:

  • We were previously rejecting future blocks in the sync logic, but not in pubsub itself.
  • We never used to check if a block was too old.

Motivation: Blocks that are too new/too old can cause us to perform quite a bit of unnecessary work.

We should carefully consider that second check as we may need to tweak it (e.g., to handle network issues?). We may want to base this check on the latest synced head, not the expected epoch.

@Fatman13 Fatman13 added Epic CU-chain-service Venus chain service related issues C-triage Category: Need triage labels Apr 24, 2023
@Fatman13 Fatman13 changed the title [venus] validate block within range / 验证区块进来的时间 [venus] consensus: validate block within range / 共识:验证区块进来的时间 Apr 24, 2023
@diwufeiwen
Copy link
Contributor

不是,这个是在同步模块的pubsub(libp2p)层检查排除来自未来的或者太过落后于当前head的区块。修改前的逻辑,假设一个区块来自未来,在libp2p收到区块不会验证,进入同步逻辑时才验证,修改后收到广播的区块就会就行前面说的两个验证。

@diwufeiwen diwufeiwen removed their assignment Apr 24, 2023
@diwufeiwen diwufeiwen added the P2 Medium - we should get to this soon label Apr 24, 2023
@Fatman13 Fatman13 removed the Epic label Apr 24, 2023
@diwufeiwen diwufeiwen self-assigned this May 22, 2023
@diwufeiwen
Copy link
Contributor

venus的同步逻辑不一样,无需引入

@Fatman13 Fatman13 closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-triage Category: Need triage CU-chain-service Venus chain service related issues P2 Medium - we should get to this soon
Projects
Status: Done
Development

No branches or pull requests

2 participants