I need some transactions with predefined data that needs to be added immediately after the genesis block. Apart from actually making those transactions through Geth, is there a way to automate these transactions to be added when I set up the private chain?
With a standard Ethereum client and a private chain, or possibly Quorum, you may be able to orchestrate this ceremonially.
Consider a process along these line for experimentation.
- Initialize the network with a Genesis block.
- Start one node, not mining or verifying.
- Deploy genesis contracts. They will not be verified because no node is doing that.
- Start a miner/validator.
- Confirm the transactions were included in the first block.
- Begin adding peer nodes.
Pegasys is Consensys's research arm focused on Enterprise Ethereum. Pantheon is a backward-compatible Ethereum node written in Java. Have a look at this doc for a description of a method for adding contracts to the first block. This might be what you are looking for:
Hope it helps.
Is it absolutely required to be in the first block? With some modifications to Geth you could theoretically apply the state changes at genesis. This would mean every node that has the genesis file you specified would have the contracts predeployed, similar to what Rob was referring to with Pegasys.