Documentation ¶
Overview ¶
Copyright 2023 The go-ethereum Authors This file is part of go-ethereum.
go-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
go-ethereum is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- type Addresses
- type Chain
- func (c *Chain) AccountsInHashOrder() []state.DumpAccount
- func (c *Chain) Balance(addr common.Address) *big.Int
- func (c *Chain) CodeHashes() []common.Hash
- func (c *Chain) ForkID() forkid.ID
- func (c *Chain) GetBlock(number int) *types.Block
- func (c *Chain) GetHeaders(req *eth.GetBlockHeadersPacket) ([]*types.Header, error)
- func (c *Chain) GetSender(idx int) (common.Address, uint64)
- func (c *Chain) Head() *types.Block
- func (c *Chain) IncNonce(addr common.Address, amt uint64)
- func (c *Chain) Len() int
- func (c *Chain) RootAt(height int) common.Hash
- func (c *Chain) Shorten(height int) *Chain
- func (c *Chain) SignTx(from common.Address, tx *types.Transaction) (*types.Transaction, error)
- func (c *Chain) TD() *big.Int
- type Conn
- type EngineClient
- type Hello
- type Proto
- type Suite
- func (s *Suite) EthTests() []utesting.Test
- func (s *Suite) SnapTests() []utesting.Test
- func (s *Suite) TestBlobViolations(t *utesting.T)
- func (s *Suite) TestGetBlockBodies(t *utesting.T)
- func (s *Suite) TestGetBlockHeaders(t *utesting.T)
- func (s *Suite) TestInvalidTxs(t *utesting.T)
- func (s *Suite) TestLargeTxRequest(t *utesting.T)
- func (s *Suite) TestMaliciousHandshake(t *utesting.T)
- func (s *Suite) TestMaliciousStatus(t *utesting.T)
- func (s *Suite) TestNewPooledTxs(t *utesting.T)
- func (s *Suite) TestSameRequestID(t *utesting.T)
- func (s *Suite) TestSimultaneousRequests(t *utesting.T)
- func (s *Suite) TestSnapGetAccountRange(t *utesting.T)
- func (s *Suite) TestSnapGetByteCodes(t *utesting.T)
- func (s *Suite) TestSnapGetStorageRanges(t *utesting.T)
- func (s *Suite) TestSnapStatus(t *utesting.T)
- func (s *Suite) TestSnapTrieNodes(t *utesting.T)
- func (s *Suite) TestStatus(t *utesting.T)
- func (s *Suite) TestTransaction(t *utesting.T)
- func (s *Suite) TestZeroRequestID(t *utesting.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain is a lightweight blockchain-like store which can read a hivechain created chain.
func NewChain ¶
NewChain takes the given chain.rlp file, and decodes and returns the blocks from the file.
func (*Chain) AccountsInHashOrder ¶
func (c *Chain) AccountsInHashOrder() []state.DumpAccount
AccountsInHashOrder returns all accounts of the head state, ordered by hash of address.
func (*Chain) CodeHashes ¶
CodeHashes returns all bytecode hashes contained in the head state.
func (*Chain) GetHeaders ¶
GetHeaders returns the headers base on an ethGetPacketHeadersPacket.
func (*Chain) GetSender ¶
GetSender returns the address associated with account at the index in the pre-funded accounts list.
func (*Chain) SignTx ¶
func (c *Chain) SignTx(from common.Address, tx *types.Transaction) (*types.Transaction, error)
SignTx signs a transaction for the specified from account, so long as that account was in the hivechain accounts dump.
type Conn ¶
Conn represents an individual connection with a peer
type EngineClient ¶
type EngineClient struct {
// contains filtered or unexported fields
}
EngineClient is a wrapper around engine-related data.
func NewEngineClient ¶
func NewEngineClient(dir, url, jwt string) (*EngineClient, error)
NewEngineClient creates a new engine client.
type Suite ¶
Suite represents a structure used to test a node's conformance to the eth protocol.
func NewSuite ¶
NewSuite creates and returns a new eth-test suite that can be used to test the given node against the given blockchain data.
func (*Suite) TestBlobViolations ¶
func (*Suite) TestGetBlockBodies ¶
func (*Suite) TestGetBlockHeaders ¶
func (*Suite) TestInvalidTxs ¶
func (*Suite) TestLargeTxRequest ¶
func (*Suite) TestMaliciousHandshake ¶
func (*Suite) TestMaliciousStatus ¶
func (*Suite) TestNewPooledTxs ¶
func (*Suite) TestSameRequestID ¶
func (*Suite) TestSimultaneousRequests ¶
func (*Suite) TestSnapGetAccountRange ¶
TestSnapGetAccountRange various forms of GetAccountRange requests.
func (*Suite) TestSnapGetByteCodes ¶
TestSnapGetByteCodes various forms of GetByteCodes requests.
func (*Suite) TestSnapGetStorageRanges ¶
TestSnapGetStorageRanges various forms of GetStorageRanges requests.
func (*Suite) TestSnapStatus ¶
func (*Suite) TestSnapTrieNodes ¶
TestSnapTrieNodes various forms of GetTrieNodes requests.