Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Output in transaction traces seem to be missing for delegatecall #7167

Closed
karalabe opened this issue Nov 29, 2017 · 0 comments · Fixed by #7979
Closed

Output in transaction traces seem to be missing for delegatecall #7167

karalabe opened this issue Nov 29, 2017 · 0 comments · Fixed by #7979
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Milestone

Comments

@karalabe
Copy link

Inspecting a Ropsten delegatecall transaction trace for Parity https://ropsten.etherscan.io/vmtrace?txhash=0x5988b820495933d508e532a5b638b5e2d270481f7400af2e99740e87ccfd8de9&type=parity seems to indicate that no output was produced, however the go-ethereum traces seems to disagree:

{
  "type": "CALL",
  "from": "0x28622d50aa95e19deee2d7477a7885bc0864c64d",
  "to": "0xb9ed9083238737c15e99df144cec348485251438",
  "input": "0x54fd4d50",
  "output": "0x",
  "gas": "0x1df64",
  "gasUsed": "0x58c4",
  "value": "0x0",
  "calls": [
    {
      "type": "CALL",
      "from": "0xb9ed9083238737c15e99df144cec348485251438",
      "to": "0xb9ed9083238737c15e99df144cec348485251438",
      "input": "0x80ce60d10000000000000000000000000000000000000000000000000000000000000005",
      "output": "0x",
      "gas": "0x1d10f",
      "gasUsed": "0x1533",
      "value": "0x0"
    },
    {
      "type": "DELEGATECALL",
      "from": "0xb9ed9083238737c15e99df144cec348485251438",
      "to": "0xb9f5657e62f57cf62d44b571722a0ad7cbcfacac",
      "input": "0x54fd4d50",
      "output": "0x54fd4d5000000000000000000000000000000000000000000000000000000000",
      "gas": "0xd903",
      "gasUsed": "0x1bb4",
      "calls": [
        {
          "type": "CALL",
          "from": "0xb9ed9083238737c15e99df144cec348485251438",
          "to": "0xb9ed9083238737c15e99df144cec348485251438",
          "input": "0x80ce60d10000000000000000000000000000000000000000000000000000000000000006",
          "output": "0x",
          "gas": "0xcf57",
          "gasUsed": "0x1533",
          "value": "0x0"
        }
      ]
    },
    {
      "type": "CALL",
      "from": "0xb9ed9083238737c15e99df144cec348485251438",
      "to": "0xb9ed9083238737c15e99df144cec348485251438",
      "input": "0x80ce60d10000000000000000000000000000000000000000000000000000000000000007",
      "output": "0x",
      "gas": "0x19585",
      "gasUsed": "0x1533",
      "value": "0x0"
    }
  ]
}

The DELEGATECALL stack seems to contain 96 as the offset for the output and 32 as the length. Since the DELEGATECALL succeeds, I'd assume the output should also be reported.

@5chdn 5chdn added F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon. labels Nov 30, 2017
@5chdn 5chdn modified the milestone: 1.9 Nov 30, 2017
debris added a commit that referenced this issue Jan 17, 2018
* Fixed delegatecall's from/to, closes #7166

* added tests for delegatecall traces, #7167
debris added a commit that referenced this issue Jan 22, 2018
* Fixed delegatecall's from/to, closes #7166

* added tests for delegatecall traces, #7167
debris added a commit that referenced this issue Jan 22, 2018
* Fixed delegatecall's from/to, closes #7166

* added tests for delegatecall traces, #7167
5chdn pushed a commit that referenced this issue Jan 23, 2018
* Update .gitlab-ci.yml

fix cache:key

* Fixed delegatecall's from/to (#7568)

* Fixed delegatecall's from/to, closes #7166

* added tests for delegatecall traces, #7167

* Fix Temporarily Invalid blocks handling (#7613)

* Handle temporarily invalid blocks in sync.

* Fix tests.

* Improve handling of RocksDB corruption (#7630)

* kvdb-rocksdb: update rust-rocksdb version

* kvdb-rocksdb: mark corruptions and attempt repair on db open

* kvdb-rocksdb: better corruption detection on open

* kvdb-rocksdb: add corruption_file_name const

* kvdb-rocksdb: rename mark_corruption to check_for_corruption
5chdn pushed a commit that referenced this issue Jan 23, 2018
* Improve handling of RocksDB corruption (#7630)

* kvdb-rocksdb: update rust-rocksdb version

* kvdb-rocksdb: mark corruptions and attempt repair on db open

* kvdb-rocksdb: better corruption detection on open

* kvdb-rocksdb: add corruption_file_name const

* kvdb-rocksdb: rename mark_corruption to check_for_corruption

* Hardening of CSP (#7621)

* Fixed delegatecall's from/to (#7568)

* Fixed delegatecall's from/to, closes #7166

* added tests for delegatecall traces, #7167

* Light client RPCs (#7603)

* Implement registrar.

* Implement eth_getCode

* Don't wait for providers.

* Don't wait for providers.

* Fix linting and wasm tests.

* Problem: AttachedProtocols don't get registered (#7610)

I was investigating issues I am having with Whisper support. I've
enabled Whisper on a custom test network and inserted traces into
Whisper handler implementation (Network<T> and NetworkProtocolHandler
for Network<T>) and I noticed that the handler was never invoked.

After further research on this matter, I found out that
AttachedProtocol's register function does nothing:
https://github.com/paritytech/parity/blob/master/sync/src/api.rs#L172
but there was an implementation originally:
99075ad#diff-5212acb6bcea60e9804ba7b50f6fe6ec and it did the actual
expected logic of registering the protocol in the NetworkService.

However, as of 16d84f8#diff-5212acb6bcea60e9804ba7b50f6fe6ec ("finished
removing ipc") this implementation is gone and only the no-op function
is left.

Which leads me to a conclusion that in fact Whisper's handler never gets
registered in the service and therefore two nodes won't communicate
using it.

Solution: Resurrect original non-empty `AttachedProtocols.register`
implementation

Resolves #7566

* Fix Temporarily Invalid blocks handling (#7613)

* Handle temporarily invalid blocks in sync.

* Fix tests.
@5chdn 5chdn modified the milestones: 1.9, 1.10 Jan 23, 2018
5chdn pushed a commit that referenced this issue Feb 28, 2018
* Hardware-wallet/usb-subscribe-refactor (#7860)

* Hardware-wallet fix

* More fine-grained initilization of callbacks by vendorID, productID and usb class
* Each device manufacturer gets a seperate handle thread each
* Replaced "dummy for loop" with a delay to wait for the device to boot-up properly
* Haven't been very carefully with checking dependencies cycles etc
* Inline comments explaining where shortcuts have been taken
* Need to test this on Windows machine and with Ledger (both models)

Signed-off-by: niklasad1 <niklasadolfsson1@gmail.com>

* Validate product_id of detected ledger devices

* closed_device => unlocked_device

* address comments

* add target in debug

* Address feedback

* Remove thread joining in HardwareWalletManager
* Remove thread handlers in HardwareWalletManager because this makes them unused

* fixed broken logs (#7934)

* fixed broken logs

* bring back old lock order

* removed bloom groups from blockchain

* revert unrelated changes

* simplify blockchain_block_blooms

* Bump WS (#7952)

* Calculate proper keccak256/sha3 using parity. (#7953)

* Increase max download limit to 128MB (#7965)

* fetch: increase max download limit to 64MB

* parity: increase download size limit for updater service

* Detect too large packets in snapshot sync. (#7977)

* fix traces, removed bloomchain crate, closes #7228, closes #7167 (#7979)

* Remvoe generator.rs

* Make block generator easier to use (#7888)

* Make block generator easier to use

* applied review suggestions

* rename BlockMetadata -> BlockOptions

* removed redundant uses of blockchain generator and genereator.next().unwrap() calls
debris added a commit that referenced this issue Mar 6, 2018
andresilva pushed a commit that referenced this issue Mar 12, 2018
* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"

This reverts commit 1bf6203.

* Revert "fixed broken logs (#7934)"

This reverts commit f8a2e53.

* fixed broken logs

* bring back old lock order

* remove migration v13

* revert CURRENT_VERSION to 12 in migration.rs
andresilva pushed a commit that referenced this issue Mar 16, 2018
* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"

This reverts commit 1bf6203.

* Revert "fixed broken logs (#7934)"

This reverts commit f8a2e53.

* fixed broken logs

* bring back old lock order

* remove migration v13

* revert CURRENT_VERSION to 12 in migration.rs
tomusdrw pushed a commit that referenced this issue Mar 16, 2018
* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"

This reverts commit 1bf6203.

* Revert "fixed broken logs (#7934)"

This reverts commit f8a2e53.

* fixed broken logs

* bring back old lock order

* remove migration v13

* revert CURRENT_VERSION to 12 in migration.rs
debris pushed a commit that referenced this issue Mar 19, 2018
* updater: apply exponential backoff after download failure (#8059)

* updater: apply exponential backoff after download failure

* updater: reset backoff on new release

* Limit incoming connections.  (#8060)

* Limit ingress connections
* Optimized handshakes logging

* Max code size on Kovan (#8067)

* Enable code size limit on kovan

* Fix formatting.

* add some dos protection (#8084)

* more dos protection (#8104)

* Const time comparison (#8113)

* Use `subtle::slices_equal` for constant time comparison.

Also update the existing version of subtle in `ethcrypto` from
0.1 to 0.5

* Test specifically for InvalidPassword error.

* revert removing blooms (#8066)

* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"

This reverts commit 1bf6203.

* Revert "fixed broken logs (#7934)"

This reverts commit f8a2e53.

* fixed broken logs

* bring back old lock order

* remove migration v13

* revert CURRENT_VERSION to 12 in migration.rs

* Fix compilation.

* Check one step deeper if we're on release track branches

* add missing pr

* Fix blooms?

* Fix tests compiilation.

* Fix size.
andresilva pushed a commit that referenced this issue Mar 19, 2018
* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"

This reverts commit 1bf6203.

* Revert "fixed broken logs (#7934)"

This reverts commit f8a2e53.

* fixed broken logs

* bring back old lock order

* remove migration v13

* revert CURRENT_VERSION to 12 in migration.rs
tomusdrw pushed a commit that referenced this issue Mar 19, 2018
* Support parity protocol. (#8035)

* updater: apply exponential backoff after download failure (#8059)

* updater: apply exponential backoff after download failure

* updater: reset backoff on new release

* Max code size on Kovan (#8067)

* Enable code size limit on kovan

* Fix formatting.

* Limit incoming connections.  (#8060)

* Limit ingress connections
* Optimized handshakes logging

* WASM libraries bump (#7970)

* update wasmi, parity-wasm, wasm-utils to latest version

* Update to new wasmi & error handling

* also utilize new stack limiter

* fix typo

* replace dependency url

* Cargo.lock update

* add some dos protection (#8084)

* revert removing blooms (#8066)

* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"

This reverts commit 1bf6203.

* Revert "fixed broken logs (#7934)"

This reverts commit f8a2e53.

* fixed broken logs

* bring back old lock order

* remove migration v13

* revert CURRENT_VERSION to 12 in migration.rs

* more dos protection (#8104)

* Const time comparison (#8113)

* Use `subtle::slices_equal` for constant time comparison.

Also update the existing version of subtle in `ethcrypto` from
0.1 to 0.5

* Test specifically for InvalidPassword error.

* fix trace filter returning returning unrelated reward calls, closes #8070 (#8098)

* network: init discovery using healthy nodes (#8061)

* network: init discovery using healthy nodes

* network: fix style grumble

* network: fix typo

* Postpone Kovan hard fork (#8137)

* ethcore: postpone Kovan hard fork

* util: update version fork metadata

* Disable UI by default. (#8105)

* dapps: update parity-ui dependencies (#8160)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants