cerc-io / go-ethereum

Read-only mirror of https://git.vdb.to/cerc-io/go-ethereum (Statediffing-fork of the official Go implementation of the Ethereum protocol)
https://git.vdb.to/cerc-io/go-ethereum
GNU Lesser General Public License v3.0
13 stars 4 forks source link

Async `WriteStateDiffFor` #356

Closed i-norden closed 1 year ago

i-norden commented 1 year ago

In https://github.com/cerc-io/go-ethereum/pull/306 WriteStateDiffAt was made async and now returns a JobID whose progress can be monitored with the StreamWrites endpoint now, but WriteStateDiffFor is still using the old sync pattern. This should be a quick patch and done at the same time as #355

Included in this issue, we need to add test coverage for the changes in https://github.com/cerc-io/go-ethereum/pull/306 and the new changes here.

i-norden commented 1 year ago

It seems the async method + streamWrites is broken, see CICD history on this PR: https://github.com/cerc-io/eth-statediff-fill-service/pull/16

Can get tests to pass by using the sync WriteStateDiffFor method, but not with async WriteStateDiffAt using StreamWrites to wait for completion.

I may also have made a mistake on the subscriber side.

telackey commented 1 year ago

https://git.vdb.to/cerc-io/go-ethereum/issues/356