sui icon indicating copy to clipboard operation
sui copied to clipboard

SuiNode/Authority state are now aware of what protocol versions they support.

Open mystenmark opened this issue 2 years ago • 2 comments

Also, some basic testing infrastructure, and a simple panic test for when the validator encounters an unsupported protocol.

mystenmark avatar Feb 17 '23 06:02 mystenmark

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
explorer ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 17, 2023 at 11:16PM (UTC)
explorer-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 17, 2023 at 11:16PM (UTC)
frenemies ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 17, 2023 at 11:16PM (UTC)
wallet-adapter ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 17, 2023 at 11:16PM (UTC)

vercel[bot] avatar Feb 17 '23 06:02 vercel[bot]

The way supported protocol versions are configured was a little confusing to follow for me, i.e. that the version for the actual node was configurable at runtime, but the version in tests is a constant that gets tweaked by a feature flag. I would have expected it to be the other way around (the supported protocol version for the node binary was fairly fixed, and the test one was configurable at runtime) was there a reason that this wasn't possible?

I agree its a bit odd. Here's my reasoning:

  • In order to test upgrades, we not only need to configure the versions supported by the node, we also need for another version to actually exist. So, if don't tweak the MAX version with a compile flag, we would actually have to ship a dummy version in the released binary.
  • I want to be able to test heterogenous protocol support (not all validators support the same version), so that requires that the versions supported by a node are configured at runtime, not compile time.
  • Of course, we'll never configure the version support dynamically in a released binary, hence the code in sui-node/src/main.rs

mystenmark avatar Feb 17 '23 15:02 mystenmark