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

feat: milestone 1 - replay 30% of all sepolia transactions (#1201) #1236

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

arianejasuwienas
Copy link
Contributor

Description:
This Epic covers the effort to replay 30% of all Sepolia transactions and includes tasks related to code cleanup and repository migration. The goal is to reach 30% transaction replay by the end of January. Successful completion of this milestone will require the resolution of several key issues within the forked repository.

This PR includes:

  • Logging improvement Ariane-Labs/hedera-smart-contracts
  • Rewrite transaction checker from GO to TypeScript(node) Ariane-Labs/hedera-smart-contracts
  • Refactor how transaction checker handles logs Ariane-Labs/hedera-smart-contracts
  • Review documentation Ariane-Labs/hedera-smart-contracts

Related issue:

Fixes #1201

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@arianejasuwienas arianejasuwienas added the Epic Collections of tasks label Feb 6, 2025
@arianejasuwienas arianejasuwienas added this to the 0.12.0 milestone Feb 6, 2025
@arianejasuwienas arianejasuwienas self-assigned this Feb 6, 2025
@arianejasuwienas arianejasuwienas requested review from a team as code owners February 6, 2025 08:58
@arianejasuwienas arianejasuwienas changed the title #1201 - Milestone 1 - Replay 30% of All Sepolia Transactions Milestone 1 - Replay 30% of All Sepolia Transactions (#1201) Feb 6, 2025
@arianejasuwienas arianejasuwienas changed the title Milestone 1 - Replay 30% of All Sepolia Transactions (#1201) feat: milestone 1 - replay 30% of all sepolia transactions (#1201) Feb 6, 2025
@arianejasuwienas arianejasuwienas marked this pull request as draft February 6, 2025 09:05
Copy link

github-actions bot commented Feb 6, 2025

Test Results

 17 files  ± 0  103 suites  ±0   24m 39s ⏱️ + 8m 15s
370 tests +33  348 ✅ +35  19 💤 +6  3 ❌  - 8 
467 runs  ± 0  443 ✅ + 1  21 💤 +7  3 ❌  - 8 

For more details on these failures, see this check.

Results for commit 206bba6. ± Comparison against base commit 3aa1542.

This pull request removes 5 and adds 38 tests. Note that renamed tests count towards both.
"before all" hook for "should cancel a pending airdrop for a fungible token (FT)" ‑ HIP904 IHRC904Facade ContractTest Suite "before all" hook for "should cancel a pending airdrop for a fungible token (FT)"
"before all" hook for "should cancel a single pending fungible token airdrop" ‑ HIP904 CancelAirdropContract Test Suite "before all" hook for "should cancel a single pending fungible token airdrop"
"before all" hook for "should claim a single pending fungible token airdrop" ‑ HIP904 ClaimAirdropContract Test Suite "before all" hook for "should claim a single pending fungible token airdrop"
"before all" hook for "should reject tokens for a single account" ‑ HIP904 TokenRejectContract Test Suite "before all" hook for "should reject tokens for a single account"
"before each" hook for "Should check if an address is another address's operator" ‑ @OZERC1155Token Test Suite "before each" hook for "Should check if an address is another address's operator"
Should NOT allow a non-operator to transfer tokens to another account ‑ @OZERC1155Token Test Suite Should NOT allow a non-operator to transfer tokens to another account
Should NOT burn insufficient amount of token ‑ @OZERC1155Token Test Suite Should NOT burn insufficient amount of token
Should NOT transfer the ownership to another account if the caller is not owner ‑ @OZERC1155Token Test Suite Should NOT transfer the ownership to another account if the caller is not owner
Should allow an operator to transfer a token to another account ‑ @OZERC1155Token Test Suite Should allow an operator to transfer a token to another account
Should allow an operator to transfer tokens in batch to another account ‑ @OZERC1155Token Test Suite Should allow an operator to transfer tokens in batch to another account
Should burn token in batch ‑ @OZERC1155Token Test Suite Should burn token in batch
Should burn token ‑ @OZERC1155Token Test Suite Should burn token
Should check if an address is another address's operator ‑ @OZERC1155Token Test Suite Should check if an address is another address's operator
Should retrieve the token uri of a tokenID ‑ @OZERC1155Token Test Suite Should retrieve the token uri of a tokenID
Should set a new token URI ‑ @OZERC1155Token Test Suite Should set a new token URI
…

♻️ This comment has been updated with latest results.

@arianejasuwienas arianejasuwienas force-pushed the 1201-shadowing-milestone-1 branch from a3f9bf0 to 21bd47d Compare February 11, 2025 11:06
@arianejasuwienas arianejasuwienas force-pushed the 1201-shadowing-milestone-1 branch from 21bd47d to 206bba6 Compare February 11, 2025 13:00
@arianejasuwienas arianejasuwienas marked this pull request as ready for review February 12, 2025 08:07
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got like a third of the way through. See initial set of comments that may apply to many other files

### Description

Goal of the Hedera shadowing process is to research the Hedera EVM and Ethereum EVM equivalence.
This is achieved by re-executing all Ethereum transaction on by one on local Hedera network. Each transaction is verified by states match.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is achieved by re-executing all Ethereum transaction on by one on local Hedera network. Each transaction is verified by states match.
This is achieved by re-executing all Ethereum transaction one by one on a local Hedera network. Each transaction is verified by states match.

### Description

Goal of the Hedera shadowing process is to research the Hedera EVM and Ethereum EVM equivalence.
This is achieved by re-executing all Ethereum transaction on by one on local Hedera network. Each transaction is verified by states match.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify the states match.
It may not be clear to a reader if you are comparing balance or storage or both?

This is an outline of what the script does:

1. First step populates the empty Hedera local node with Sepolia genesis block accounts and assigns them proper balances by transferring funds from the treasury account in Hedera (Account Id 0.0.2). The genesis state is provided from [genesis_block_transactions.json](./src/genesis_block_transactions.json).
2. The last block from Sepolia is read, we iterate through all the block in a loop, starting from genesis block.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last block from Sepolia is read make the rest of the sentence unclear


1. First step populates the empty Hedera local node with Sepolia genesis block accounts and assigns them proper balances by transferring funds from the treasury account in Hedera (Account Id 0.0.2). The genesis state is provided from [genesis_block_transactions.json](./src/genesis_block_transactions.json).
2. The last block from Sepolia is read, we iterate through all the block in a loop, starting from genesis block.
3. For each block its miners and uncles are read. The reward for block calculated is sent to an account in Hedera using the `TransferTransaction` method from the Hashgraph SDK.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add something like this

Suggested change
3. For each block its miners and uncles are read. The reward for block calculated is sent to an account in Hedera using the `TransferTransaction` method from the Hashgraph SDK.
3. For each block its miners and uncles are read. The reward for block calculated is sent to an account in Hedera using the `TransferTransaction` method from the Hashgraph SDK. This is necessary to ensure node account balances are accurate as Ethereum and Hedera rewards nodes in different ways.

@@ -0,0 +1,66 @@
## Foundry
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a cop of the foundry README.
This should be updated with relevant content

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content should include explaining what scripts/ethereum-shadow-network/hedera-ethereum-shadowing/contracts/storage/broadcast/Storage.s.sol/296/run-1726229520.json and others do

@@ -0,0 +1,19 @@
// SPDX-License-Identifier: UNLICENSED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License headers should be Apache i believe. Confirm with the other contract files in this repo.

@@ -0,0 +1,50 @@
{
"name": "hedera-eth-shadowing",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully qualify name with github org

@@ -0,0 +1,22 @@
import axios from 'axios';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing license on all ts files

@@ -0,0 +1,20 @@
import { axiosInstanceErigon } from '@/api/config';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file seems like a subset of the next file. Are both needed?

client.setOperator(accountId, OPERATOR_PRIVATE || '');

(() => {
// No gass error issue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the commented out code?
If it's not needed then remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Collections of tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Shadow network] Milestone 1 - Replay 30% of All Sepolia Transactions
4 participants