Rationale
The java-tron code has been refactored once and is currently divided into multiple modules:
actuator: transaction module
chainbase: DB module
common: common base module
consensus: consensus module
crypto: encryption module
framework: architectural organization
protocol: definition of core protocol data structure and API
plugins: toolset
Each module has its own dependencies, but currently there are situations where multiple modules reference the same dependency at the same time, which means the same dependency is declared multiple times in multiple build.gradle files.
For example:
Most of all the modules contain this dependency:compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69' . Some dependencies in different modules even don't adopt the same version which makes it more chaotic.
There are some drawbacks to this situation:
- Bringing additional maintenance costs to development
- It is impossible to clearly identify which version of dependency the final
Fullnode.jar references
- Additional work is added to system maintenance. For example, during daily security inspections, there may be false positive reports of vulnerabilities.
Therefore, this issue aims to solve the problem of dependency confusion and manage dependencies in a unified manner.
Implementation
Rationale
The java-tron code has been refactored once and is currently divided into multiple modules:
actuator: transaction modulechainbase: DB modulecommon: common base moduleconsensus: consensus modulecrypto: encryption moduleframework: architectural organizationprotocol: definition of core protocol data structure and APIplugins: toolsetEach module has its own dependencies, but currently there are situations where multiple modules reference the same dependency at the same time, which means the same dependency is declared multiple times in multiple
build.gradlefiles.For example:
Most of all the modules contain this dependency:
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'. Some dependencies in different modules even don't adopt the same version which makes it more chaotic.There are some drawbacks to this situation:
Fullnode.jarreferencesTherefore, this issue aims to solve the problem of dependency confusion and manage dependencies in a unified manner.
Implementation