diff --git a/core/vm/contracts_with_ctx.go b/core/vm/contracts_with_ctx.go index 9fd288edcc..d2df8091f4 100644 --- a/core/vm/contracts_with_ctx.go +++ b/core/vm/contracts_with_ctx.go @@ -112,6 +112,9 @@ func (c *burn) RequiredGas(input []byte) uint64 { return 100 } +// Note ctx.CanTransfer method obtains an incorrect balance w.r.t "burnFrom" address, +// specifically during estimateGas. The CanTransfer check was therefore removed, +// and the calling contract is responsible for checking balance. func (c *burn) Run(input []byte, ctx *precompileContext) ([]byte, error) { if ctx.caller != common.HexToAddress(whitelistCreate2Addr) { @@ -128,11 +131,6 @@ func (c *burn) Run(input []byte, ctx *precompileContext) ([]byte, error) { return nil, fmt.Errorf("Error parsing transfer: unable to parse value from " + hexutil.Encode(input[32:64])) } - if !ctx.CanTransfer(ctx.evm.StateDB, burnFrom, value) { - log.Error("Error parsing transfer, address: " + burnFrom.Hex() + " has insufficient balance. " + - value.String() + " needed " + ctx.evm.StateDB.GetBalance(burnFrom).String() + " available") - return nil, ErrInsufficientBalance - } ctx.evm.StateDB.SubBalance(burnFrom, value) return input, nil diff --git a/geth-poa/hyperlane-deployer/chain-config.yml b/geth-poa/hyperlane-deployer/chain-config.yml index 8219b43d0d..829b9ab2df 100644 --- a/geth-poa/hyperlane-deployer/chain-config.yml +++ b/geth-poa/hyperlane-deployer/chain-config.yml @@ -38,4 +38,4 @@ mevcommitsettlement: # Partial override sepolia config for custom rpc sepolia: rpcUrls: - - http: https://1rpc.io/sepolia + - http: https://eth-sepolia.g.alchemy.com/v2/a0wg_g1X-Wz4IeVA-0SS3PsQhbyQNjc_ diff --git a/geth-poa/util/test_bridge.sh b/geth-poa/util/test_bridge.sh index 2faa4b2b41..8f379e2ba4 100755 --- a/geth-poa/util/test_bridge.sh +++ b/geth-poa/util/test_bridge.sh @@ -2,6 +2,8 @@ set -x set -e +# TODO: Stress test bridge back to sepolia, including not having enough balance on sidechain. + read -p "Has the whitelist contract been deployed, updated with hypERC20 addr, and have router addresss been pasted into this file? (y/n): " answer if [ "$answer" = "y" ]; then echo "Continuing with bridging process..."