ethersphere / swarm

Swarm: Censorship resistant storage and communication infrastructure for a truly sovereign digital society
https://swarm.ethereum.org/
GNU Lesser General Public License v3.0
489 stars 110 forks source link

Incompatible with latest go-ethereum v1.9.23 #2215

Closed ryanc414 closed 4 years ago

ryanc414 commented 4 years ago

System information

Swarm version: 0.5.7 OS & Version: macOS Catalina 10.15.7

Expected behaviour

I would like to upgrade to the latest go-ethereum v1.9.23 in a project that also depends on ethersphere/swarm.

Actual behaviour

ethersphere/swarm does not compile with go-ethereum v1.9.23. It seems that the go-ethereum team must have made some non-semver breaking changes.

Steps to reproduce the behaviour

In an empty directory run:

$ go mod init example.com/m
go: creating new go.mod: module example.com/m
$ go get github.com/ethereum/go-ethereum
go: github.com/ethereum/go-ethereum upgrade => v1.9.23
$ go get github.com/ethersphere/swarm/contracts/ens/contract

Produces output below:

Backtrace

# github.com/ethersphere/swarm/contracts/ens/contract
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ens.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ens.go:158:46: cannot use result (type interface {}) as type *[]interface {} in argument to _ENS.Contract.ENSCaller.contract.Call: need type assertion
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ens.go:177:36: cannot use result (type interface {}) as type *[]interface {} in argument to _ENS.Contract.contract.Call: need type assertion
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ens.go:199:27: cannot use out (type *common.Address) as type *[]interface {} in argument to _ENS.contract.Call
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ens.go:225:27: cannot use out (type *common.Address) as type *[]interface {} in argument to _ENS.contract.Call
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ens.go:251:27: cannot use out (type *uint64) as type *[]interface {} in argument to _ENS.contract.Call
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ensregistry.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ensregistry.go:158:62: cannot use result (type interface {}) as type *[]interface {} in argument to _ENSRegistry.Contract.ENSRegistryCaller.contract.Call: need type assertion
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/fifsregistrar.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/publicresolver.go:23:6: undefined: abi.U256
../../../go/pkg/mod/github.com/ethersphere/swarm@v0.5.7/contracts/ens/contract/ensregistry.go:158:62: too many errors
Eknir commented 4 years ago

Hi @ryanc414 , Thanks for taking the time to make this issue.

Swarm is not anymore actively maintaining this project.

For your project, we recommend switching over to bee (documentation here), which provides similar functionality to Swarm, but is build up anew from the grounds up, on more modern foundations, with more rigor during development and with the advancing insight which comes naturally while developing software like Swarm.

If you experience any difficulties with the porting of your code, we are more than happy to assist you.

You can reach out to me on Telegram (@eknir) or in the BeeHive (same user name), if you need assistance.

Best,

ryanc414 commented 4 years ago

Thanks for the response! We actually only depend on the ens contract bindings at https://github.com/ethersphere/swarm/contracts/ens/contract, I couldn't find these in the bee repo you linked but it looks like we can use https://github.com/wealdtech/go-ens instead.