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

Some Questions About Weak Subjectivity #25

Open
MobillsInMobild opened this issue Feb 21, 2023 · 0 comments
Open

Some Questions About Weak Subjectivity #25

MobillsInMobild opened this issue Feb 21, 2023 · 0 comments

Comments

@MobillsInMobild
Copy link

Hi, Sorry to bother you with questions about some weak subjectivity implementations. In the Golang implementation of the Tendermint light client, the light client not only includes Commit Verification, but also supports Attack Detection. I think the latter is a weak subjectivity implementation, otherwise there may be a risk of long-range attacks. In the Golang implementation, after Commit Verification, the light client will interact with the witnesses to execute execute a function called detectDivergence.

// see VerifyHeader
func (c *Client) verifySequential(
	ctx context.Context,
	trustedBlock *types.LightBlock,
	newLightBlock *types.LightBlock,
	now time.Time) error {
        ....
	// Compare header with the witnesses to ensure it's not a fork.
	// More witnesses we have, more chance to notice one.
	//
	// CORRECTNESS ASSUMPTION: there's at least 1 correct full node
	// (primary or one of the witnesses).
	return c.detectDivergence(ctx, trace, now)
}

In the comments of the fuction detectDivergence, it is described like this:

// The detector component of the light client detects and handles attacks on the light client.

// detectDivergence is a second wall of defense for the light client.

I don't seem to find an Attack Detection related implementation in your code, which makes me worry about the possibility of attacks such as long-range attacks. However, for smart contracts, the witnesses seem to be difficult to achieve. Do you have any thoughts on these questions?

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

No branches or pull requests

1 participant