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

Explorer can display incorrect byte code #1438

Closed
cleanunicorn opened this issue Feb 12, 2019 · 5 comments · Fixed by #1452

Comments

@cleanunicorn
Copy link

@cleanunicorn cleanunicorn commented Feb 12, 2019

If a contract message that creates another contract is reverted, that byte code is displayed in the interface. At that moment there's no byte code associated with that contract. The contract effectively does not exist.

Because the contract message reverts, the contract's nonce is not incremented.

When a second contract message is generated and it does not revert the newly generated byte code that deploys to the same address is not displayed on the web page.

Because the first contract message was reverted, the second contract message will deploy to the same address.

Environment

Website

Steps to reproduce

The contract with the incorrect byte code is
https://blockscout.com/eth/mainnet/address/0xf4a5afe28b91cf928c2568805cfbb36d477f0b75

The contract message that reverted is
https://blockscout.com/eth/mainnet/tx/0x9f4be1e7dac38999bf54af767983c9bf7e5f328d257883abbcd029e4989ccc69

The second contract message that does not revert but deploys a different byte code is
https://blockscout.com/eth/mainnet/tx/0x3d1acd9ae5e9594b93d6529ac77c39bc4f570b360c4778350e5851460489ce65

Expected behaviour

Contract
https://blockscout.com/eth/mainnet/address/0xf4a5afe28b91cf928c2568805cfbb36d477f0b75/contracts
Should display byte code

0x6080604052600436106038577c01000000000000000000000000000000000000000000000000000000006000350463cf7a89658114603a575b005b348015604557600080fd5b50603860005473ffffffffffffffffffffffffffffffffffffffff16fffea165627a7a72305820fb2fe14fd1f221f892018a606564e9b19eb345b6b58bf4c2d3c45f2c35379d8c0029

Actual behaviour

Contract
https://blockscout.com/eth/mainnet/address/0xf4a5afe28b91cf928c2568805cfbb36d477f0b75/contracts
Displays byte code

0x6080604052600436106038577c010000000000000000000000000000000000000000000000000000000060003504633ccfd60b8114604f575b336000908152602081905260409020805434019055005b348015605a57600080fd5b5060616063565b005b33600081815260208190526040808220805490839055905190929183156108fc02918491818181858888f1935050505015801560a3573d6000803e3d6000fd5b505056fea165627a7a72305820e9a226f249def650de957dd8b4127b85a3049d6bfa818cadc4e2d3c44b6a53530029
@gitcoinbot

This comment has been minimized.

Copy link

@gitcoinbot gitcoinbot commented Feb 14, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 300.0 DAI (300.0 USD @ $1.0/DAI) attached to it as part of the poanetwork fund.

@gitcoinbot

This comment has been minimized.

Copy link

@gitcoinbot gitcoinbot commented Feb 15, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 11 months, 1 week from now.
Please review their action plans below:

1) cleanunicorn has been approved to start work.

I've reported this issue before making it public

Learn more on the Gitcoin Issue Details page.

@gitcoinbot

This comment has been minimized.

Copy link

@gitcoinbot gitcoinbot commented Feb 15, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 300.0 DAI (300.0 USD @ $1.0/DAI) has been submitted by:

  1. @cleanunicorn

@igorbarinov please take a look at the submitted work:


@gitcoinbot

This comment has been minimized.

Copy link

@gitcoinbot gitcoinbot commented Feb 15, 2019

Bug Finder ⚡️ A *Bug Finder* Kudos has been sent to @cleanunicorn for this issue from @igorbarinov. ⚡️

Nice work @cleanunicorn!
Your Kudos has automatically been sent in the ETH address we have on file.

@gitcoinbot

This comment has been minimized.

Copy link

@gitcoinbot gitcoinbot commented Feb 15, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 300.0 DAI (300.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @cleanunicorn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.