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

Incorrect calculate blockchain hash in evm rpc module #751

@louisliu2048

Description

@louisliu2048

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.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions