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

Fixing compilation errors related to go-ethereum update (non-wallet-related for now) #5458

Open
vitvly opened this issue Jul 1, 2024 · 7 comments
Assignees

Comments

@vitvly
Copy link
Contributor

vitvly commented Jul 1, 2024

Problem

Current go-ethereum dependency is outdated. We use our own fork of go-ethereum (https://github.com/status-im/go-ethereum).

For go-ethereum, the rebase with upstream has been done in wip-rebase branch (https://github.com/status-im/go-ethereum/commits/wip-rebase/). However, the compilation errors in status-go after go-ethereum dependency update are to be fixed.

Current working branch: https://github.com/status-im/status-go/tree/feature/ethereum-rebase-loggin

Future Steps

Fix wallet-related issues

@vitvly vitvly self-assigned this Jul 1, 2024
@vitvly
Copy link
Contributor Author

vitvly commented Jul 2, 2024

Below are the current compilation errors:

# github.com/status-im/status-go/logutils
logutils/logrotation.go:22:59: undefined: log.Format
logutils/logrotation.go:22:71: undefined: log.Handler
logutils/logrotation.go:29:13: undefined: log.StreamHandler
logutils/override.go:24:51: undefined: log.TerminalFormat
logutils/override.go:55:15: undefined: log.Handler
logutils/override.go:63:51: undefined: log.TerminalFormat
logutils/override.go:65:17: undefined: log.StreamHandler
logutils/override.go:75:49: undefined: log.Handler
logutils/stdhandler.go:10:29: undefined: log.Format
logutils/stdhandler.go:10:41: undefined: log.Handler
logutils/override.go:65:17: too many errors
# github.com/waku-org/go-discover/discover
vendor/github.com/waku-org/go-discover/discover/table.go:315:14: undefined: log.Lazy

@vitvly
Copy link
Contributor Author

vitvly commented Jul 16, 2024

Updated https://github.com/status-im/status-go/tree/feature/ethereum-rebase-loggin branch.

The go-ethereum dependency was updated, so that it now points to this commit from wip-rebase-2 branch: status-im/go-ethereum@62aea02.

The only difference between wip-rebase and wip-rebase-2 is the commit from this PR: ethereum/go-ethereum#29302

There is an issue from github.com/waku-org/go-discover remaining:

vendor/github.com/waku-org/go-discover/discover/table.go:315:14: undefined: log.Lazy

EDIT: wanted to leave pointers to specific upstream PRs that have caused most changes to external API for go-ethereum's logger:

In general, general blog post at https://go.dev/blog/slog and package documentation at https://pkg.go.dev/log/[email protected] provide a good source of information.

@vitvly
Copy link
Contributor Author

vitvly commented Jul 29, 2024

Current progress updates:

  1. Made some more fixes in wip-rebase-2 branch, so that to bring back source code location attributes: ethereum/go-ethereum@a7b3be5. These fixed status-go tests in logutils package (go test -v github.com/status-im/status-go/logutils)
  2. Rebased wip-rebase-2 with PRs feat: use UTC time for logs go-ethereum#108 and feat: expose localnode entries go-ethereum#109 from our go-ethereum fork (status-im/go-ethereum). These are also included in the commit above.
  3. Fixing waku-org/go-discover issues that appeared after go-ethereum logger update. Will push a PR separately.

@vitvly
Copy link
Contributor Author

vitvly commented Jul 30, 2024

Fixed go-discover and go-waku issues after update of go-ethereum dependency to wip-rebase-2 branch:
https://github.com/waku-org/go-discover/tree/fix/go-ethereum-log-update
https://github.com/waku-org/go-waku/tree/fix/go-ethereum-log-update

After updating go-waku dep (and indirectly go-discover dep) in status-go the remaining logger compiler issues have been resolved.

@vitvly
Copy link
Contributor Author

vitvly commented Jul 31, 2024

Fixed test ouput in go-discover tests. Now it's virtually identical to the pre-migration version.

The PRs to go-waku and go-discover repos (waku-org/go-discover#8 and waku-org/go-waku#1172) will wait for https://github.com/status-im/go-ethereum/tree/wip-rebase-2 to be merged.

Updated go-waku version in status-go update branch https://github.com/status-im/status-go/tree/feature/ethereum-rebase-loggin, fixing some issues related to go-waku updates. All logger-related issues seem to be resolved.

@vitvly
Copy link
Contributor Author

vitvly commented Aug 1, 2024

Wallet compiler issue in make statusgo output:

# github.com/status-im/status-go/services/wallet/common
services/wallet/common/log_parser.go:648:13: undefined: types.OptimismDepositTxType

@vitvly
Copy link
Contributor Author

vitvly commented Aug 8, 2024

Last commit in https://github.com/status-im/go-ethereum/tree/wip-rebase-2 branch of go-ethereum fork is an attempt at cherry-picking OptimismTx-related changes: status-im/go-ethereum@32ff110

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

No branches or pull requests

1 participant