From 15d76a334670498f6f1924082da3c95e87dc2375 Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Mon, 7 Oct 2024 11:24:12 -0700 Subject: [PATCH] update --- core/rawdb/schema.go | 23 +++++++++++++++++++++++ core/vm/contracts.go | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index 53fb3e5043..8ebb27a59e 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -20,6 +20,8 @@ package rawdb import ( "bytes" "encoding/binary" + // SYSCOIN + "math/big" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -352,3 +354,24 @@ func IsStorageTrieNode(key []byte) bool { ok, _, _ := ResolveStorageTrieNode(key) return ok } + +// SYSCOIN +// nevmToSysKey = nevmToSysPrefix + hash +func nevmToSysKey(hash common.Hash) []byte { + return append(nevmToSysPrefix, hash.Bytes()...) +} + +// blockNumToSysKey = blockNumToSysKeyPrefix + blocknumber +func blockNumToSysKey(n uint64) []byte { + return append(blockNumToSysKeyPrefix, []byte(new(big.Int).SetUint64(n).String())...) +} +// nevmAddressKey generates the key for storing NEVM addresses +func nevmAddressKey() []byte { + return []byte("nevm-addresses") +} +func dataHashesKey(n uint64) []byte { + return append(dataHashesKeyPrefix, []byte(new(big.Int).SetUint64(n).String())...) +} +func dataHashKey(hash common.Hash) []byte { + return append(dataHashKeyPrefix, hash.Bytes()...) +} diff --git a/core/vm/contracts.go b/core/vm/contracts.go index bc35b80b1e..c961605345 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -1326,7 +1326,7 @@ var ( ) // SYSCOIN // Run executes the point evaluation precompile. -func (b *kzgPointEvaluation) Run(input []byte) ([]byte, error) { +func (b *kzgPointEvaluation) Run(input []byte, interpreter *EVMInterpreter) ([]byte, error) { if len(input) != blobVerifyInputLength { return nil, errBlobVerifyInvalidInputLength }