Suzuka DA Migrations Format #470
Replies: 3 comments 17 replies
-
I think the scalar height key by which these states become normative is more maintainable. We will not have gaps in coverage, so the next entry's height implicitly defines the last height for which the preceding entry applies.
Should all of these fields be enforced? I'd like to avoid overengineering here.
Makes sense.
For these, we would need something like semver minimal version spec. Also introspection into the version information.
Where is this defined? |
Beta Was this translation helpful? Give feedback.
-
Something else that we should think about is the location of the migration table and requirements arising out of this.
|
Beta Was this translation helpful? Give feedback.
-
Drafting the data types and rules of their application on the basis of the discussion. DA SettingsThe format of a well-known file defining migrations should be JSON serialization of a map where keys indicate the block height at which the configuration in the value starts applying. The values are objects. The top-level configuration envelope specifies the current version of the format to permit breaking changes in the future. {
"version": 1,
"migrations": {
"123456": {
"namespace": "deadbeef01234567890",
"transaction_format": 1,
"block_format": 2,
"ordering_rule": 3,
"node_version": "1.2"
}
}
} the Rust definition of the value struct can look like this: #[derive(Serialize, Deserialize)]
pub struct DASettings {
namespace: Namespace,
transaction_format: TransactionFormatVersion,
block_format: BlockFormatVersion,
ordering_rule: OrderingRuleVersion,
node_version: NodeVersionReq,
} Principles of introducing migrationsEach new entry in the migration table SHALL use a unique Celestia namespace identifier to prevent confusion and detect accidental misconfiguration early. The configuration in all nodes in the network should be updated well in advance of the block height at which a new change is introduced. The expected process in governance stage 0 is a coordinated upgrade. The Applying the migrationsThe producers and consumers of DA blobs must implement all versions encountered in the configuration file and apply the settings accordingly to the block height. There is not to be mixing of different DA formats between blobs submitted by correct nodes for the same block height. Evolving the migration formatJSON objects are self-describing and allow adding new fields in a backward-compatible way, should we need them later. For the on-chain parameter to be introduced with later governance stages, we can consider retaining the JSON format, or if a binary encoding is required, use an extensible encoding such as Protobuf. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
In order to allow for safe upgrades, data model changes, and DA migrations, it has been proposed that we provide a data format which describes the canonical state of the DA over time. This would be hardfork migration approach to upgrades. In a simple flexible form, this would be a list of tuples of (a) block height range tuples indexing (b) the following fields:
Beta Was this translation helpful? Give feedback.
All reactions