mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
core/rawdb: bump db version
This commit is contained in:
parent
0d119a9b53
commit
3546df65c1
5 changed files with 9 additions and 26 deletions
|
|
@ -127,7 +127,10 @@ const (
|
|||
// - Version 8
|
||||
// The following incompatible database changes were added:
|
||||
// * New scheme for contract code in order to separate the codes and trie nodes
|
||||
BlockChainVersion uint64 = 8
|
||||
// - Version 9
|
||||
// Total difficulty has been removed from both the key-value store and the
|
||||
// ancient store, the td freezer table has been deprecated since that.
|
||||
BlockChainVersion uint64 = 9
|
||||
)
|
||||
|
||||
// CacheConfig contains the configuration values for the trie database
|
||||
|
|
|
|||
|
|
@ -4181,7 +4181,7 @@ func TestEIP7702(t *testing.T) {
|
|||
var (
|
||||
config = *params.MergedTestChainConfig
|
||||
signer = types.LatestSigner(&config)
|
||||
engine = beacon.NewFaker()
|
||||
engine = beacon.New(ethash.NewFaker())
|
||||
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
||||
key2, _ = crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a")
|
||||
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
|
||||
|
|
|
|||
|
|
@ -726,14 +726,6 @@ func writeAncientBlock(op ethdb.AncientWriteOp, block *types.Block, header *type
|
|||
if err := op.Append(ChainFreezerReceiptTable, num, receipts); err != nil {
|
||||
return fmt.Errorf("can't append block %d receipts: %v", num, err)
|
||||
}
|
||||
// TODO (rjl493456442) TD has been deprecated and write garbage data for
|
||||
// backward compatibility. See https://github.com/ethereum/go-ethereum/pull/30744/.
|
||||
//
|
||||
// The TD freezer table is retained for backward compatibility within this
|
||||
// major version (1.14.x) and will be discarded in the next major version.
|
||||
if err := op.Append(ChainFreezerDifficultyTable, num, common.Big0); err != nil {
|
||||
return fmt.Errorf("can't append block %d total difficulty: %v", num, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,19 +35,15 @@ const (
|
|||
|
||||
// ChainFreezerReceiptTable indicates the name of the freezer receipts table.
|
||||
ChainFreezerReceiptTable = "receipts"
|
||||
|
||||
// ChainFreezerDifficultyTable indicates the name of the freezer total difficulty table.
|
||||
ChainFreezerDifficultyTable = "diffs"
|
||||
)
|
||||
|
||||
// chainFreezerNoSnappy configures whether compression is disabled for the ancient-tables.
|
||||
// Hashes and difficulties don't compress well.
|
||||
var chainFreezerNoSnappy = map[string]bool{
|
||||
ChainFreezerHeaderTable: false,
|
||||
ChainFreezerHashTable: true,
|
||||
ChainFreezerBodiesTable: false,
|
||||
ChainFreezerReceiptTable: false,
|
||||
ChainFreezerDifficultyTable: true,
|
||||
ChainFreezerHeaderTable: false,
|
||||
ChainFreezerHashTable: true,
|
||||
ChainFreezerBodiesTable: false,
|
||||
ChainFreezerReceiptTable: false,
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -328,14 +328,6 @@ func (f *chainFreezer) freezeRange(nfdb *nofreezedb, number, limit uint64) (hash
|
|||
if err := op.AppendRaw(ChainFreezerReceiptTable, number, receipts); err != nil {
|
||||
return fmt.Errorf("can't write receipts to Freezer: %v", err)
|
||||
}
|
||||
// TODO (rjl493456442) TD has been deprecated and write garbage data for
|
||||
// backward compatibility. See https://github.com/ethereum/go-ethereum/pull/30744/.
|
||||
//
|
||||
// The TD freezer table is retained for backward compatibility within this
|
||||
// major version (1.14.x) and will be discarded in the next major version.
|
||||
if err := op.Append(ChainFreezerDifficultyTable, number, common.Big0); err != nil {
|
||||
return fmt.Errorf("can't write td to Freezer: %v", err)
|
||||
}
|
||||
hashes = append(hashes, hash)
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue