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

[Bug]: Non-validator nodes fall out of consensus when proposing asset with bogus chain-id #10955

Closed
wwestgarth opened this issue Mar 20, 2024 · 0 comments · Fixed by #10963
Closed

Comments

@wwestgarth
Copy link
Contributor

Problem encountered

When proposing an ERC20 asset and accidently setting the EVM chain-id to be one that does not correspond to any of Vega's bridge, non-validator nodes fall out of consensus. This is because the code that validates an asset against bridge chain-ids is a validator-only code path and so the asset proposal does not fail on non-validator nodes:

if s.isValidator {
	client, err := s.ethClientByChainID(assetDetails.GetERC20().ChainID)
	if err != nil {
		return nil, err
	}
	a, err := erc20.New(assetID, assetDetails, s.ethWallet, client)
	if err != nil {
		return nil, err
	}
	asset = a
} else {
	a, err := erc20.New(assetID, assetDetails, nil, nil)
	if err != nil {
		return nil, err
	}
	asset = a
}

Observed behaviour

Non-validator nodes fall out of consensus

Expected behaviour

Non-validator nodes remain in consensus

Steps to reproduce

Checkout branch `0027-ASSP-032`
Run `test_propose_new_erc20_bogus_chain_id`

Software version

develop

Failing test

No response

Jenkins run

No response

Configuration used

No response

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants