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

support muti chain #76

Closed
rkdud007 opened this issue Sep 3, 2024 · 0 comments
Closed

support muti chain #76

rkdud007 opened this issue Sep 3, 2024 · 0 comments

Comments

@rkdud007
Copy link
Member

rkdud007 commented Sep 3, 2024

Currently cairo only designed to support 11155111. We want to support multi chains at once.
Below fixtures are tested against HerodotusDev/hdp#134

non ETHEREUM_SEPOLIA

Example request:

{
  "destinationChainId": "ETHEREUM_SEPOLIA",
  "tasks": [
    {
      "type": "DatalakeCompute",
      "datalake": {
        "type": "BlockSampled",
        "chainId": "ETHEREUM_MAINNET",
        "blockRangeStart": 20566902,
        "blockRangeEnd": 20566912,
        "increment": 1,
        "sampledProperty": "header.number"
      },
      "compute": {
        "aggregateFnId": "avg"
      }
    }
  ]
}

Error :

./src/hdp.cairo:104:5: Error at pc=0:14709:
Got an exception while executing a hint.
Cairo traceback (most recent call last):
./src/hdp.cairo:52:5: (pc=0:14666)

Traceback (most recent call last):
  File "./src/hdp.cairo", line 142, in <module>
  File "/Users/piapark/.pyenv/versions/3.10.0/lib/python3.10/site-packages/starkware/cairo/lang/vm/vm_consts.py", line 68, in __setattr__
    self.get_or_set_value(name, value)
  File "/Users/piapark/.pyenv/versions/3.10.0/lib/python3.10/site-packages/starkware/cairo/lang/vm/vm_consts.py", line 155, in get_or_set_value
    return getattr(self, handler_name)(name, value, scope, set_value)
  File "/Users/piapark/.pyenv/versions/3.10.0/lib/python3.10/site-packages/starkware/cairo/lang/vm/vm_consts.py", line 256, in handle_ReferenceDefinition
    self._context.memory[addr] = set_value
  File "/Users/piapark/.pyenv/versions/3.10.0/lib/python3.10/site-packages/starkware/cairo/lang/vm/validated_memory_dict.py", line 32, in __setitem__
    self.__memory[addr] = value
  File "/Users/piapark/.pyenv/versions/3.10.0/lib/python3.10/site-packages/starkware/cairo/lang/vm/memory_dict.py", line 206, in __setitem__
    self.verify_same_value(addr, current, value)
  File "/Users/piapark/.pyenv/versions/3.10.0/lib/python3.10/site-packages/starkware/cairo/lang/vm/memory_dict.py", line 214, in verify_same_value
    raise InconsistentMemoryError(addr, current, value)
starkware.cairo.lang.vm.memory_dict.InconsistentMemoryError: Inconsistent memory assignment at address 1:37. 1 != 11155111.
Error: Error while running the cairo program
(base)

mix with 11155111 with non

Example request:

{
  "destinationChainId": "ETHEREUM_SEPOLIA",
  "tasks": [
    {
      "type": "DatalakeCompute",
      "datalake": {
        "type": "BlockSampled",
        "chainId": "ETHEREUM_SEPOLIA",
        "blockRangeStart": 6375109,
        "blockRangeEnd": 6375109,
        "increment": 1,
        "sampledProperty": "storage.0xaFE8A72C86d5895DD6616daB26d4b736Cf22472f.0x0000000000000000000000000000000000000000000000000000000000000010"
      },
      "compute": {
        "aggregateFnId": "avg"
      }
    },
    {
      "type": "DatalakeCompute",
      "datalake": {
        "type": "BlockSampled",
        "chainId": "ETHEREUM_SEPOLIA",
        "blockRangeStart": 6375100,
        "blockRangeEnd": 6375109,
        "increment": 1,
        "sampledProperty": "header.number"
      },
      "compute": {
        "aggregateFnId": "avg"
      }
    }
  ]
}

Error:

./src/hdp.cairo:104:5: Error at pc=0:14709:
Got an exception while executing a hint.
Cairo traceback (most recent call last):
./src/hdp.cairo:52:5: (pc=0:14666)

Traceback (most recent call last):
  File "./src/hdp.cairo", line 137, in <module>
  File "./src/hdp.cairo", line 127, in write_mmr_metas
AssertionError: Chain ID mismatch!
Error: Error while running the cairo program
(base)
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

2 participants