-
Notifications
You must be signed in to change notification settings - Fork 4
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
Why dBFT requires NeoGO package #2
Comments
These are all modules, it makes no sense to shuffle them around. Just use modules from the origin repository that developed them.
I don't think this potential move would change anything. |
That adds a possibility to ignore NeoGO mono repo as a dependency. The dBFT used two types from NeoGO and only for that it requires it. That sounds strange. |
My point is in moving or rewrites that types into dBFT and remove unnecessary dependencies. |
And that gives us like... what, really? It's not a linux repository, it's like 18M repository.
Not so much, it reuses module that it needs to and that's it.
My point is that moving code between repositories completely destroys changes history and I just hate that. And rewriting is like... please, don't. There is a module that implements exactly what you need, hoooray! just use it. |
Nope. It adds a lot of unnecessary dependencies from NeoGO module.
For two types I should import 18MB? It sounds ugly. |
It was assumed that part of the NeoGO package (pkg) will be allocated to separate repositories. Now we are turning NeoGO into a mono repo. What then was the point of putting dBFT as a separate repository, if it still requires NeoGO? |
Like
That's git repository size, I don't think anyone cares about that. But you only really add one tiny module to the executable and that's it. |
After discussion with @im-kulikov we've settled upon abstracting away this types with interfaces if there is a need to really separate this two repositories. But looking at how these types are used (throughout the whole repository) it probably won't be that easy. |
Yep. An interface would be a great decision. |
@im-kulikov to be able to use it from both |
Well, we can probably hide But |
It's just syntactic sugar and I don't see any problems to use the binary package as is. |
As we discuss with @roman-khimov, there is ok to use |
models: adjust MoreThanFNodesCommitted check
I don't think we'll ever untie these. |
I have cleaned modcache and after this I have:
Makes me appreciate what Go team has done regarding versioning, though. |
This can be useful for Bane, btw. As suggested in #87 the only real problem is |
Implement custom payloads serialization using gob package. A part of #2. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Implement custom payloads serialization using gob package. A part of #2. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Implement custom payloads serialization using gob package. A part of #2. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use generics instead of util.Uint160 and util.Uint256 types for DBFT and related components. Keep util.Uint160 and util.Uint256 only for specific DBFT implementation in testing code. The following regressions/behaviour changes were made to properly apply generics: 1. `dbft.Option` alias is removed since type parameters can't be defined on aliases (generic type aliases are prohibited). Ref. golang/go#46477. 2. Default dBFT configuration is reduced: all payload-specific defaults are removed, as described in #91. It is done because default dBFT configuration should not depend on any implementation-specific hash type. 3. DBFT configuration validation check is extended wrt point 2. 4. The check if generic `dbft.DBFT` type implements generic `dbft.Service` interface is removed since such check should be performed on particular (non-generic) DBFT implementation. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use custom Hash/Address implementation, get rid of util.Uint256/util.Uint160 NeoGo dependency. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2, not needed anymore. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use generics instead of util.Uint160 and util.Uint256 types for DBFT and related components. Keep util.Uint160 and util.Uint256 only for specific DBFT implementation in testing code. The following regressions/behaviour changes were made to properly apply generics: 1. `dbft.Option` alias is removed since type parameters can't be defined on aliases (generic type aliases are prohibited). Ref. golang/go#46477. 2. Default dBFT configuration is reduced: all payload-specific defaults are removed, as described in #91. It is done because default dBFT configuration should not depend on any implementation-specific hash type. 3. DBFT configuration validation check is extended wrt point 2. 4. The check if generic `dbft.DBFT` type implements generic `dbft.Service` interface is removed since such check should be performed on particular (non-generic) DBFT implementation. 5. `dbft.Service` interface is removed since it's unused. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use custom Hash/Address implementation, get rid of util.Uint256/util.Uint160 NeoGo dependency. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2, not needed anymore. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use generics instead of util.Uint160 and util.Uint256 types for DBFT and related components. Keep util.Uint160 and util.Uint256 only for specific DBFT implementation in testing code. The following regressions/behaviour changes were made to properly apply generics: 1. `dbft.Option` alias is removed since type parameters can't be defined on aliases (generic type aliases are prohibited). Ref. golang/go#46477. 2. Default dBFT configuration is reduced: all payload-specific defaults are removed, as described in #91. It is done because default dBFT configuration should not depend on any implementation-specific hash type. 3. DBFT configuration validation check is extended wrt point 2. 4. The check if generic `dbft.DBFT` type implements generic `dbft.Service` interface is removed since such check should be performed on particular (non-generic) DBFT implementation. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use custom Hash/Address implementation, get rid of util.Uint256/util.Uint160 NeoGo dependency. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2, not needed anymore. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use generics instead of util.Uint160 and util.Uint256 types for DBFT and related components. Keep util.Uint160 and util.Uint256 only for specific DBFT implementation in testing code. The following regressions/behaviour changes were made to properly apply generics: 1. `dbft.Option` alias is removed since type parameters can't be defined on aliases (generic type aliases are prohibited). Ref. golang/go#46477. 2. Default dBFT configuration is reduced: all payload-specific defaults are removed, as described in #91. It is done because default dBFT configuration should not depend on any implementation-specific hash type. 3. DBFT configuration validation check is extended wrt point 2. 4. The check if generic `dbft.DBFT` type implements generic `dbft.Service` interface is removed since such check should be performed on particular (non-generic) DBFT implementation. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2. Use custom Hash/Address implementation, get rid of util.Uint256/util.Uint160 NeoGo dependency. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #2, not needed anymore. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
It's strange to understand that the dBFT package requires NeoGo, which requires dBFT.
I propose to move dependencies into the dBFT package.
That adds the possibility to use the package separately in other projects without NeoGo requirements.
cc @fyrchik @realloc @anatoly-bogatyrev @roman-khimov
The text was updated successfully, but these errors were encountered: