diff options
author | Sonic <sonic@dexon.org> | 2019-01-18 11:55:51 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:21 +0800 |
commit | 1c01b079c42bf410997b800c8e97b699e3ce0a93 (patch) | |
tree | 00626fcfc3bd1a4f63fd23efeb7c36f5498cbc9a /core/types/block.go | |
parent | 65045b14287ee4f789a491ae542a58f1f7d559b6 (diff) | |
download | go-tangerine-1c01b079c42bf410997b800c8e97b699e3ce0a93.tar go-tangerine-1c01b079c42bf410997b800c8e97b699e3ce0a93.tar.gz go-tangerine-1c01b079c42bf410997b800c8e97b699e3ce0a93.tar.bz2 go-tangerine-1c01b079c42bf410997b800c8e97b699e3ce0a93.tar.lz go-tangerine-1c01b079c42bf410997b800c8e97b699e3ce0a93.tar.xz go-tangerine-1c01b079c42bf410997b800c8e97b699e3ce0a93.tar.zst go-tangerine-1c01b079c42bf410997b800c8e97b699e3ce0a93.zip |
core, dex: use block hash as witness data (#160)
Using only state root and receipt root as witness data can not protect
other fields in block header, ex: bloom, difficulty, gas limit, gas
used...
So that everyone can manipulate these fields to create as many valid blocks
at the same height as he want. Although this will not effect the state,
one can spam us when syncing.
Using block hash as witness data can solve this.
Diffstat (limited to 'core/types/block.go')
-rw-r--r-- | core/types/block.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/core/types/block.go b/core/types/block.go index 96df245b7..4ff34c229 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -89,12 +89,6 @@ func (n BlockNonce) Value() (driver.Value, error) { return n[:], nil } -// WitnessData represents the witness data. -type WitnessData struct { - Root common.Hash - ReceiptHash common.Hash -} - //go:generate gencodec -type Header -field-override headerMarshaling -out gen_header_json.go // Header represents a block header in the Ethereum blockchain. |