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(rpc): add rpc types and interface defintions #8

Merged
merged 9 commits into from
Oct 3, 2022

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Oct 1, 2022

adds 3 crates:

  • rpc-types: all types used in RPC (done)
  • rpc-api: all RPC interface definitions (eth,web3,net,traces done)
  • rpc: RPC impl (todo)

@@ -0,0 +1,25 @@
//! Ethereum related types
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that rust is moving away from using mod.rs as main way to specify modules: https://doc.rust-lang.org/book/ch07-05-separating-modules-into-different-files.html#alternate-file-paths
should we do the same?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

personally, I'm not a fan of declaring modules as files, but that's just because I'm not used to it.

we should decide this for the entire codebase and be consistent.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a bit conflicted on it - I'm used to mod.rs by now, but honestly mod.rs has always been a bit opaque to me, you never know what's in there. Some people put nothing in there (just re-exports and docs, maybe a prelude module), others put the bulk of their impl in there. I could go either way but I might slightly favor cutting mod.rs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

My experience is I needed no insignificant time to get used to not having mod.rs, as I prefer it more. But now, consistency is more important and I don't mind it. The reason why I am mentioning it is that rustlang, is moving to no mod.rs way and in that sense, it is becoming "idiomatic" way to use modules.

Copy link
Collaborator

@rakita rakita left a comment

Choose a reason for hiding this comment

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

looks good, left a few nitpick comments

Copy link
Collaborator

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

Should we also implement the debug namespace (getRawHeader, getRawBlock, getRawTransaction, getRawReceipts, getBadBlocks)? It is a part of the official execution client RPC spec.

Some other missing ones:

  • eth_createAccessList
  • eth_sign
  • eth_signTransaction
  • eth_getProof

Source: https://ethereum.github.io/execution-apis/api-documentation/

We probably also need to support the engine API (auth spec, RPC spec).

@mattsse
Copy link
Collaborator Author

mattsse commented Oct 3, 2022

good point, will add

@mattsse
Copy link
Collaborator Author

mattsse commented Oct 3, 2022

  • added missing eth namespace functions and debug. This does not yet include all the functions of geth's debug namespace.

  • added engine_ namespace types and interface

@mattsse mattsse requested a review from onbjerg October 3, 2022 13:37
@mattsse mattsse merged commit 10103da into master Oct 3, 2022
@gakonst gakonst deleted the matt/rpc-support branch October 6, 2022 19:48
clabby added a commit to clabby/reth that referenced this pull request Aug 13, 2023
Resolution checkpoint

Resolution checkpoint paradigmxyz#2

Resolution checkpoint paradigmxyz#3

x

Resolution checkpoint paradigmxyz#4

Resolution checkpoint paradigmxyz#5

Resolution checkpoint paradigmxyz#6

Resolution checkpoint paradigmxyz#7

Resolution checkpoint paradigmxyz#8

Resolve checkpoint paradigmxyz#9 (transaction primitive)

Resolve checkpoint paradigmxyz#10 (rpc api transactions)

Resolve checkpoint paradigmxyz#11 (building w/o feature flag)

Start review

Compiling with and without `optimism` feature flag

Remove `DepositTx` from txpool mock tests, they never go into the txpool

fmt

code lint

fix signature tests

Co-authored-by: nicolas <[email protected]>

Use free CI runners (revert before upstream)

Co-authored-by: refcell <[email protected]>

Signature test fixes

Co-authored-by refcell <[email protected]>

Fix Receipt proptest

Co-authored-by BB <[email protected]>

lint

Fix variable-length compact for txtype/transaction

Co-authored-by: Brian Bland <[email protected]>

Fix basefee tests

Remove unnecessary rpc deps

Co-authored-by: Brian Bland <[email protected]>
Co-authored-by: refcell <[email protected]>
Co-authored-by: nicolas <[email protected]>
Co-authored-by: Roberto <[email protected]>
clabby added a commit to clabby/reth that referenced this pull request Aug 13, 2023
Resolution checkpoint

Resolution checkpoint paradigmxyz#2

Resolution checkpoint paradigmxyz#3

x

Resolution checkpoint paradigmxyz#4

Resolution checkpoint paradigmxyz#5

Resolution checkpoint paradigmxyz#6

Resolution checkpoint paradigmxyz#7

Resolution checkpoint paradigmxyz#8

Resolve checkpoint paradigmxyz#9 (transaction primitive)

Resolve checkpoint paradigmxyz#10 (rpc api transactions)

Resolve checkpoint paradigmxyz#11 (building w/o feature flag)

Start review

Compiling with and without `optimism` feature flag

Remove `DepositTx` from txpool mock tests, they never go into the txpool

fmt

code lint

fix signature tests

Co-authored-by: nicolas <[email protected]>

Use free CI runners (revert before upstream)

Co-authored-by: refcell <[email protected]>

Signature test fixes

Co-authored-by refcell <[email protected]>

Fix Receipt proptest

Co-authored-by BB <[email protected]>

lint

Fix variable-length compact for txtype/transaction

Co-authored-by: Brian Bland <[email protected]>

Fix basefee tests

Remove unnecessary rpc deps

Co-authored-by: Brian Bland <[email protected]>
Co-authored-by: refcell <[email protected]>
Co-authored-by: nicolas <[email protected]>
Co-authored-by: Roberto <[email protected]>
anonymousGiga added a commit to anonymousGiga/reth that referenced this pull request Feb 20, 2024
AshinGau pushed a commit to AshinGau/reth that referenced this pull request Sep 20, 2024
…igmxyz#8)

- Implement cache layer for scheduler and partition without mutex.
- Reformat grevm crate code with rustfmt:
```
cargo fmt -p reth-grevm
```
AshinGau pushed a commit to AshinGau/reth that referenced this pull request Oct 13, 2024
…igmxyz#8)

- Implement cache layer for scheduler and partition without mutex.
- Reformat grevm crate code with rustfmt:
```
cargo fmt -p reth-grevm
```
greged93 pushed a commit to greged93/reth that referenced this pull request Nov 8, 2024
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

Successfully merging this pull request may close these issues.

4 participants