Ryan G
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Merge F2F Interop Event: EthereumJS Client ###### tags: `EthereumJS` `Merge` `Interop` ## Introduction See [Client Milestone Tracker](https://hackmd.io/_9XZIkDBTlqGJejVnOSOJg?view) for a general overview. If you get a connection going - amazing! Let us know or mark it in the milestone tracker hackmd and find Ryan or Holger to try out Mx+1 🙂! If you have any issues or logs to report please send to Ryan (@ralxz on telegram) ## EthereumJS Setup Please ensure you have Node 12.x+ installed (16.x preferred, 12.x+ should work fine) 1. `git clone --depth 1 --branch merge-contd-2 https://github.com/ethereumjs/ethereumjs-monorepo.git` 2. `cd ethereumjs-monorepo` 4. `npm i` 5. `cd packages/client` ### Ports Our JSON-RPC API for both `eth_` and `engine_` are currently served on port `8545` (if you'd like to change ports: `--rpcport` or `--port` for devp2p port. we will separate `engine_` onto a different port as a next task) ### Endpoints We don't currently have the entire `eth_` JSON-RPC API implemented, but have some key ones including `eth_getBlockByNumber` with `latest` and `earliest`. `eth_getLogs` currently mocked as an empty response (as a hack for Merge interop). ## M2 1-to-1 Interop (no transition) ### EthereumJS <-> Lodestar (M2) First start the EthereumJS client: ```shell! npm run client:start -- --gethGenesis=./test/testdata/geth_genesis_merge_interop_taunas.json --rpc --rpcEngine --rpcport=8545 --loglevel=debug ``` * (the `./test/testdata/geth_genesis_merge_interop_taunas.json` file exists in the branch you checked out) Install Lodestar following the [Amphora instructions](https://github.com/ChainSafe/lodestar/tree/master/amphora#amphora-readme) and run with: ```shell ./lodestar dev --genesisValidators 32 --startValidators 0:31 \ --api.rest.enabled --api.rest.host 0.0.0.0 \ --sync.isSingleNode \ --eth1.enabled --eth1.providerUrls http://localhost:8545/ \ --logFile beacon.log --logLevelFile debug --logRotate --logMaxFiles 5 \ --params.SECONDS_PER_SLOT 4 \ --params.ALTAIR_FORK_EPOCH 0 \ --params.MERGE_FORK_EPOCH 0 \ --params.TERMINAL_TOTAL_DIFFICULTY 0 \ --genesisEth1Hash=0x9287c1b0a22416cd3122d466ad7d79f80886e028a596e6bb9d525c3e4de37709 \ --execution.urls http://localhost:8545/ ``` ## M3 1-to-1 Interop (with transition) ### EthereumJS <-> Lodestar (M3) You can use the following key pair for running the EthereumJS client and start mining: ```shell= Address: 0xf6b913c5747c0ae128adc0e41f0adfd88aff7bc9 Private key: 0x17eb958eb18cb2ecbf8ad26b9f008db9baa3d6dbf80ad949cf261f327e58ea6c ``` Run the EthereumJS client with: ```shell! npm run client:start -- --gethGenesis=./test/testdata/geth_genesis_merge_interop_taunas_own_signer.json --rpc --rpcEngine --rpcport=8545 --loglevel=debug --mine --unlock=0xf6b913c5747c0ae128adc0e41f0adfd88aff7bc9 ``` When prompted unlock the miner account with the private key from above. Start the Lodestar client with: ```shell ./lodestar dev --genesisValidators 32 --startValidators 0:31 \ --api.rest.enabled --api.rest.host 0.0.0.0 \ --sync.isSingleNode \ --eth1.enabled --eth1.providerUrls http://localhost:8545/ \ --logFile beacon.log --logLevelFile debug --logRotate --logMaxFiles 5 \ --params.SECONDS_PER_SLOT 4 \ --params.ALTAIR_FORK_EPOCH 0 \ --params.MERGE_FORK_EPOCH 1 \ --params.TERMINAL_TOTAL_DIFFICULTY 66 \ --execution.urls http://localhost:8545/ ``` ## Hacknet v2 For running an Eth2 client EthereumJS client combination on [Hacknet v2](https://github.com/karalabe/hacknet/tree/main/v2) you need to clone the repository (`git clone https://github.com/karalabe/hacknet.git`), directory is assumed to be on the same level as the `ethereumjs-monorepo` directory. ### EthereumJS / Lodestar Update to the latest state of the `merge-contd-2` branch (see above) with `git pull merge-contd-2` and reinstall and build with `npm i` from the root of the monorepo. Then start the EthereumJS client with: ```shell! rm -Rf [DATA_DIRECTORY] && DEBUG=devp2p:eth npm run client:start -- --gethGenesis=../../../hacknet/v2/genesis.json --rpc --rpcEngine --rpcport=8545 --loglevel=debug --bootnodes=35.178.114.73:30303 ``` Follow installing and running Loadstar from [these instructions](https://github.com/ChainSafe/lodestar/tree/merge-interop/amphora/v2). For more reproduceable results you might run with deleting the data folder before: ```shell! rm -Rf amphora/v2/temp/ && amphora/v2/run.sh ``` ## Mergemock (WIP, have not gotten working on local yet -ryan) Follow the [quick start instructions](https://github.com/protolambda/mergemock#quick-start). Update `genesis.json` and set `terminalTotalDifficulty` to `37179869184` Run client with: ```bash! npm run client:start -- --gethGenesis=../../../mergemock/genesis.json --rpc --rpcEngine --rpcport=8545 --loglevel=debug ``` Copy the `enode://` from this logged line: ```bash! INFO [10-08|10:30:07] Listener up transport=rlpx url=enode://0da614598ab5996889fc6f28983a1169e3508e8e07f0c1102fa55f7d7c047678c98465721a414b97a158673f49456bb138d45376d373c9b5593eb028241df935@[::]:30303 ``` and replace `[::]` with `0.0.0.0` Run mergemock with: ```bash! ./mergemock consensus --engine="http://localhost:8545" --slot-time="5s" --ttd=37179869184 --node="enode://0da614598ab5996889fc6f28983a1169e3508e8e07f0c1102fa55f7d7c047678c98465721a414b97a158673f49456bb138d45376d373c9b5593eb028241df935@0.0.0.0:30303" ```

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully