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

Validate that eth_call works for reading dynamic data after it has been updated #4298

Closed
IvanKavaldzhiev opened this issue Aug 16, 2022 · 1 comment
Assignees
Labels
enhancement Type: New feature limechain Work planned for the LimeChain team web3 Area: Web3 API

Comments

@IvanKavaldzhiev
Copy link
Contributor

IvanKavaldzhiev commented Aug 16, 2022

Problem

We need to validate that eth_call can successfully read dynamically changed data (e.g. account balance). Let's say we have an account with zero hbar and token balance. After HAPI/precompile hbar/token transfer to this account is performed and the corresponding .rcd file ingested on mirror-node side, the balance would be updated in the PostgreSQL DB. Validate that performing eth_call read on the updated balances returns correct value.

Solution

Case 1

Create a new account in the PostgreSQL DB on mirror-node side and assert that they have 0 hbars.
Perform a transfer of hbars to this account.
Validate that eth_call retrieves the correct updated account balance.

Case 2

Create a new account in the PostgreSQL DB on mirror-node side and assert that they have 0 amount for a given fungible token.
Perform a transfer of tokens to this account.
Validate that eth_call retrieves the correct updated account's token balance.

Alternatives

No response

@IvanKavaldzhiev IvanKavaldzhiev added the enhancement Type: New feature label Aug 16, 2022
@IvanKavaldzhiev IvanKavaldzhiev added web3 Area: Web3 API limechain Work planned for the LimeChain team labels Aug 16, 2022
@IvanKavaldzhiev
Copy link
Contributor Author

Some tests were performed with SDK calls sent to local-node instances of hedera-node and mirror-node. The results showed that hbar balance is updated directly after a transfer, while fungible token balance and nft serial number transfers did not show up until a 15-minutes delay. The delay for fungible and nft transfers should be address before releasing the EVM Module with eth_gasEstimate compatibility.

Repository owner moved this from In Progress to Done in Smart Contract Sprint Board Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature limechain Work planned for the LimeChain team web3 Area: Web3 API
Projects
None yet
Development

No branches or pull requests

2 participants