Skip to content

Commit

Permalink
simulators: fix typos in comments (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
vuittont60 authored Oct 26, 2023
1 parent aa37003 commit 0b8343e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion clients/besu/besu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ if [ "$HIVE_TERMINAL_TOTAL_DIFFICULTY" != "" ]; then
RPCFLAGS="$RPCFLAGS --engine-host-allowlist=* --engine-jwt-enabled --engine-jwt-secret /jwtsecret"
fi

# Enable KZG trusted setup if cancun timestamp is set, needed for custom genesis on Besu wtih Cancun
# Enable KZG trusted setup if cancun timestamp is set, needed for custom genesis on Besu with Cancun
if [ "$HIVE_CANCUN_TIMESTAMP" != "" ]; then
FLAGS="$FLAGS --kzg-trusted-setup=/trusted_setup.txt"
fi
Expand Down
2 changes: 1 addition & 1 deletion simulators/ethereum/consensus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func main() {
suite := hivesim.Suite{
Name: "consensus",
Description: "The 'consensus' test suite executes BlockchainTests from the " +
"offical test repository (https://github.com/ethereum/tests). For every test, it starts an instance of the client, " +
"official test repository (https://github.com/ethereum/tests). For every test, it starts an instance of the client, " +
"and makes it import the RLP blocks. After import phase, the node is queried about it's latest blocks, which is matched " +
"to the expected last blockhash according to the test.",
}
Expand Down
2 changes: 1 addition & 1 deletion simulators/ethereum/pyspec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ By default all test fixtures will run. To run a specific test or set of test fix

This can utilised in `pyspec` for running tests exclusive to a specific fork. The pattern must match at least one hive simulation test name within the `pyspec` suite.

Test names are of the type `<path-to-json>_<fixture-name>` omiting `fixtures` from the path. For example, the fixture test `000_push0_key_sstore_shanghai` within `push0.json` will have a hive test name of: `eips_eip3855_000_push0_key_sstore_shanghai`.
Test names are of the type `<path-to-json>_<fixture-name>` omitting `fixtures` from the path. For example, the fixture test `000_push0_key_sstore_shanghai` within `push0.json` will have a hive test name of: `eips_eip3855_000_push0_key_sstore_shanghai`.

1) To run only this test, an example pattern could be:
- `./hive --sim ethereum/pyspec --sim.limit /0_push0_key_sstore`
Expand Down
2 changes: 1 addition & 1 deletion simulators/ethereum/pyspec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {
Name: "pyspec",
Description: "The pyspec test suite runs every fixture from " +
"the execution-spec-tests repo (https://github.com/ethereum/execution-spec-tests) where the fork >= Merge. " +
"For each test clients are first fed the fixture genesis data followed by engine new payloads specfic to the test.",
"For each test clients are first fed the fixture genesis data followed by engine new payloads specific to the test.",
}
suite.Add(hivesim.TestSpec{
Name: "pytest_fixture_runner",
Expand Down
20 changes: 10 additions & 10 deletions simulators/ethereum/pyspec/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func loadFixtureTests(t *hivesim.T, root string, re *regexp.Regexp, fn func(test
// run executes a testcase against the client, called within a test channel from
// fixtureRunner, all testcase payloads are sent and executed using the EngineAPI. for
// verification all fixture nonce, balance and storage values are checked against the
// response recieved from the lastest block.
// response received from the lastest block.
func (tc *testcase) run(t *hivesim.T) {
start := time.Now()

Expand Down Expand Up @@ -178,15 +178,15 @@ func (tc *testcase) run(t *hivesim.T) {
}
// check final nonce & balance matches expected in fixture
if genesisAccount.Nonce != gotNonce {
tc.failedErr = errors.New("nonce recieved doesn't match expected from fixture")
t.Errorf(`nonce recieved from account %v doesn't match expected from fixture in test %s:
recieved from block: %v
tc.failedErr = errors.New("nonce received doesn't match expected from fixture")
t.Errorf(`nonce received from account %v doesn't match expected from fixture in test %s:
received from block: %v
expected in fixture: %v`, account, tc.name, gotNonce, genesisAccount.Nonce)
}
if genesisAccount.Balance.Cmp(gotBalance) != 0 {
tc.failedErr = errors.New("balance recieved doesn't match expected from fixture")
t.Errorf(`balance recieved from account %v doesn't match expected from fixture in test %s:
recieved from block: %v
tc.failedErr = errors.New("balance received doesn't match expected from fixture")
t.Errorf(`balance received from account %v doesn't match expected from fixture in test %s:
received from block: %v
expected in fixture: %v`, account, tc.name, gotBalance, genesisAccount.Balance)
}
// check final storage
Expand All @@ -205,9 +205,9 @@ func (tc *testcase) run(t *hivesim.T) {
// check values in storage match with fixture
for _, key := range keys {
if genesisAccount.Storage[key] != *gotStorage[key] {
tc.failedErr = errors.New("storage recieved doesn't match expected from fixture")
t.Errorf(`storage recieved from account %v doesn't match expected from fixture in test %s: from storage address: %v
recieved from block: %v
tc.failedErr = errors.New("storage received doesn't match expected from fixture")
t.Errorf(`storage received from account %v doesn't match expected from fixture in test %s: from storage address: %v
received from block: %v
expected in fixture: %v`, account, tc.name, key, gotStorage[key], genesisAccount.Storage[key])
}
}
Expand Down

0 comments on commit 0b8343e

Please sign in to comment.