aergo icon indicating copy to clipboard operation
aergo copied to clipboard

update dependency on libp2p from 0.4.0 to 0.32.1

Open hayarobi opened this issue 1 year ago • 5 comments

=== commit message

  • Fixed code that was not backward compatible due to the interface change.
  • Fixed failed unit tests.
  • Regenerate mock classes with newer gomock version.
  • Improved documents of code generations of mock classes.

hayarobi avatar Nov 28 '23 07:11 hayarobi

The branch from #328 can be merged together with this one into a new branch to run the sync test

So both can be tested at the same time

kroggen avatar Nov 28 '23 23:11 kroggen

The branch from #328 can be merged together with this one into a new branch to run the sync test

So both can be tested at the same time

I will rebase my commits on #328 and add some more fixes. The default security policy of libp2p looks stronger, so it prevent connection to node of old versions of libp2p.

hayarobi avatar Nov 30 '23 09:11 hayarobi

There found critical backward incompatibility in libp2p-v0.32.1. I will try to apply intermediate version for smooth upgrade. This PR will be closed, and I will make new PR.

hayarobi avatar Dec 05 '23 02:12 hayarobi

So this means that the update will be made via 2 releases?

kroggen avatar Dec 05 '23 03:12 kroggen

Maybe, or not. Current version of libp2p requires security layer such as TLS, but the version of libp2p in Aergo doesn't provide it.

I reviewed the libp2p source and decided that there was no way to make the security layer optional. So, at first, the idea was to release an intermediate version that optionally supported the security layer, wait for all nodes accessing the public chain to be replaced with that release, and then release a new version with a current libp2p that requires only security layer.

But, I found some intercepter interfaces of libp2p after that. Today, I plan to investigate that intercepters a little more to see if there is a way to control security settings. If this is possible, it would likely be possible with one release.

hayarobi avatar Dec 06 '23 01:12 hayarobi