Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
17 changes: 17 additions & 0 deletions fix_trie_brancher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Fix the compilation issues in storage_trie_brancher

# Fix wallet selection constant
find scenarios/statebloat/storage_trie_brancher -name "*.go" -exec perl -pi -e 's/WalletSelectionByIndex/SelectWalletByIndex/g' {} \;

# Fix GetChainID to GetChainId
find scenarios/statebloat/storage_trie_brancher -name "*.go" -exec perl -pi -e 's/GetChainID\(\)/GetChainId()/g' {} \;

# Remove unused json import
perl -pi -e 's/"encoding\/json"\n//g' scenarios/statebloat/storage_trie_brancher/storage_trie_brancher.go

# Fix GetRPCClient
perl -pi -e 's/s\.walletPool\.GetRPCClient\(\)/s.walletPool.GetRPCHost()/g' scenarios/statebloat/storage_trie_brancher/storage_trie_brancher.go

echo "Fixes applied"
20 changes: 20 additions & 0 deletions quick_fix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Fix remaining compilation errors

# Fix GetChainId() - it already returns *big.Int, no need to wrap
perl -pi -e 's/big\.NewInt\(wallet\.GetChainId\(\)\)/wallet.GetChainId()/g' scenarios/statebloat/storage_trie_brancher/*.go

# Fix string multiplication
perl -pi -e 's/"=" \* 60/strings.Repeat("=", 60)/g' scenarios/statebloat/storage_trie_brancher/verify_depth.go

# Remove unused os import
perl -pi -e 's/^\s*"os"\n//g' scenarios/statebloat/storage_trie_brancher/storage_trie_brancher.go

# Fix GetRPCHost to GetRPCEndpoint
perl -pi -e 's/GetRPCHost\(\)/GetRPCEndpoint()/g' scenarios/statebloat/storage_trie_brancher/storage_trie_brancher.go

# Add strings import to verify_depth.go
perl -pi -e 's/^import \(/import (\n\t"strings"/g if /^import \(/' scenarios/statebloat/storage_trie_brancher/verify_depth.go

echo "Fixes applied"
4 changes: 4 additions & 0 deletions scenarios/scenarios.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"github.com/ethpandaops/spamoor/scenarios/geastx"
"github.com/ethpandaops/spamoor/scenarios/setcodetx"
erc20bloater "github.com/ethpandaops/spamoor/scenarios/statebloat/erc20_bloater"
extcodesizesetup "github.com/ethpandaops/spamoor/scenarios/statebloat/extcodesize_setup"
storagetriebrancher "github.com/ethpandaops/spamoor/scenarios/statebloat/storage_trie_brancher"
"github.com/ethpandaops/spamoor/scenarios/storagespam"
"github.com/ethpandaops/spamoor/scenarios/taskrunner"
uniswapswaps "github.com/ethpandaops/spamoor/scenarios/uniswap-swaps"
Expand All @@ -42,10 +44,12 @@ var ScenarioDescriptors = []*scenario.Descriptor{
&erc20bloater.ScenarioDescriptor,
&erctx.ScenarioDescriptor,
&evmfuzz.ScenarioDescriptor,
&extcodesizesetup.ScenarioDescriptor,
&factorydeploytx.ScenarioDescriptor,
&gasburnertx.ScenarioDescriptor,
&geastx.ScenarioDescriptor,
&setcodetx.ScenarioDescriptor,
&storagetriebrancher.ScenarioDescriptor,
&storagespam.ScenarioDescriptor,
&taskrunner.ScenarioDescriptor,
&uniswapswaps.ScenarioDescriptor,
Expand Down
Loading