Skip to content

Commit

Permalink
Added auth and excap repository and disabled cancun tests (#36)
Browse files Browse the repository at this point in the history
* Added auth and excap repository. Disabled invalid cancun tests. Updated gitignore

* Turned on working cancun tests

* Fixed erigon tests
  • Loading branch information
dmitriy-b authored Aug 23, 2024
1 parent 07ec97c commit ca39b75
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 49 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ hivesim-rs/Cargo.lock
hivesim-rs/target

scripts/experiments/*
scripts/proxy/*
scripts/proxy/*

.DS_Store
hiveview
.lh/*
simulators/eth2/go.work.sum
2 changes: 1 addition & 1 deletion clients/erigon-old/erigon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FLAGS="$FLAGS --fakepow"
# Create the data directory.
mkdir /erigon-hive-datadir
FLAGS="$FLAGS --datadir /erigon-hive-datadir"
FLAGS="$FLAGS --db.size.limit 2GB"
FLAGS="$FLAGS --db.size.limit 2GB --sync.parallel-state-flushing=false"

# If a specific network ID is requested, use that
if [ "$HIVE_NETWORK_ID" != "" ]; then
Expand Down
4 changes: 2 additions & 2 deletions simulators/ethereum/gnosis-engine-jq/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func main() {

// Mark suites for execution
//hivesim.MustRunSuite(simulator, engine)
//hivesim.MustRunSuite(simulator, auth)
//hivesim.MustRunSuite(simulator, excap)
hivesim.MustRunSuite(simulator, auth)
hivesim.MustRunSuite(simulator, excap)
// hivesim.MustRunSuite(simulator, syncSuite)
hivesim.MustRunSuite(simulator, withdrawals)
hivesim.MustRunSuite(simulator, cancun)
Expand Down
93 changes: 48 additions & 45 deletions simulators/ethereum/gnosis-engine-jq/suites/cancun/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
package suite_cancun

import (
"math/big"

"github.com/ethereum/hive/simulators/ethereum/engine/client/hive_rpc"
"github.com/ethereum/hive/simulators/ethereum/engine/config"
"github.com/ethereum/hive/simulators/ethereum/engine/config/cancun"
"github.com/ethereum/hive/simulators/ethereum/engine/helper"
"github.com/ethereum/hive/simulators/ethereum/engine/test"
"math/big"
)

// Precalculate the first data gas cost increase
Expand Down Expand Up @@ -100,7 +101,6 @@ var Tests = []test.Spec{
Name: "Blob Transactions On Block 1, Cancun Genesis",
About: `
Tests the Cancun fork since genesis.
Verifications performed:
* See Blob Transactions On Block 1, Shanghai Genesis
`,
Expand Down Expand Up @@ -150,53 +150,56 @@ var Tests = []test.Spec{
},
},
},
&CancunBaseSpec{

BaseSpec: test.BaseSpec{
Name: "Blob Transaction Ordering, Single Account, Single Blob",
About: `
Send N blob transactions with cancun.MAX_BLOBS_PER_BLOCK-1 blobs each,
using account A.
Using same account, and an increased nonce from the previously sent
transactions, send N blob transactions with 1 blob each.
Verify that the payloads are created with the correct ordering:
- The first payloads must include the first N blob transactions
- The last payloads must include the last single-blob transactions
All transactions have sufficient data gas price to be included any
of the payloads.
`,
MainFork: config.Cancun,
},
// This test is not valid since cancun.MAX_BLOBS_PER_BLOCK=2 for Gnosis network and cancun.MAX_BLOBS_PER_BLOCK-1 will be the same as single blob.
// &CancunBaseSpec{

TestSequence: TestSequence{
NewPayloads{},
// First send the cancun.MAX_BLOBS_PER_BLOCK-1 blob transactions.
SendBlobTransactions{
TransactionCount: 5,
BlobsPerTransaction: 2,
//BlobTransactionGasTipCap:
BlobTransactionMaxBlobGasCost: big.NewInt(500000000),
},
// Then send the single-blob transactions
SendBlobTransactions{
TransactionCount: cancun.MAX_BLOBS_PER_BLOCK + 1,
BlobsPerTransaction: 1,
BlobTransactionMaxBlobGasCost: big.NewInt(00000000),
},
// BaseSpec: test.BaseSpec{
// Name: "Blob Transaction Ordering, Single Account, Single Blob",
// About: `
// Send N blob transactions with cancun.MAX_BLOBS_PER_BLOCK-1 blobs each,
// using account A.
// Using same account, and an increased nonce from the previously sent
// transactions, send N blob transactions with 1 blob each.
// Verify that the payloads are created with the correct ordering:
// - The first payloads must include the first N blob transactions
// - The last payloads must include the last single-blob transactions
// All transactions have sufficient data gas price to be included any
// of the payloads.
// `,
// MainFork: config.Cancun,
// },

// First four payloads have cancun.MAX_BLOBS_PER_BLOCK-1 blobs each
NewPayloads{
PayloadCount: 4,
ExpectedIncludedBlobCount: cancun.MAX_BLOBS_PER_BLOCK - 1,
},
// TestSequence: TestSequence{
// NewPayloads{},
// // First send the cancun.MAX_BLOBS_PER_BLOCK-1 blob transactions.
// SendBlobTransactions{
// TransactionCount: 5,
// BlobsPerTransaction: 2,
// //BlobTransactionGasTipCap:
// BlobTransactionMaxBlobGasCost: big.NewInt(500000000),
// },
// // Then send the single-blob transactions
// SendBlobTransactions{
// TransactionCount: cancun.MAX_BLOBS_PER_BLOCK + 1,
// BlobsPerTransaction: 1,
// BlobTransactionMaxBlobGasCost: big.NewInt(00000000),
// },

// // First four payloads have cancun.MAX_BLOBS_PER_BLOCK-1 blobs each
// NewPayloads{
// PayloadCount: 4,
// ExpectedIncludedBlobCount: cancun.MAX_BLOBS_PER_BLOCK - 1,
// },

// // The rest of the payloads have full blobs
// NewPayloads{
// PayloadCount: 2,
// ExpectedIncludedBlobCount: cancun.MAX_BLOBS_PER_BLOCK,
// },
// },
// },

// The rest of the payloads have full blobs
NewPayloads{
PayloadCount: 2,
ExpectedIncludedBlobCount: cancun.MAX_BLOBS_PER_BLOCK,
},
},
},
&CancunBaseSpec{

BaseSpec: test.BaseSpec{
Expand Down

0 comments on commit ca39b75

Please sign in to comment.