-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement Eth JSON-RPC #277
Comments
how wallets will work if txs are not compatible? beside objects that can be coerced into eth, there are many that can't. providing only eth api is not sufficient with l1 rollup design such API does make sense, but there is no reason to implement it before doing vm work. |
also before starting this work, we need to research that we can do compliant api. we should take reference spec for chosen API (i was looking at startknet rpc) and add notes what every method means and should do in spacemesh terms . and also account for some expected behavior which is not a part of the spec, but might be problematic for integration such as handling reorgs |
@dshulyak thanks for taking a look.
such as? ATXs I guess? I don't know that it's critical that this API expose all data. we'll have multiple APIs. and things like ATXs, ballots, proposals, etc. are not relevant from the perspective of the wallet or the user submitting transactions.
eth has reorgs too. I don't see an issue here.
agree, this is the next step. |
this is what i said. eth api is not sufficient. submitting txs is not the only use case for data api. also because txs are not compatible there is no reason to rush implementing it, before execution / vm engine is implemented there are also rewards that represented as separate object in spacemesh, so somehow they will need to be represented. |
There are two fundamental issues with the current node API: 1. it's not complete and not terribly well designed (see summary here: #269 (comment)), and 2. it's not compliant with any existing blockchain API spec, which makes integration work quite difficult. Note that we have "competing" proposals on the table to rewrite/improve the existing API (#270), and to build an entirely new API (#269); we also have a related proposal to support even broader EVM compatibility (#189).
We can kill two birds with one stone by adding support for an existing, standard API, and the most obvious choice is Eth-flavored JSON-RPC. Skimming the JSON-RPC spec, I don't see any major issues or major incompatibilities, though this will require some additional work. If we do implement it, it's likely we'll need to drop certain endpoints and modify the behavior of others, but there's precedent for doing this and other projects have done this quite successfully.
Benefits:
Downsides:
Lots of other chains that aren't natively EVM compatible have done this, so we're in good company. Here are examples:
See also: #223
The text was updated successfully, but these errors were encountered: