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

[zero zkEVM] Update eth/tracers/native/zero.go #1110

Closed
temaniarpit27 opened this issue Sep 5, 2024 · 3 comments
Closed

[zero zkEVM] Update eth/tracers/native/zero.go #1110

temaniarpit27 opened this issue Sep 5, 2024 · 3 comments
Assignees
Labels
zero zkEVM Ticket specific to Polygon Zero zkEVM

Comments

@temaniarpit27
Copy link
Collaborator

temaniarpit27 commented Sep 5, 2024

Update eth/tracers/native/zero.go with the latest version of zero.go from erigon repo, branch - feat/zero

@temaniarpit27 temaniarpit27 self-assigned this Sep 5, 2024
@Nashtare Nashtare added the zero zkEVM Ticket specific to Polygon Zero zkEVM label Sep 18, 2024
@Nashtare Nashtare changed the title Update eth/tracers/native/zero.go [zero zkEVM] Update eth/tracers/native/zero.go Oct 1, 2024
@temaniarpit27
Copy link
Collaborator Author

temaniarpit27 commented Oct 9, 2024

There is a mismatch between nonce and balance in traces. erigon is returning as hex and cdk-erigon is returning as int.

@cffls
Copy link

cffls commented Oct 21, 2024

Expected:

curl $ETH_RPC_URL -X POST -H "Content-Type: application/json"   --data '{"method":"debug_traceBlockByNumber","params":["0x43", {"tracer": "zeroTracer",  "tracerConfig": {"witness": false}}],"id":1,"jsonrpc":"2.0"}' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1606  100  1465  100   141   833k  82167 --:--:-- --:--:-- --:--:-- 1568k
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "txHash": "0xfabba3c8930da40c985cc481844101742f040a692a08a826b3d59ca1804c50a6",
      "result": {
        "traces": {
          "0x5b06837a43bdc3dd9f114558daf4b26ed49842ed": {
            "balance": "0x4957768e00"
          },
          "0x5f5db0d4d58310f53713ef4df80ba6717868a9f8": {
            "balance": "0x4563918244f40000"
          },
          "0xe34aaf64b29273b7d567fcfc40544c014eee9970": {
            "balance": "0x152cbd644f7f5a157200",
            "nonce": "0x9"
          }
        },
        "meta": {
          "byte_code": "0xf86c0883e4e1c082c350945f5db0d4d58310f53713ef4df80ba6717868a9f8884563918244f4000080824f0da0a008e6da8d7a807b1adfc750a2dc64004cf30c0638f3f8f46b85ac7a55a2e52ba0268ddbdb0623e4643493641dae74eb57e93526ce8f519feacf2d4cf615a933ab",
          "new_txn_trie_node_byte": "0xf86c0883e4e1c082c350945f5db0d4d58310f53713ef4df80ba6717868a9f8884563918244f4000080824f0da0a008e6da8d7a807b1adfc750a2dc64004cf30c0638f3f8f46b85ac7a55a2e52ba0268ddbdb0623e4643493641dae74eb57e93526ce8f519feacf2d4cf615a933ab",
          "new_receipt_trie_node_byte": "0xf9010801825208b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0",
          "gas_used": 21000
        }
      }
    }
  ]
}

Current output:

curl $ETH_RPC_URL -X POST -H "Content-Type: application/json"   --data '{"method":"debug_traceBlockByNumber","params":["0x12", {"tracer": "zeroTracer",  "tracerConfig": {"witness": false}}],"id":1,"jsonrpc":"2.0"}' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1360  100  1219  100   141   882k   102k --:--:-- --:--:-- --:--:-- 1328k
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "txHash": "0x4eb9899d1229c71e67cea78cdc4b40065bc116270582083e8ec44d7f0a22b5bf",
      "result": {
        "traces": {
          "0x5b06837a43bdc3dd9f114558daf4b26ed49842ed": {
            "balance": "21000000000000"
          },
          "0x5f5db0d4d58310f53713ef4df80ba6717868a9f8": {
            "balance": "5000000000000000000"
          },
          "0xe34aaf64b29273b7d567fcfc40544c014eee9970": {
            "balance": "99994999979000000000000",
            "nonce": "9"
          }
        },
        "meta": {
          "byte_code": "0xf86d08843b9aca0082c350945f5db0d4d58310f53713ef4df80ba6717868a9f8884563918244f4000080824f0da0f701a011f53d674de3c92ba8ca43912bc65b6d53f9cd98dc4e24e26f9bcb4303a036ce2da3119b3cd975874c97f2db8aa93f2d559874e112a06a8a864a9dc99165",
          "new_receipt_trie_node_byte": "0xf9010801825208b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0",
          "gas_used": 21000
        }
      }
    }
  ]
}

@cffls
Copy link

cffls commented Nov 5, 2024

Closing this as completed.

@cffls cffls closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zero zkEVM Ticket specific to Polygon Zero zkEVM
Projects
None yet
Development

No branches or pull requests

4 participants