This commit is contained in:
jagdeep sidhu 2024-10-07 11:24:12 -07:00
parent e2470b9d98
commit 15d76a3346
2 changed files with 24 additions and 1 deletions

View file

@ -20,6 +20,8 @@ package rawdb
import ( import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
// SYSCOIN
"math/big"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
@ -352,3 +354,24 @@ func IsStorageTrieNode(key []byte) bool {
ok, _, _ := ResolveStorageTrieNode(key) ok, _, _ := ResolveStorageTrieNode(key)
return ok 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()...)
}

View file

@ -1326,7 +1326,7 @@ var (
) )
// SYSCOIN // SYSCOIN
// Run executes the point evaluation precompile. // 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 { if len(input) != blobVerifyInputLength {
return nil, errBlobVerifyInvalidInputLength return nil, errBlobVerifyInvalidInputLength
} }