feat(eth)!: add Eth APIs to /v2 + minor improvements & fixes#13026
feat(eth)!: add Eth APIs to /v2 + minor improvements & fixes#13026
Conversation
|
Got it all wired up now. I've tried to improve the state of some of the things in here but it's quite tricky. The most interesting part of this as far as v2 is concerned is in the Misc things I've done in here that apply to v1 as well that I'll need to note in the changelog:
Still need to add more test coverage and I also need to exercise the behaviour of F3 for |
5036b50 to
88ee667
Compare
|
Making good progress here but the tests are getting tedious. Half of the impacted endpoints are being tested so far. |
|
Calling this Ready for Review although I still need to write the CHANGELOG entry (so I'm leaving that failing). I've expanded support for tags in the /v1 API in the process of doing this so I need to make clear what's changing, not just for /v2 additions. But the code and tests I think are good to go. |
1d699e9 to
3a4b1f7
Compare
|
Addressed all of the feedback, and found some more things to deal with too. The major change now is wrt
i.e. when F3 is activated, both /v1 and /v2's I've also removed the |
|
This is not ready to be merged, latest discussion about what's needed here requires me to make the following changes:
|
|
Lets talk during 2025-04-22 standup on how we get this merged. My thoughts:
|
To refine this slightly: V2 APIs are F3 aware as long as F3 is enabled, regardless of F3 activation on mainnet. It really should be obvious that no-one can rely on F3 in mainnet until it is ...activated! |
I'm find with this and will adjust, although the process of getting here has made some improvements to both forms of the eth APIs which I'll document but I'll leave But, we should note the original reason we started touching them here and not lose track of this as a future area of work. The |
I was saying this on principle but hadn't looked at the PR. I looked at it more today and I see there is more nuance. Apologies if I'm causing whiplash here - my intent was to simplify the conversation so we could hopefully land something sooner without a lot of discussion. Going through the changelog:
👍
👍
👍
The rationale makes sense and maybe this is where we want to end eventually? If the code is easier to reason about if we have consistency between /v1 and /v2 then I'm more apt to leave what you have or at least just simplify to assuming F3 is active since it will be shortly. I can also see the mindset of "don't change the semantics of v1 and we potentially improve it later".
👍
👍
👍
👍
👍 |
|
Pushed changes that roll back the use of F3 in /v1 at all but note this may change in the future. I was going to roll back the Worked on the docs a bit too, but feel free to hack at that to make it clearer. |
BigLep
left a comment
There was a problem hiding this comment.
Thanks for scoping down the changes @rvagg .
I have one comment about if/when we fallback to EC.
I see /v2 also has support for
- Filecoin
- Net
- Web3
- Web3ClientVersion
I assume that's intentional. Do we need to document this?
- Web3ClientVersion
I can take a stab at documenting the /v2 APIs for https://www.notion.so/filecoindev/Filecoin-V2-APIs-1d0dc41950c1808b914de5966d501658 (sort like how started on this in #13051 for the safe tag). My approach would be to say soemthing along the lines that /v2 ETH APIs are basically the same to /v1 ETH APIs but that finalized and safe have different meaning. I'd explain what safe and finalized mean in /v2. I'd then link to https://github.com/filecoin-project/lotus/blob/master/documentation/en/api-v2-unstable-methods.md for the API listing rather than generating docs in Notion for all of them.
.. I've updated the CHANGELOG to have a bit more detail, I was intending it to be implicit that they're all covered. Everything in https://github.com/filecoin-project/lotus/blob/master/api/eth_aliases.go is covered, those are standard Ethereum calls (or Erigon), plus our couple of custom extra addressing ones that we don't alias. |
Very draft for now, mainly focused on keeping /v1 working without molesting it too much. The beginnings of /v2 are in here already, it's just not wired up to the main struct yet .. or tested.