Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New contracts are not getting created/mined anymore #365

Closed
jorisbontje opened this issue Feb 21, 2015 · 8 comments
Closed

New contracts are not getting created/mined anymore #365

jorisbontje opened this issue Feb 21, 2015 · 8 comments

Comments

@jorisbontje
Copy link

version 8620dc0

screen shot 2015-02-21 at 21 10 28

@jorisbontje jorisbontje changed the title Created contracts are not getting mined anymore New contracts are not getting created/mined anymore Feb 21, 2015
@jorisbontje
Copy link
Author

This seems like a regression since be90ad8

@maran
Copy link
Member

maran commented Feb 22, 2015

I'm on 8620dc0 and I am able to create/mine new contracts. Could it be it's your specific contract that won't mine?

@jorisbontje
Copy link
Author

Okay, it appears that it does get mined; however I can only 'access' the contract after restarting the ethereum client. I try to access it through the jsonrpc as well as the command line JS console:

eth.codeAt("0x7fbb2ed36f939812adaa1657f02adfe1379172c8")

This returns 0x, until I restart, in which case it returns the contract code

0x60006110ff537c0100000000000000000000000000000000000000000000000000000000600035046001602052600560405260036060526020608052600360a052670de0b6b3a764000060c0526326638a38811415610175576004356101005260205161010051128015610073578061007c565b60405161010051135b905015610090576000610140526020610140f35b6001610100511415156100aa5760036101005114156100ad565b60005b156100bf5760056101005114156100c2565b60005b156100d4576000610160526020610160f35b6101005160c05134051415156100f1576000610180526020610180f35b6001546101a0523360096101a05102600401554360096101a05102600501554260096101a05102600601556101005160096101a0510260070155600160096101a05102600c01556101a0513374090000000000000000000000000000000000000004015560016101a0510160015560016002540160025560016101c05260206101c0f35b6306675a51811415610386576004356101e052600160096101e05102600c01541415156101a957605a610200526020610200f35b3360096101e05102600401541415156101c957605b610220526020610220f35b60096101e05102600501546102405261024051431315156101f157605c610260526020610260f35b60ff610240510143131561020c57605d610280526020610280f35b61024051406102a05260406060599059016000905260028152610240514060208201526101e0516040820152602081019050206102c05260006102c051141561025c57605e610300526020610300f35b6102a05160096101e05102600901556102c05160096101e05102600a015560805160805160805102026102c05106610320526103205160096101e05102600b015560096101e051026007015461034052604460005990590160009052601c604083015990590160009052016396af264c601c820352610320516004820152610340516024820152604481016060599059016000905260028152826020820152846040820152602081019050905090509050905060206103e06020830151835160003060195a03f1506103e0519050610360526103605160096101e0510260080155600260096101e05102600c01556000610360511315610379576103605160035401600355600060006000600060c05161036051023360195a03f1505b6001610420526020610420f35b6393a138008114156104f7576004356101e052600980602061014059905901600090526009815260096101e0510260040154602082015260096101e0510260050154604082015260096101e0510260060154606082015260096101e0510260070154608082015260096101e051026008015460a082015260096101e051026009015460c082015260096101e05102600a015460e082015260096101e05102600b015461010082015260096101e05102600c01546101208201526020810190500352610140602061014059905901600090526009815260096101e0510260040154602082015260096101e0510260050154604082015260096101e0510260060154606082015260096101e0510260070154608082015260096101e051026008015460a082015260096101e051026009015460c082015260096101e05102600a015460e082015260096101e05102600b015461010082015260096101e05102600c015461012082015260208101905003f3505b63489e185c81141561052757337409000000000000000000000000000000000000000401546104a05260206104a0f35b6361837e4181141561059a5760038060206080599059016000905260038152600154602082015260025460408201526003546060820152602081019050035260806020608059905901600090526003815260015460208201526002546040820152600354606082015260208101905003f3505b636b734d17811415610c9757600435610500526024356105205260443561054052600b806020026020015990590160009052818152602081019050905061056052600460e0610560510152600660c0610560510152600860a0610560510152600a6020610560510152600f6040610560510152601460606105605101526019608061056051015260326105605152604b610120610560510152606461014061056051015260fa61010061056051015260066105c05260026105e0526105205161050051141561067157610540516105205114610674565b60005b156106915761050051602002610560510151610600526020610600f35b6001610500511480156106a457806106ac565b600261050051145b905080156106ba57806106c2565b600361050051145b905015610701576001610520511480156106dc57806106e4565b600261052051145b905080156106f257806106fa565b600361052051145b9050610704565b60005b156107415760016105405114801561071c5780610724565b600261054051145b90508015610732578061073a565b600361054051145b9050610744565b60005b15610758576105c0516106e05260206106e0f35b60056105005114801561076b5780610773565b600661050051145b905080156107815780610789565b600761050051145b9050156107c8576005610520511480156107a357806107ab565b600661052051145b905080156107b957806107c1565b600761052051145b90506107cb565b60005b15610808576005610540511480156107e357806107eb565b600661054051145b905080156107f95780610801565b600761054051145b905061080b565b60005b1561081f576105e0516107c05260206107c0f35b6009610500511415610960576105405161052051141561085157610520516020026105605101516107e05260206107e0f35b600161052051148015610864578061086c565b600261052051145b9050801561087a5780610882565b600361052051145b9050156108c15760016105405114801561089c57806108a4565b600261054051145b905080156108b257806108ba565b600361054051145b90506108c4565b60005b156108d8576105c051610880526020610880f35b6005610520511480156108eb57806108f3565b600661052051145b905080156109015780610909565b600761052051145b90501561094857600561054051148015610923578061092b565b600661054051145b905080156109395780610941565b600761054051145b905061094b565b60005b1561095f576105e051610920526020610920f35b5b6009610520511415610aa157610540516105005114156109925761050051602002610560510151610940526020610940f35b6001610500511480156109a557806109ad565b600261050051145b905080156109bb57806109c3565b600361050051145b905015610a02576001610540511480156109dd57806109e5565b600261054051145b905080156109f357806109fb565b600361054051145b9050610a05565b60005b15610a19576105c0516109e05260206109e0f35b600561050051148015610a2c5780610a34565b600661050051145b90508015610a425780610a4a565b600761050051145b905015610a8957600561054051148015610a645780610a6c565b600661054051145b90508015610a7a5780610a82565b600761054051145b9050610a8c565b60005b15610aa0576105e051610a80526020610a80f35b5b6009610540511415610be25761052051610500511415610ad35761050051602002610560510151610aa0526020610aa0f35b600161050051148015610ae65780610aee565b600261050051145b90508015610afc5780610b04565b600361050051145b905015610b4357600161052051148015610b1e5780610b26565b600261052051145b90508015610b345780610b3c565b600361052051145b9050610b46565b60005b15610b5a576105c051610b40526020610b40f35b600561050051148015610b6d5780610b75565b600661050051145b90508015610b835780610b8b565b600761050051145b905015610bca57600561052051148015610ba55780610bad565b600661052051145b90508015610bbb5780610bc3565b600761052051145b9050610bcd565b60005b15610be1576105e051610be0526020610be0f35b5b6009610520511415610bfa5760096105405114610bfd565b60005b15610c1a5761050051602002610560510151610c00526020610c00f35b6009610500511415610c325760096105405114610c35565b60005b15610c525761052051602002610560510151610c20526020610c20f35b6009610500511415610c6a5760096105205114610c6d565b60005b15610c8a5761054051602002610560510151610c40526020610c40f35b6000610c60526020610c60f35b632db2eee3811415610d2f57600435610320526060518060200260200159905901600090528181526020810190509050610c80526000610ce0525b606051610ce0511215610d10576080516103205106610ce051602002610c805101526080516103205104610320526001610ce05101610ce052610cd2565b606051806020610c805103526020602060605102016020610c805103f3505b6396af264c81141561153757600435610320526024356103405260a0518060200260200159905901600090528181526020810190509050610d005260a0518060200260200159905901600090528181526020810190509050610d605260a0518060200260200159905901600090528181526020810190509050610dc05261042059905901600090526020815260026020820152600160408201526007606082015260016080820152600260a0820152600760c0820152600660e082015260076101008201526003610120820152600a6101408201526001610160820152600661018082015260016101a082015260076101c082015260036101e08201526004610200820152600361022082015260026102408201526004610260820152600561028082015260006102a082015260066102c0820152600a6102e08201526005610300820152600661032082015260056103408201526008610360820152600361038082015260006103a082015260096103c082015260056103e08201526004610400820152602081019050610e20526104205990590160009052602081526006602082015260006040820152600a606082015260036080820152600660a0820152600760c0820152600960e08201526002610100820152600561012082015260026101408201526003610160820152600161018082015260056101a082015260026101c082015260016101e0820152600a610200820152600461022082015260056102408201526008610260820152600461028082015260076102a082015260066102c082015260006102e08201526001610300820152600761032082015260066103408201526003610360820152600161038082015260056103a082015260096103c082015260076103e08201526004610400820152602081019050610e605261042059905901600090526020815260016020820152600460408201526002606082015260076080820152600560a0820152600660c0820152600460e0820152600a610100820152600761012082015260056101408201526002610160820152600061018082015260066101a082015260046101c0820152600a6101e08201526001610200820152600761022082015260066102408201526003610260820152600061028082015260056102a082015260076102c082015260026102e08201526003610300820152600961032082015260036103408201526005610360820152600661038082015260016103a082015260086103c082015260016103e08201526003610400820152602081019050610ea052602460005990590160009052601c60408301599059016000905201632db2eee3601c820352610320516004820152602481016060599059016000905260028152826020820152846040820152602081019050905090509050905060605180806020026020015990590160009052818152602081019050905081602002602001816020850151855160003060195a03f15060208101905090509050610c80526000610ce0525b60a051610ce051121561121657608051610ce051610c8051510106602002610e20510151610ce051602002610d00510152608051610ce0516020610c805101510106602002610e60510151610ce051602002610d60510152608051610ce0516040610c805101510106602002610ea0510151610ce051602002610dc05101526001610ce05101610ce052611187565b606460005990590160009052601c60408301599059016000905201636b734d17601c8203526020610d0051015160048201526020610d6051015160248201526020610dc0510151604482015260648101606059905901600090526002815282602082015284604082015260208101905090509050905090506020610fc06020830151835160003060195a03f150610fc0519050610f8052600161034051131561152857606460005990590160009052601c60408301599059016000905201636b734d17601c820352610d0051516004820152610d6051516024820152610dc051516044820152606481016060599059016000905260028152826020820152846040820152602081019050905090509050905060206110006020830151835160003060195a03f150611000519050610f805101610f8052606460005990590160009052601c60408301599059016000905201636b734d17601c8203526040610d0051015160048201526040610d6051015160248201526040610dc05101516044820152606481016060599059016000905260028152826020820152846040820152602081019050905090509050905060206110406020830151835160003060195a03f150611040519050610f805101610f8052600361034051131561152757606460005990590160009052601c60408301599059016000905201636b734d17601c820352610d00515160048201526020610d6051015160248201526040610dc05101516044820152606481016060599059016000905260028152826020820152846040820152602081019050905090509050905060206110806020830151835160003060195a03f150611080519050610f805101610f8052606460005990590160009052601c60408301599059016000905201636b734d17601c8203526040610d0051015160048201526020610d605101516024820152610dc051516044820152606481016060599059016000905260028152826020820152846040820152602081019050905090509050905060206110c06020830151835160003060195a03f1506110c0519050610f805101610f80525b5b610f80516110e05260206110e0f35b63c96cd46f811415611551576000543314156115505733ff5b5b50

On related note I notice that my account balance (as accessed through the rpc api) doesn't get incremented, even though I am mining blocks. Again restarting the client updates the balance.

@obscuren
Copy link
Contributor

Yes, I noticed this too. Fix coming

@obscuren
Copy link
Contributor

Fixed. Please confirm

@jorisbontje
Copy link
Author

@obscuren contract state is now getting updated after creation; however my coinbase balance still isn't.

@obscuren
Copy link
Contributor

Right. It appears that there's a mix up with the transient state and the current state.

Fix incoming

@jorisbontje
Copy link
Author

This is happening again as of cdb77f0. Please reopen.

tanishqjasoria pushed a commit to tanishqjasoria/go-ethereum that referenced this issue Apr 5, 2024
tanishqjasoria pushed a commit to tanishqjasoria/go-ethereum that referenced this issue Apr 11, 2024
garyschulte pushed a commit to garyschulte/go-ethereum that referenced this issue Apr 17, 2024
* simplified gas accounting layer

* integrate some review feedback

* Apply suggestions from code review

Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>

* more suggestions from code review

* don't charge creation gas + charge code chunks in create

* A couple more fixes

* make linter happy

* fix create init gas consumption issue

* fix: in gas funcs, use tx witness instead of global witness

* fix linter issue

* Apply suggestions from code review

Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>

* fix: EXTCODECOPY gas consumption

* fix warm gas costs

* fix the order gas is charged in during contract creation epilogue

* fix selfdestruct

* fix ethereum#365 in eip rewrite (ethereum#407)

* fix: OOG type in code creation OOG (ethereum#408)

* core/vm: charge BLOCKHASH witness cost (ethereum#409)

* core/vm: charge BLOCKHASH witness cost

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* remove gas optimization for now

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

---------

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* remove redundant logic for contract creation (ethereum#413)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* fix precompile address check for charging witness costs & fix missing value-bearing rule (ethereum#412)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* core/vm: fix wrong check (ethereum#416)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* charge for account creation if selfdestruct creates a new account (ethereum#417)

* add key comparison test (ethereum#418)

* core/vm: charge contract init before execution logic (ethereum#419)

* core/vm: charge contract init before execution logic

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>

* fix CREATE2 as well

---------

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>

* quell linter

---------

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants