Genesis.json add kovan or ropsten network - ethereum

Maybe stupid question but I am relative new to ETH.
This is my genesis.json for a private ETH node
{
"config": {
"chainId": 326432352,
"homesteadBlock": 1,
"eip150Block": 2,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 3,
"eip158Block": 3,
"byzantiumBlock": 4,
"clique": {
"period": 5,
"epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x5a8efd25",
"extraData": "0x00000000000000000000000000000000000000000000000000000000000000003590aca93338b0721966a8d0c96ebf2c4c87c5448cc5a1a0802db41db826c2fcb72423744338dcb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xf42400",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"3590aca93338b0721966a8d0c96ebf2c4c87c544": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
},
"8cc5a1a0802db41db826c2fcb72423744338dcb0": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
chainId
is some random number. But I would like to use KOVAN or ROPSTEN ETH node for testing. I also do not want to retrieve all ETH blocks from the beginning but I would like to start syncing from some specific block. Is possible?
I found this
https://hackernoon.com/set-up-a-private-ethereum-blockchain-and-deploy-your-first-solidity-smart-contract-on-the-caa8334c343d
The following network id’s are reserved for specific Ethereum
networks.
0: Olympic, Ethereum public pre-release testnet
1: Frontier, Homestead, Metropolis, the Ethereum public main network
1: Classic, the (un)forked public Ethereum Classic main network, chain ID 61
1: Expanse, an alternative Ethereum implementation, chain ID 2
2: Morden, the public Ethereum testnet, now Ethereum Classic testnet
3: Ropsten, the public cross-client Ethereum testnet
4: Rinkeby, the public Geth PoA testnet
8: Ubiq, the public Gubiq main network with flux difficulty chain ID 8
42: Kovan, the public Parity PoA testnet
77: Sokol, the public POA Network testnet
99: Core, the public POA Network main network
7762959: Musicoin, the music blockchain
61717561: Aquachain, ASIC resistant chain
but not sure if is correct? What about MAINNET?
Thank you for all your answers

Related

Uniswap swapRouter02 Error: Transaction reverted without a reason string

I'm testing uniswap's swap transaction
my new contract swap() -> uniswap swapRouter02 contract exactInputSingle() which is not from wallet to contract swap
Specifically below code is trying swap my contract's 0.08 WETH to some UNI. and I checked my contract has 0.08 weth.
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 => WETH token address
0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 => UNI token address
0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 => Uniswap SwapRouter02 contract address
but error message when try
ISwapRouter02(0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45).exactInputSingle(params);
Error: Transaction reverted without a reason string at ~~
what does this message mean? and how can I debug this error?
My test environment is hardhat local forking mainnet. The error message is from hardhat forking mainnet
hardhat: {
chainId: 31337,
forking: {
url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`,
blockNumber: 14390000
},
},
function swap() external payable override lock returns (uint256) {
//approve
address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2).call(abi.encodeWithSelector(IERC20.approve.selector, 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45, 0x011C37937E080000));
//test
uint256 amountOut;
ISwapRouter02.ExactInputSingleParams memory params =
IV3SwapRouter.ExactInputSingleParams({
tokenIn: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,
tokenOut: 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984,
fee: 0,
recipient: msg.sender,
//deadline: _params.deadline,
amountIn: 0x011C37937E080000, //0.08
amountOutMinimum: 0x0,
sqrtPriceLimitX96: 0
});
ISwapRouter02(0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45).exactInputSingle(params);
return 1;
}
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="Error: Transaction reverted without a reason string", method="estimateGas", transaction={"from":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","to":"0xd5a946A0C214d732a8cf5678be593d26E1bf2170","data":"0x50ac1dd900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000001f9840a85d5af5bf1d1762f925bdaddc4201f984000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb9226600000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000001c6bf526340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000021231000000000000000000000000000000000000000000000000000000000000","accessList":null}, error={"name":"ProviderError","code":-32603,"_isProviderError":true,"data":{"message":"Error: Transaction reverted without a reason string","data":"0x"}}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.6.8)
I found my fault,
reason was amountOutMinimum value must be not 0x0

Gas estimation failed: 'invalid opcode: INVALID'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually

I adapted the code from this tutorial for my needs. It works fine at rinkeby network, but I am getting an error when I try to run it on Mumbai network.
AdvancedCollectible.sol >>
pragma solidity 0.6.6;
import "#openzeppelin/contracts/token/ERC721/ERC721.sol";
import "#chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
contract AdvancedCollectible is ERC721 {
bytes32 internal keyHash;
uint256 public fee;
event requestedCollectible(address indexed senderAdd);
uint256 public tokenCounter;
struct Remedio {
string nome_medicamento;
uint256 dosagem;
string farmaceutica;
string posologia;
}
enum Breed{PUG, SHIBA_INU, ST_BERNARD}
mapping(uint256 => address) public requestIdToSender;
mapping(uint256 => Breed) public tokenIdToBreed;
mapping(uint256 => Remedio) public tokenIdToRemedio;
mapping(uint256 => uint256) public requestIdToTokenId;
constructor() public
ERC721("GeradorReceitasMedicas", "Receita")
{
tokenCounter = 0;
}
function createCollectible(string memory nomeMedicamento, uint256 dosagem, string memory farmaceutica, string memory posologia)
public returns (bytes32) {
uint256 newItemId = tokenCounter;
tokenCounter = tokenCounter + 1;
Remedio memory newRemedio = Remedio({
nome_medicamento: nomeMedicamento,
dosagem: dosagem,
farmaceutica: farmaceutica,
posologia: 'posologia'
});
requestIdToSender[newItemId] = msg.sender;
address receitaOwner = requestIdToSender[newItemId];
_safeMint(receitaOwner, newItemId);
tokenIdToRemedio[newItemId] = newRemedio;
emit requestedCollectible(receitaOwner);
}
}
LinkTokenInterface.sol:
pragma solidity ^0.6.6;
interface LinkTokenInterface {
function allowance(address owner, address spender) external view returns (uint256 remaining);
function approve(address spender, uint256 value) external returns (bool success);
function balanceOf(address owner) external view returns (uint256 balance);
function decimals() external view returns (uint8 decimalPlaces);
function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);
function increaseApproval(address spender, uint256 subtractedValue) external;
function name() external view returns (string memory tokenName);
function symbol() external view returns (string memory tokenSymbol);
function totalSupply() external view returns (uint256 totalTokensIssued);
function transfer(address to, uint256 value) external returns (bool success);
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);
function transferFrom(address from, address to, uint256 value) external returns (bool success);
}
DeployAdvanced.py:
from brownie import AdvancedCollectible, accounts, network, config
from scripts.helpful_scripts import fund_advanced_collectible
def main():
print(config['wallets']['from_key'])
dev = accounts.add(config['wallets']['from_key'])
print(network.show_active())
#print(config['networks'][network.show_active()]['host'])
publish_source = False
print(config['wallets']['from_key'])
advanced_collectible = AdvancedCollectible.deploy(
{"from": dev},
publish_source=publish_source,
)
fund_advanced_collectible(advanced_collectible)
return advanced_collectible
helpful_scripts.py:
from brownie import AdvancedCollectible, accounts, config, interface, network
def fund_advanced_collectible(nft_contract):
dev = accounts.add(config['wallets']['from_key'])
link_token = interface.LinkTokenInterface(
config['networks'][network.show_active()]['link_token']
)
link_token.transfer(nft_contract, 1000000000000000000, {"from": dev})
brownie-config.yaml:
exclude SafeMath when calculating test coverage
https://eth-brownie.readthedocs.io/en/v1.10.3/config.html#exclude_paths
reports: exclude_contracts:
- SafeMath dependencies:
smartcontractkit/chainlink-brownie-contracts#1.1.1
OpenZeppelin/openzeppelin-contracts#3.4.0 compiler: solc:
remappings:
'#chainlink=smartcontractkit/chainlink-brownie-contracts#1.1.1'
'#openzeppelin=OpenZeppelin/openzeppelin-contracts#3.4.0'
automatically fetch contract sources from Etherscan autofetch_sources: True dotenv: .env
set a custom mnemonic for the development network networks: default: development kovan:
vrf_coordinator: '0xdD3782915140c8f3b190B5D67eAc6dc5760C46E9'
link_token: '0xa36085F69e2889c224210F603D836748e7dC0088'
keyhash: '0x6c3699283bda56ad74f6b855546325b68d482e983852a7a82979cc4807b641f4'
fee: 100000000000000000
oracle: '0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e'
jobId: '29fa9aa13bf1468788b7cc4a500a45b8'
eth_usd_price_feed: '0x9326BFA02ADD2366b30bacB125260Af641031331' rinkeby:
vrf_coordinator: '0xb3dCcb4Cf7a26f6cf6B120Cf5A73875B7BBc655B'
link_token: '0x01be23585060835e02b77ef475b0cc51aa1e0709'
keyhash: '0x2ed0feb3e7fd2022120aa84fab1945545a9f2ffc9076fd6156fa96eaff4c1311'
fee: 100000000000000000
oracle: '0x7AFe1118Ea78C1eae84ca8feE5C65Bc76CcF879e'
jobId: '6d1bfe27e7034b1d87b5270556b17277'
eth_usd_price_feed: '0x8A753747A1Fa494EC906cE90E9f37563A8AF630e'
host: 'https://rinkeby.infura.io/v3/${WEB3_INFURA_PROJECT_ID}' mumbai:
link_token: '0x326C977E6efc84E512bB9C30f76E30c160eD06FB'
eth_usd_price_feed: '0x0715A7794a1dc8e42615F059dD6e406A6594651A' polygon-test:
link_token: '0x326C977E6efc84E512bB9C30f76E30c160eD06FB'
eth_usd_price_feed: '0x0715A7794a1dc8e42615F059dD6e406A6594651A' binance:
# link_token: ??
eth_usd_price_feed: '0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e' binance-fork:
eth_usd_price_feed: '0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e' mainnet-fork:
eth_usd_price_feed: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419' matic-fork:
eth_usd_price_feed: '0xF9680D99D6C9589e2a93a78A04A279e509205945' wallets: from_key: ${PRIVATE_KEY} from_mnemonic: ${MNEMONIC}
settings: gas_limit: "100000000000"
When I run it on Rinkeby, I get (run command brownie run .\scripts\advancedCollectible\deploy_advanced.py --network rinkeby):
INFORMAÇÕES: não foi possível localizar arquivos para o(s) padrão(ões)
especificado(s). Brownie v1.18.1 - Python development framework for
Ethereum
ContratoNftProject is the active project.
Running 'scripts\advancedCollectible\deploy_advanced.py::main'...
rinkeby
Transaction sent:
0xf3cbcf650ab9b4408f8e795469ffa60a61f5943ab485ec133e3650fece7545db
Gas price: 1.499999222 gwei Gas limit: 2377218 Nonce: 67
AdvancedCollectible deployed at:
0x5D37fc76D54880F878a395755df5101B644B655a
C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie\network\contract.py:1180:
BrownieCompilerWarning: 0x5D37fc76D54880F878a395755df5101B644B655a:
Locally compiled and on-chain bytecode do not match! warnings.warn(
Transaction sent:
0x74a64ac1449a597584bbca8dc0947e80a6ad042ca68453da6e550a0dbbfe67da
Gas price: 1.499999221 gwei Gas limit: 56992 Nonce: 68
LinkToken.transfer confirmed Block: 10631644 Gas used: 51811
(90.91%)
When I run it on Mumbai, I get (run command brownie run .\scripts\advancedCollectible\deploy_advanced.py --network polygon-test):
INFORMAÇÕES: não foi possível localizar arquivos para o(s) padrão(ões)
especificado(s). Brownie v1.18.1 - Python development framework for
Ethereum
ContratoNftProject is the active project.
Running 'scripts\advancedCollectible\deploy_advanced.py::main'...
polygon-test
Transaction sent:
0x6915605b9dfb985b8ef078e3268a6b6e6e2e0b95d3d25ce8e5912c7a71db84d7
Gas price: 1.759579396 gwei Gas limit: 2377218 Nonce: 13
AdvancedCollectible.constructor confirmed Block: 26234140 Gas
used: 2161108 (90.91%) AdvancedCollectible deployed at:
0xdbae4544699a953f2b28AFfBA77008Fd9eb1B4Cf
File
"C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie_cli\run.py",
line 51, in main
return_value, frame = run( File "C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie\project\scripts.py",
line 103, in run
return_value = f_locals[method_name](*args, **kwargs) File ".\scripts\advancedCollectible\deploy_advanced.py", line 16, in main
fund_advanced_collectible(advanced_collectible) File ".\scripts\helpful_scripts.py", line 10, in fund_advanced_collectible
link_token.transfer(nft_contract, 1000000000000000000, {"from": dev}) File
"C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie\network\contract.py",
line 1710, in call
return self.transact(*args) File "C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie\network\contract.py",
line 1583, in transact
return tx["from"].transfer( File "C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie\network\account.py",
line 644, in transfer
receipt, exc = self._make_transaction( File "C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie\network\account.py",
line 727, in _make_transaction
raise VirtualMachineError(e) from None File "C:\Users\p\AppData\Roaming\Python\Python39\site-packages\brownie\exceptions.py",
line 93, in init
raise ValueError(str(exc)) from None ValueError: Gas estimation failed: 'invalid opcode: INVALID'. This transaction will likely
revert. If you wish to broadcast, you must set the gas limit
manually.
Why am I getting this error on Mumbai Network? Is it possible to fix the error above?
Your brownie-config.yaml defines a link_token address on the Mumbai testnet. The fund_advanced_collectible Python function then tries to transfer this token from the dev address.
From other context of your post, I was able to find that the dev address is 0x7cc6FA028dffa310445af40C3abEea61F8534d97.
Mind that you shared the private key as part of the debug output, but did not share the dev address directly (which I was still able to derive from the key). I'm not sure whether that was intentional on your part, but if there were crypto with monetary value on the same address on mainnet, anyone could steal it using this private key. So I'd recomend you to consider this address compromised and never use it on mainnet.
Anyway, the dev address does not own any LINK tokens on Mumbai testnet, which makes this part of the script fail:
link_token.transfer(nft_contract, 1000000000000000000, {"from": dev})
You can claim testnet LINK tokens from the Chainlink faucet: https://faucets.chain.link/mumbai

Ethereum private testnet failing due to peers not connecting

The problem
I want to create a private Ethereum network, however my two peers refuse to connect. They always fail with the following error: Snapshot extension registration failed peer=af5dfeb7 err="peer connected on snap without compatible eth support".
My attempted fixes
Setting --snapshot=false produces the same error
Changing the --syncmode to full, fast or light made no difference
Adding the peers manually with admin.addPeer(${peer1.admin.nodeInfo.enode}) returns true, however net.peerCount and admin.peers.length return 0
Changing the chainId did not produce any different results
Waiting did not help
My setup proccess
Creating the peers:
geth init --datadir "peer1" genesis.json
geth init --datadir "peer2" genesis.json
Starting the peers and opening the console:
geth --datadir "peer1" --networkid 1111 --port 30401 console 2>peer1.log
geth --datadir "peer2" --networkid 1111 --port 30402 console 2>peer2.log
The genesis file (Created by puppeth)
{
"config": {
"chainId": 1111,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"ethash": {}
},
"nonce": "0x0",
"timestamp": "0x61af5dd9",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x47b760",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"baseFeePerGas": null
}
Geth version info
Geth
Version: 1.10.13-stable
Git Commit: 7a0c19f813e285516f4b525305fd73b625d2dec8
Architecture: amd64
Go Version: go1.17.2
Operating System: linux
GOPATH=
GOROOT=go

geth shows "contract creation code storage out of gas" when I deploy contract from remix

I created a private network using geth.
And deploy a contract from remix (browser).
It shows following error.
genesis.json is this.
{
"config": {
"homesteadBlock": 0
},
"nonce": "0x0000000000000042",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x8000000",
"difficulty": "0x4000",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"alloc": {}
}
And I created 2 accounts and run network by this code.
geth --identity "sampleNode" --rpc --rpcport 8545 --rpcapi "web3,eth,net,personal" --rpccorsdomain "*" --rpcaddr "0.0.0.0" --datadir "~/eth-private-net/" --nodiscover --networkid 10 --unlock 0,1 --verbosity 6
And I deployed the contract.
pragma solidity ^0.5.0;
contract SingleNumRegister {
uint storedData;
function set(uint x) public{
storedData = x;
}
function get() public view returns (uint retVal){
return storedData;
}
}
After that, it shows error on geth console log.
DEBUG[01-27|11:05:50.009] VM returned with error err="contract creation code storage out of gas"
I got eth by mining and the account has 315 ether on my private network, but it shows same error.
> eth.getBalance(eth.accounts[0]);
315000000000000000000
What is the problem?
If you deploy using remix there is a field called gas limit. If your gas limit is 3000000 it should be enough, when I deploy your contract on remix it costs much less than that.
Also since you said you deploy on a private blockchain it could have something to do with the gas cost there. Try to deploy in the remix JavascriptVM to see if it works (this works in my case). If it works there try increasing the gas limit when deploying on your private blockchain.

Ethereum truffle MetaCoin fails with 'intrinsic gas too low'

Pretty much as stated in the title, after running truffle test I get this:
TestMetacoin
1) "before all" hook: prepare suite
Contract: MetaCoin
✓ should put 10000 MetaCoin in the first account
2) should call a function that depends on a linked library
> No events were emitted
✓ should send coin correctly (6078ms)
2 passing (6s)
2 failing
1) TestMetacoin "before all" hook: prepare suite:
Error: Intrinsic gas too low
at Object.InvalidResponse (/usr/lib/node_modules/truffle/node_modules/truffle-contract/node_modules/web3/lib/web3/errors.js:35:16)
at /usr/lib/node_modules/truffle/node_modules/truffle-contract/node_modules/web3/lib/web3/requestmanager.js:86:36
at XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/truffle/node_modules/web3/lib/web3/httpprovider.js:119:13)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:64:18)
at XMLHttpRequest._setReadyState (/usr/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:354:12)
at XMLHttpRequest._onHttpResponseEnd (/usr/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:509:12)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/truffle/node_modules/xhr2/lib/xhr2.js:469:24)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
2) Contract: MetaCoin should call a function that depends on a linked library:
AssertionError: Library function returned unexpected function, linkage may be broken: expected 0 to equal 20000
at test/metacoin.js:25:14
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
My genesis block is as follows:
{
"nonce": "0x0000000000000042",
"difficulty": "0x4000",
"alloc": {
"0xfd0ceb7965a0e4c3146c1f901fbab9668653af6b": {
"balance": "325406000000000"
}
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0xfd0ceb7965a0e4c3146c1f901fbab9668653af6b",
"etherbase" : "0xfd0ceb7965a0e4c3146c1f901fbab9668653af6b",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x3d0900"
}
And my truffle.js is like this:
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*", // Match any network id
gas: 1000000
}
}
};
I fail to understand what is wrong with gas at these settings. Even if noone has the exact answer, some additional explanation of the gas limits (not the gas itself) would be helpful.
I ended up changing genesis block gasLimit to
"gasLimit": "0x2FEFD800",
config for homestead block to 10 (apparently otherwise there are issues when working with geth):
"config": {
"homesteadBlock": 10
},
and truffle.js gas setting to 5000000.
Tests pass.