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

EVM release master checklist #119

Open
10 of 42 tasks
ilblackdragon opened this issue Oct 5, 2020 · 7 comments
Open
10 of 42 tasks

EVM release master checklist #119

ilblackdragon opened this issue Oct 5, 2020 · 7 comments
Assignees

Comments

@ilblackdragon
Copy link
Member

ilblackdragon commented Oct 5, 2020

This is a running list of required pieces to release full blown support for NEAR EVM. The EVM delivery is split into phases. Tasks that are able to be developed by community are marked with [Bounty].

Phase 1: Initial release: (?) the week of Nov 2nd

The goal of the release is to ship EVM as soon as possible to a controlled network to start testing it.

Acceptance criteria

  • Betanet is up with EVM feature enabled
  • CI is doing automatic hardforks of Betanet and running tests
  • There's a short README how to deploy Solidity code to Betanet

Phase 2: Full scope Betanet release: (?) before EoY

The goal of Betanet release is to ship a public Beta of NEAR EVM. By the end of this phase we expect to receive a mostly working EVM without additional features development, only bug fixes and usability improvements.

Acceptance criteria

  • The issues corresponding to this phase are all resolved
  • Betanet implementation is not having critical issues for 2 weeks
  • Transaction feed is working for 2 weeks with expected results
  • If the above is met: set the bug bounty (with medium rewards)

Phase 3: Testnet release

  • Rethink this: Everything needed for the Bridge operations is in place (nERC20 and NEP-21 contracts are linked & tokens can be transferred from WASM to EVM environments and back)
  • All relevant documentation sections are updated
  • Finalised specification for EVM precompile - Native EVM #106
  • [Bounty] Relayer for meta-transactions can charge users with ERC20 or other tokens @mikedotexe
  • [Bounty] Explorer: EVM contracts support
  • [Bounty] Explorer: Meta-transaction support
  • [Bounty] Explorer: Search for EVM addresses support (contracts and accounts)

Acceptance criteria

  • The issues corresponding to this phase are all resolved
  • Betanet implementation is not having critical issues for 4 weeks
  • Transaction feed is working for 4 weeks with expected results
  • Balancer UI works with Metamask
  • If the above is met: release EVM to Testnet and set the bug bounty(with high rewards)

Phase 4: Mainnet release

Acceptance criteria

  • The Testnet implementation is not having critical issues for 4 weeks
  • If the above is met: release EVM to Mainnet

Icebox

Check with Illia:

This section contains issues mentioned by Illia. One need either to remove them or add to one of the above phases.

  • Added chain-id for MainNet and TestNet - Adding NEAR EVM ethereum-lists/chains#110
  • Create secp256k1 keys to operate for Ethereum in testing (near-web3-provider)
  • Support code to work with meta transaction relayer (form a message to sign from ABI, etc), have a mode to support external wallet. (do we want this in a separate lib?, near-web3-provider)
  • Default relayer running live on relayer.{network}.near.org? Should we move it to some other domain? (near-meta-relayer)
@alexauroradev
Copy link

I would vote for removing from the scope the bridging pieces. ERC20<->nERC20<->NEP-21 switches can be complicated: ERC20 is a standard, while an individual token contract can implement additional functionality that a developer would probably want to preserve in the NEAR EVM. And I believe the reasoning for the developer to migrate to NEAR EVM is not only to allow for low-fee transfers of tokens, but also to use all the other functionality of the token contract at low fees. In this case, how to match this with NEP-21 token? We don't want to force a developer to develop an additional NEP-21 compatible NEAR contract, do we?
In case somebody wants to migrate their contract from Ethereum to NEAR, there's always an ability to freeze the contract, document its state, reproduce it in NEAR EVM with the same state, and launch the service. The bridging functionality will simplify this process, but there's no need to do it right now.

@ilblackdragon
Copy link
Member Author

It's critical to support common ERC-20s, without them most of the applications that want to use NEAR EVM won't be able to even start.

E.g. they will need nETH, nDAI - which are bridged tokens, not a copy of DAI on NEAR (which is a separate thing, and probably should have a different name if someone forks Maker on NEAR)

Given we have applications that also will use these tokens in the native NEAR environment, tokens that exist in NEAR EVM should be exchangeable with native ones. If we don't have nERC-20 -- NEP-21 connection, the only way to exchange them will be to withdraw to Ethereum and then deposit back to NEAR - which seems really weird.

@MaksymZavershynskyi
Copy link
Contributor

@ilblackdragon @djsatok We need to clarify exactly how we want tokens to be bridged from ETH to NEAR EVM. There seems to be several approaches discussed:

  • Bridge ETH ERC20 (e.g. DAI) with NEAR NEP21, then bridge NEP21 with ERC20 running inside NEAR EVM ERC20 (nDAI). This is seems to be an approach discussed in this issue. It is however not clear how NEP21 is going to be bridged with NEAR EVM ERC20, which seems to require a separate effort. If we want to go this path we need to start with the user stories and then transition into a design. Since this can be a very complex project, I suggest we extract it into a separate effort;
  • Bridge ETH ERC20 (e.g. DAI) directly with NEAR EVM ERC20 (nDAI). This would require running EthOnNearClient and EthOnNearProver in Solidity inside NEAR EVM which might not be feasible, due to computation cost.

@alexauroradev
Copy link

Let's fix the naming first:
nERC20, nDAI, ... -- these are the references to a specific Solidity contracts in NEAR EVM, which are similar to the original ones from the Ethereum. The difference may be in the initial emission procedure, plus, obviously, the state of the contract will be different.
NEP-21 DAI, ... -- these are the bridged DAI tokens from Ether to NEAR native environment. These tokens have only NEP-21 standard implemented, nothing more than that (if using the general ERC20 <-> NEP-21 connector in the bridge).

@nearmax, here are some considerations:

  • It's worth having both nERC20 and NEP-21, since this widens the spectrum of the applications
  • It's worth having the means to convert nERC20 <-> NEP-21, inside NEAR. This removes the liquidity split between two options, and decreases the switching time (direct transfer is seconds, rather than 4 hours + 6 minutes two transfers over the NEAR <-> Ethereum; Ethereum <-> NEAR EVM)
  • It may be too complicated to introduce the changes into EVM once it's in production (a lot of people already using the current version with lots of tokens locked in the bridge), so it's better to define the nERC20 <-> NEP-21 bridging right now.

So, my point of view on the issue (the mix of the current bridge and your suggested second option):

  • A bridge should provide the means to do both types of operations: ERC20 <-> nERC20 and ERC20 <-> NEP-21.
  • nERC20 and NEP-21 connector contracts should know about each other, which results in the following workflow:
    • A user sends his X nERC20 to corresponding NEP-21 contract
    • NEP-21 calls nERC20 contract to burn X tokens
    • NEP-21 contract mints X tokens and transfers it back to the user
    • Same works in the opposite direction
  • Once nearcore #3449 implemented, NEAR EVM contracts can call NEAR Wasm contracts, so there would be no need to run EthOnNearClient and EthOnNearProover-s inside NEAR EVM.

@alexauroradev
Copy link

alexauroradev commented Oct 7, 2020

@mikedotexe, @ilblackdragon, additional observation to put in the checklist:

We should check that all the methods from Ethereum JSON-RPC are covered in near-web3-provider (at least they return unsupported error) and the docs for the later are updated.

I'm not sure that this is true right now:
Let's take a look at eth_getPastLogs.

The latest spec for Ethereum JSON-RPC is here and it's not containing eth_getPastLogs. The web3.js docs contains getPastLogs with the implementation here, which is calling eth_getLogs.

I'm not sure what protocol we should implement in near-web3-provider. Either we create additional web3 library with lots of functionality (which I believe the case now with near-web3-provider, then why it's not called near-web3 ) or we make use of the web3.js library as-is and just implement NEAR JSON-RPC, which is required for the Ethereum tooling that is not using web3,js.

@MaksymZavershynskyi
Copy link
Contributor

nERC20 and NEP-21 connector contracts should know about each other

I see, you are suggesting to have a hard link between nERC20 and NEP-21 contracts. This might actually be the only way to do it. This would require modifications to the factory in https://github.com/near/rainbow-token-connector

@mikedotexe
Copy link
Contributor

Just to make sure I'm following, the "hard link" mentioned above is a trusted, smart contract we have written that lives on the NEAR EVM and connects to the "outside world" of NEAR NEP-21, yes? Basically a locker, but with burn.
Wanting to make sure we're not talking about having projects modify their ERC-20 to implement this themselves.

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

No branches or pull requests

5 participants