I am creating large contracts A and T (not real names) that represent actual business needs and these contract have several setters (A.setXXX, A.setYYY, T.setZZZ ...) functions to initialize the storage of the contracts.
I am working on the pattern that 1) first I create the contract with the basing info and then the end user (java script) set the other info from outside with several transactions.
I then realise that each transaction on the same contract are mined one at at time. If I have in javascript
A.setXXX(); A.setYYY();
then it takes 2 blocks to have them both processed
However if I call
A.setXXX(); T.setZZZ();
Both transactions are included in the same block
So i conclude that the miner only take one transation for each object and discard the other transactions for later processing.
My questions are:
- Is this rule normal?
- What is the reasoning?
- Is there a way around this?
- Am I using an incorrect pattern for populating large contract?
Thanks for advises
Note that I selected this pattern because I could find solution to call a transaction with a large structure as parameters.