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

homa predeploy reverts for old blocks #2789

Closed
shunjizhan opened this issue Aug 15, 2024 · 10 comments
Closed

homa predeploy reverts for old blocks #2789

shunjizhan opened this issue Aug 15, 2024 · 10 comments

Comments

@shunjizhan
Copy link
Contributor

shunjizhan commented Aug 15, 2024

it's odd that homa.getExchangeRate() reverts for old blocks, did some binary search and the boundary seems to be block 444102: it reverts before block 4444102 and works afterwards.

I think we should already have homa up and running at block 4444102, right?

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [{
            "to": "0x0000000000000000000000000000000000000805",
            "data": "0xe6aa216c"
    },
    4444102
  ]
}

{
    "id": 0,
    "jsonrpc": "2.0",
    "result": "0x"
}
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [{
            "to": "0x0000000000000000000000000000000000000805",
            "data": "0xe6aa216c"
    },
    4444103
  ]
}

{
    "id": 0,
    "jsonrpc": "2.0",
    "result": "0x00000000000000000000000000000000000000000000000001d4078ab2bc43d7"
}
@xlc
Copy link
Member

xlc commented Aug 15, 2024

can't find anything interesting around that block so not exactly sure why it failed
but in old days, we did some refactoring on the Homa pallet and the predeploy contracts so it wouldn't work for very very old blocks

@shunjizhan
Copy link
Contributor Author

I believe it should be working not too long ago, since this code worked before, which starts indexing at block 4440289

@shunjizhan
Copy link
Contributor Author

oh nevermind I think the first tx being indexed is at block 4538303, so it might not actually hit that line until block 4538303

@shunjizhan
Copy link
Contributor Author

shunjizhan commented Aug 15, 2024

I will adjust the new indexer to start after 4444103, so it won't be an issue for now

@xlc xlc closed this as completed Aug 15, 2024
@shunjizhan
Copy link
Contributor Author

shunjizhan commented Aug 15, 2024

acala enabled the EVM after 840000

yeah the block number is 4444102 (~a year ago), after evm started

@shunjizhan
Copy link
Contributor Author

@xlc should we keep the issue open? It does look like a bug, just not blocking us for now

@zjb0807
Copy link
Member

zjb0807 commented Aug 15, 2024

The STABLE_ASSET predeploy contracts deployed on block 4444101 https://acala.subscan.io/extrinsic/4444101-2

@shunjizhan
Copy link
Contributor Author

shunjizhan commented Aug 15, 2024

interesting, does homa fetch exchange rate from it?

@zjb0807
Copy link
Member

zjb0807 commented Aug 15, 2024

This Homa https://acala.subscan.io/extrinsic/4444103-2?event=4444103-11

you can check list here https://acala.subscan.io/event?module=evm&event_id=ContractPublished

@shunjizhan
Copy link
Contributor Author

cool that makes sense

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