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

Acceptance Test: Release - 2 Tests are failing #1579

Closed
AlfredoG87 opened this issue Jul 27, 2023 · 2 comments · Fixed by #1739
Closed

Acceptance Test: Release - 2 Tests are failing #1579

AlfredoG87 opened this issue Jul 27, 2023 · 2 comments · Fixed by #1739
Assignees
Labels
bug Something isn't working P1
Milestone

Comments

@AlfredoG87
Copy link
Collaborator

Description

The 2 following errors are failing when doing the acceptancetest:release against tesnet.

@release should execute "eth_getBlockByHash", hydrated transactions = true:
@release should execute "eth_getBlockByNumber", hydrated transactions = true:

They are failing since the test what it does is compare the amount of transactions from the response from the mirror node and the amount of transactions from the response of the relay however these amounts are different due to the latter including synthetic transactions

see the following example:

Mirror Node request:

https://testnet.mirrornode.hedera.com/api/v1/contracts/results?timestamp=gte:1690494460.139291227&timestamp=lte:1690494461.718756003

Mirror Node Response:

{
"results": [
{
"address": "0x00000000000000000000000000000000000060c4",
"amount": 0,
"bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"call_result": "0x",
"contract_id": "0.0.24772",
"created_contract_ids": [],
"error_message": null,
"from": "0x00000000000000000000000000000000000060b1",
"function_parameters": "0x0419eca50000000000000000000000000000000000000000000000000000000000000001",
"gas_limit": 75000,
"gas_used": 60000,
"timestamp": "1690494461.279495003",
"to": "0x00000000000000000000000000000000000060c4",
"hash": "0xc5e8e198d81c38c47f4cee5b00c984d418555b8361914dcb15588a68f2761d3b"
}
],
"links": {
"next": null
}
}

Relay request:

curl --location 'https://testnet.hashio.io/api' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockByNumber",
    "params": ["0x1AA8", true],
    "id": 1
}'

In this example it has 88 txs the Relay vs the MirrorNode only 1

The extra 87 txs are coming from logs with the same Timestamp range as the block.

Mirror Node Logs Request:

https://testnet.mirrornode.hedera.com/api/v1/contracts/results/logs?timestamp=gte:1690494460.139291227&timestamp=lte:1690494461.718756003&limit=1000&order=asc

Steps to reproduce

Run the command

npm run acceptancetest:release

with the .env configured against testnet

Note: it might be needed to re-run the test a couple times.

Additional context

No response

Hedera network

testnet

Version

v0.28.1

Operating system

None

@AlfredoG87 AlfredoG87 added the bug Something isn't working label Jul 27, 2023
@AlfredoG87 AlfredoG87 added this to the 0.29.0 milestone Jul 27, 2023
@AlfredoG87 AlfredoG87 added the P1 label Jul 27, 2023
@AlfredoG87
Copy link
Collaborator Author

@georgi-l95

I think the solution is to change the tests themselves.

I can think of 2 ways to change the test.

  1. When comparing the amount of txns from mirror-node and relay, to ignore the synthetic txns.
  2. When caomparing the amount of txns from mirror-node and relay, add to the number of txns from the block of the mirror node, also the amount of logs for that same timestamp range and then compare it with the results from the relay.

@ebadiere ebadiere self-assigned this Jul 31, 2023
@Nana-EC
Copy link
Collaborator

Nana-EC commented Jul 31, 2023

@georgi-l95

I think the solution is to change the tests themselves.

I can think of 2 ways to change the test.

  1. When comparing the amount of txns from mirror-node and relay, to ignore the synthetic txns.
  2. When caomparing the amount of txns from mirror-node and relay, add to the number of txns from the block of the mirror node, also the amount of logs for that same timestamp range and then compare it with the results from the relay.

@AlfredoG87 For an initial approach I'd say # 2. Maybe in the order of

  1. Check for # returned txns = # mirror contract results + # synthetic logs
  2. Check details to ensure timestamps match up
  3. Check other details

I think for now # 1 should be enough to unblock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants