8 Commits

Author SHA1 Message Date
e9393dfe8c fix(eth): present revert "data" as plain bytes
decode the cbor return value for reverts and present that, as is expected by
Ethereum tooling
2024-11-07 16:29:22 +11:00
6a70c6b01b feat(eth): return consistent error for null rounds from RPC methods (#12655) 2024-10-31 20:12:34 +11:00
082b7caab5 feat(api): populate data field for revert error in EthEstimateGas and EthCall (#12553)
Co-authored-by: Aryan Tikarya <aryan.tikarya@dojima.network>
2024-10-25 01:13:32 +00:00
e04dbe1733 Fix F3 JSON RPC error pass through across API boundary (#12637)
Fix the issue by instantiating pointers to sentinel F3 error values and
assert that errors indeed pass through via an integration test.

Fixes #12630
2024-10-24 15:47:44 +00:00
a0d529263a feat: implement ticket based F3 participation lease (#12531)
* Implement ticket based F3 participation lease

Implemented enhanced ticket-based participation system for F3 consensus
in `F3Participate`. This update introduces a new design where
participation tickets grant a temporary lease, allowing storage
providers to sign as part of the F3 consensus mechanism. This design ensures that
tickets are checked for validity and issuer alignment, handling errors
robustly. If there's an issuer mismatch, the system advises miners to
retry with the existing ticket. If the ticket is invalid or expired,
miners are directed to obtain a new ticket via
`F3GetOrRenewParticipationTicket`.

Fixes https://github.com/filecoin-project/go-f3/issues/599

* Use fresh timer every time for F3 backoffs

To avoid potential of deadlock in case f3Participator is used from
multiple goroutines use throw-away timers at the price of higher GC.

Also use the cancel function in context explicitly in a unified stop
hook that awaits the participation to end before exiting.

* Strictly require start instance to never decrease

Require the start instance of a participation to never decrease if there
 is an existing lease by the miner.

* feat(f3): update go-f3 to 0.7.0 and adapt for changes to the API

* feat(f3): Include the network name in the lease

That way we don't re-use leases across networks. It's a bit racy (we ask
for the manifest before we ask for the current progress) but it should
be fine because at least we won't create a lease for the new network
with a future instance.

There's still an ABA problem if we rapidly switch back and forth between
two networks but... let's just not do that? At least for the mainnet
switchover, that won't be an issue because we enforce a 900 epoch
silence period.

I have to say, I'm not happy about this. But... we can probably just
hard-code it in the future once we get rid of the dynamic manifest.

* Handle not ready error gracefully in participator

Back off and get a fresh token if F3 is not ready.

---------

Co-authored-by: Steven Allen <steven@stebalien.com>
2024-10-08 09:57:23 +01:00
13f3e0aca4 fix: itest: check for closed connection 2022-09-27 15:34:01 +00:00
5d28eea968 chore: deps: update to go-jsonrpc 0.1.8 2022-09-27 15:34:01 +00:00
27880ece2b feat: support typed errors over RPC 2022-09-27 15:34:01 +00:00