babylon-node icon indicating copy to clipboard operation
babylon-node copied to clipboard

Better separate protocol state vs current protocol version

Open jakrawcz-rdx opened this issue 1 year ago • 3 comments

Summary

When working on "staged instantiation" (needed for https://radixdlt.atlassian.net/browse/NODE-648) I noticed a refactoring opportunity: the "current protocol version" wasn't really updated by TransactionTracker, and it was a bit confusing that it is a part of ProtocolState. Now it is a separate piece of ProtocolManager's state, clearly updated only as the last step of a protocol update execution process.

Details

Please see one TODO that I added after noticing a theoretical deficiency of the today's TransactionSeriesExecutor. I really believe we should address it soon, if we don't want to be surprised.

Testing

No behavior changes, only regression tests need to pass.

jakrawcz-rdx avatar May 17 '24 18:05 jakrawcz-rdx

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarqubecloud[bot] avatar May 17 '24 18:05 sonarqubecloud[bot]

Docker tags docker.io/radixdlt/private-babylon-node:pr-959 docker.io/radixdlt/private-babylon-node:5801e19bfa docker.io/radixdlt/private-babylon-node:sha-5801e19

github-actions[bot] avatar May 17 '24 18:05 github-actions[bot]

(the failing check is sonar complaining about ImmutableMap.of(), ImmutableList.of() which cannot be replaced though 🤷 )

jakrawcz-rdx avatar May 17 '24 19:05 jakrawcz-rdx