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: add eth 68 protocol #117

Merged
merged 11 commits into from
Sep 11, 2024
Merged

feat: add eth 68 protocol #117

merged 11 commits into from
Sep 11, 2024

Conversation

egonspace
Copy link
Collaborator

@egonspace egonspace commented Jul 22, 2024

This PR adds "eth68" protocol to go-wemix as it makes new go-wemix based on go-ethereum 1.13 possible to synchronize with legacy WEMIX network.

go-ethereum v1.13 has no eth-65(renamed to mir-65), eth-66(mir-66) protocol which is used by go-wemix legacy, so we need to add eth-66(mir-66) protocol to new go-wemix based on go-ethereum 1.13 or to add eth-68 protocol to legacy wemix nodes.

But it's not good solution to add eth-66(mir-66) protocol to new go-wemix because porting legacy code to new product makes us hard to merge new go-ethereum updates. So I added eth-68 protocol to go-wemix.

If we develop new go-wemix, several public EN nodes should be upgraded with a version having this eth-68 protocol so that new go-wemix can synchronize WEMIX legacy chain.

I refer this PR(ethereum#25980) from go-ethereum repository.

And following WEMIX extended protocol of mir-65, mir-66 is not ported because these protocol is not used or required only to BP nodes.

GetPendingTxsMsg  = 0x11
GetStatusExMsg    = 0x12
StatusExMsg       = 0x13
EtcdAddMemberMsg  = 0x14
EtcdClusterMsg    = 0x15
TransactionsExMsg = 0x16

As a result, the protocols supported by each node are as follows.

  • Legacy go-wemix: mir-65, mir-66, eth-68(optional)
  • New go-wemix base on go-ethereum 1.13: eth-68

And I tested on devnet chain.

  1. upgrade an EN node with this PR. (it enables eth-68 protocol on the EN)
  2. on local PC, I boot up an EN which has only eth-68 protocol (disabled mir-65, mir-66)
  3. this local node can synchronize blocks from genesis: success
  4. this local node can import new created block after finishing sync: success

@egonspace egonspace changed the title fix: eth 68 protocol feat: add eth 68 protocol Aug 8, 2024
@egonspace egonspace mentioned this pull request Aug 30, 2024
eth/protocols/eth/handler.go Outdated Show resolved Hide resolved
@jennwiederholen jennwiederholen merged commit 543e610 into dev Sep 11, 2024
4 checks passed
This was referenced Sep 11, 2024
jennwiederholen added a commit that referenced this pull request Sep 12, 2024
* Add release ci (#102)

* Create release.yml

* fix: typo

* fix: remove sha

* fix: specify ubuntu version in ci files

* fix: setup packages in ci files to match dependency

* fix: integrate file name rule to keep consistency between ci files

* fix: use gwemix version instead of ref name

* feat: update snapshot pending state

* Migrate governance-contracts (#89)

* migrate : governance-contract

* panic: core.GenerateChain

* fix: test panic

* fix : FakeMode, escape futureBlock

* fix : panic bad block

* refact : mv wemix_backends -> wemix package

* refact : remove common/bn

* refact : GovContracts

* fix : remove unused

* fix : rename confusing variable

* fix : unhandled error

* fix : code style

* refact: migrate openzeppelin contract:v4.6.0, contracts-upgrade:v4.7.0

* feat : update governancedeploy use wemix/bind

* fix : remove unused

* fix : default init envstorage values

* fix : gwemix.sh

* fix : compare fixed bytes

* fix : compare fixed bytes

* fix : typo

* fix : Flag type

* feat : update genesisConfig

* fix : remove unused code

* fix : deploy log

* feat : wemix simulated OptionFn

* feat : install solc

* fix : typo

* fix : typo

* fix : error verifyBlockSig

* fix : remove unused file

* fix : gwemix.sh

* fix: go.mod

* refact : using bind structs

* docs : gwemix.sh comment

* refact : submodule openzeppelin

* feat : using NCPExit

* wip : dev-ci

* fix : unuse generic

* fix : TestWemixBackends$

* feat : using generic, remove lint_test go@1.17

* fix: go:generate

* fix : clean code

* fix : remove comment

* fix : clean code

* feat : (governance abigen) compare data before writing to the file

* refact : using compiledTy

* feat : include sigs wemix/bind contracts

* refacet : move compiled, remove simulated-backend

* fix : clean code

* fix : clean code

* fix : detailed tick processing

* feat : [init-gov] add option password

* fix : gwemix.sh init-gov params

* fix : [init-gov] add option password

* refact : use const

* fix : use constant

* fix : loadGenesisConfig

* fix : check bootnodeExists

---------

Co-authored-by: egonspace <egonspace@gmail.com>

* fix : call staker address (#114)

fix : get contracts address StakingReward domain

* Feat: add local test scripts (#113)

* migrate : governance-contract

* panic: core.GenerateChain

* fix: test panic

* fix : FakeMode, escape futureBlock

* fix : panic bad block

* refact : mv wemix_backends -> wemix package

* refact : remove common/bn

* refact : GovContracts

* fix : remove unused

* fix : rename confusing variable

* fix : unhandled error

* fix : code style

* refact: migrate openzeppelin contract:v4.6.0, contracts-upgrade:v4.7.0

* feat : update governancedeploy use wemix/bind

* fix : remove unused

* fix : default init envstorage values

* fix : gwemix.sh

* fix : compare fixed bytes

* fix : compare fixed bytes

* fix : typo

* fix : Flag type

* feat : update genesisConfig

* fix : remove unused code

* fix : deploy log

* feat : wemix simulated OptionFn

* feat : install solc

* fix : typo

* fix : typo

* fix : error verifyBlockSig

* fix : remove unused file

* fix : gwemix.sh

* fix: go.mod

* refact : using bind structs

* docs : gwemix.sh comment

* refact : submodule openzeppelin

* feat : using NCPExit

* wip : dev-ci

* fix : unuse generic

* fix : TestWemixBackends$

* feat : using generic, remove lint_test go@1.17

* fix: go:generate

* fix : clean code

* fix : remove comment

* fix : clean code

* feat : (governance abigen) compare data before writing to the file

* refact : using compiledTy

* feat : include sigs wemix/bind contracts

* refacet : move compiled, remove simulated-backend

* fix : clean code

* fix : clean code

* fix : detailed tick processing

* Feat: add local test scripts

* Fix: minor fix

* feat : [init-gov] add option password

* fix : gwemix.sh init-gov params

* Chore: typo fix

* fix : [init-gov] add option password

* Fix: fix set-nodekey.sh

* Chore: push for test

* refact : use const

* Feat: add init-boot.sh

* Fix: minor fix

* chore: minor typo

* chore: add waiting message for port to open in init-boot.sh

* Chore: minor test

* chore: improve waiting message for port to open in init-boot.sh

* feat: add executable permission to gwemix.sh in init-boot.sh

* chore: improve gwemix start confirmation in init-boot.sh

* chore: update log file path and success message in init-boot.sh

* chore: Update init-boot.sh to improve gwemix start confirmation

* chore: Add pcscd service to Dockerfile.local.boot and start it in init-boot.sh

* chore: Update init-boot.sh to start gwemix service and improve start confirmation

* chore: Update Dockerfile and gen-docker-compose.sh for wemix node configuration

* chore: Refactor key generation and configuration scripts

* chore: Clean up unnecessary files and improve entrypoint in Dockerfile.local.boot and Dockerfile.local.node

* chore: Update init-boot.sh to start gwemix service and improve start confirmation

* chore: Update init-boot.sh to improve gwemix start confirmation

* chore: Update Makefile and Dockerfile.local.boot to include init-node.sh in build process

* chore: Update init-node.sh to check if the boot node has started before executing commands

* chore: Update init-node.sh to include datadir for wemix

* chore: Improve gwemix start confirmation and add etcd initialization

* chore: Update init-boot.sh to use console command for etcd initialization

* chore: Add curl and netcat-traditional to Dockerfile

* chore: Refactor local-docker-env scripts for key generation and configuration

* chore: Update Makefile-local-env to include wemix configuration files in build process

* Feat: Refactor local-docker-env scripts for key generation and configuration

* Chore: revert makefile

* chore: Update local-docker-env scripts for key generation and configuration

* chore: Update Dockerfile to include missing command for updating CA certificates

* chore: change local test readme to english

* chore: Refactor local-docker-env scripts for key generation and configuration

* chore: Update Dockerfile to use specified Ubuntu version in the Docker image

---------

Co-authored-by: felix-shin-wt <znzno700@wemade.com>
Co-authored-by: egonspace <egonspace@gmail.com>
Co-authored-by: felix-shin-wt <65204854+felix-shin-wt@users.noreply.github.com>

* add .prettierrc [solidity formatter] (#115)

* feat : add prettierrc

* fix : remove unuseful comment

* [add proposal type] governance general purpose (#116)

* feat : add execute

* fix : upgrade issue

* test : execute

* feat : append gap

* fix : gap size

* fix : [execute fail] return value

* fix : typo

* fix : typo

* feat : test code

* feat : gov abigen

* fix: update rocksdb to v6.28.2 (#120)

fix: update rocksdb v6.27.3 -> v6.28.2

* fix : remove memsize (#122)

* Feat: remove mem-size to support go1.23

* Fix: remove memsize from mobile/geth

* feat: add eth 68 protocol (#117)

* fix: eth 68 protocol

* fix: test failure

* fix: test failure

* fix: protocol name for eth68

* fix: support eth protocol name

* fix: lint error

* fix: use  protocol name when handshaking

* fix: protocol name

* fix: protocol match bug

* fix: not load NCPExit contract

* fix: apply comment

* Feat: version patch to 9 (#126)

:Feat: version patch to 9

---------

Co-authored-by: jed-wemade <127728629+jed-wemade@users.noreply.github.com>
Co-authored-by: egonspace <egon@wemade.com>
Co-authored-by: felix-shin-wt <65204854+felix-shin-wt@users.noreply.github.com>
Co-authored-by: egonspace <egonspace@gmail.com>
Co-authored-by: paul ahn <paulahn2022@wemade.com>
Co-authored-by: felix-shin-wt <znzno700@wemade.com>
This was referenced Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants