Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Incorrect calculate blockchain hash in evm rpc module #751

Closed
louisliu2048 opened this issue Jan 27, 2021 · 1 comment · Fixed by #755
Closed

Incorrect calculate blockchain hash in evm rpc module #751

louisliu2048 opened this issue Jan 27, 2021 · 1 comment · Fixed by #755

Comments

@louisliu2048
Copy link

System info: [Include Ethermint commit, operating system name, and other relevant details]
In app/rpc/namespace directory, the method to get blockHash is:
blockHash := common.BytesToHash(block.Block.Header.Hash())
but in tendermint, the method to get blockHash is:
tendermint/state/execution.go:284

	// Begin block
	var err error
	abciResponses.BeginBlock, err = proxyAppConn.BeginBlockSync(abci.RequestBeginBlock{
		Hash:                block.Hash(),
		Header:              types.TM2PB.Header(&block.Header),
		LastCommitInfo:      commitInfo,
		ByzantineValidators: byzVals,
	})

Header.Hash() will not include LastCommit *Commit info!
The current method will introduce #721 error.

Steps to reproduce:

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Additional info: [Include gist of relevant config, logs, etc.]

@fedekunze
Copy link
Contributor

closed via #755

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants