Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Update genesis asset schema interoperability #8304

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9c9ddf1
Add mainchain related checks & test cases
sitetester Mar 6, 2023
86a22fe
Add LIP reference to functions
sitetester Mar 6, 2023
5819dd1
Remove this file, since relevant tests are already added in module.sp…
sitetester Mar 6, 2023
487c83a
Add LIP reference to schema
sitetester Mar 7, 2023
4735f20
Remove unused signature param
sitetester Mar 7, 2023
6beeccc
Update error message & relevant test
sitetester Mar 7, 2023
7bbbcd8
Remove un-relevant case
sitetester Mar 7, 2023
961630f
Update genesis asset schema for interoperability (without _verifyTerm…
sitetester Mar 7, 2023
5a324a5
Remove `describe('On the mainchain',`, since this file is only applic…
sitetester Mar 7, 2023
706c510
Update genesis asset schema for interoperability (with terminatedStat…
sitetester Mar 7, 2023
8d8773e
Uncomment required schema props
sitetester Mar 7, 2023
6260722
Update schema at example path
sitetester Mar 7, 2023
eeb7faf
Update genesis block. This is needed to fix `IPC Socket client connec…
sitetester Mar 7, 2023
de74cc7
Update genesis asset schema for interoperability (with terminatedStat…
sitetester Mar 7, 2023
8cbffd1
Uncomment required schema props
sitetester Mar 7, 2023
d7ebfc4
Merge branch '8151-update-with-terminatedStateAccounts-and-terminated…
sitetester Mar 7, 2023
04a4e68
Move decode & validate related part to concrete class
sitetester Mar 8, 2023
cee4604
Update genesis asset schema for interoperability (with terminatedStat…
sitetester Mar 8, 2023
db4c4d3
Uncomment required schema props
sitetester Mar 7, 2023
f3cb0b7
merge
sitetester Mar 8, 2023
85c4626
Sidechain verification
sitetester Mar 10, 2023
6dbf6f3
Move common tests to parent test file
sitetester Mar 11, 2023
3b873d5
Updated genesis_assets.json and captions
Phanco Mar 16, 2023
85c26f5
Updated genesis_assets and modules.ts according to PR comments
Phanco Mar 20, 2023
7c46588
Merge branch '8151-update-without-terminatedStateAccounts-and-termina…
Phanco Mar 20, 2023
0122cb2
Added new check cases and test cases in module.ts
Phanco Mar 20, 2023
1cf6ef9
Merge branch '8151-update-with-terminatedStateAccounts-and-terminated…
Phanco Mar 21, 2023
2509bf7
Replace length with minLength and maxLength
Phanco Mar 21, 2023
958e791
Merge branch '8151-update-genesis-asset-schema-interoperability' of g…
Phanco Mar 22, 2023
e9eb5c3
Update genesis asset schema interoperability WITHOUT terminatedStateA…
ishantiw Mar 24, 2023
de6dd4e
Updated module and test cases
Phanco Mar 22, 2023
fc839c9
Replace length with minLength and maxLength
Phanco Mar 21, 2023
093370c
Required schemas not exported (#8227)
Incede Mar 7, 2023
dbef808
♻️ Move unique entry and lexicographically sorted checks before chai…
ishantiw Mar 23, 2023
3a7aecc
✅ Add missing unit tests related to terminatedStateAccounts
ishantiw Mar 23, 2023
f4a0db2
🔥 Remove redundant test
ishantiw Mar 24, 2023
159cb6e
✅ Update test
ishantiw Mar 24, 2023
a3e1628
Merge branch '8151-update-genesis-asset-schema-interoperability' into…
ishantiw Mar 24, 2023
986cc68
Update genesis asset schema interoperability WITH terminatedStateAcco…
ishantiw Mar 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 64 additions & 179 deletions examples/pos-mainchain/config/default/genesis_assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,54 @@
{
"module": "interoperability",
"data": {
"outboxRootSubstore": [],
"chainDataSubstore": [],
"channelDataSubstore": [],
"chainValidatorsSubstore": [],
"ownChainDataSubstore": [
{
"storeKey": "",
"storeValue": {
"name": "lisk_mainchain",
"chainID": "04000000",
"nonce": 0
}
}
],
"terminatedStateSubstore": [],
"terminatedOutboxSubstore": [],
"registeredNamesSubstore": [
{
"storeKey": "lisk_mainchain",
"storeValue": {
"chainID": "04000000"
}
}
]
"ownChainName": "lisk_mainchain",
"ownChainNonce": 0,
"chainInfos": [],
"terminatedStateAccounts": [],
"terminatedOutboxAccounts": []
},
"schema": {
"$id": "/interoperability/module/genesis",
"type": "object",
"required": [
"outboxRootSubstore",
"chainDataSubstore",
"channelDataSubstore",
"chainValidatorsSubstore",
"ownChainDataSubstore",
"terminatedStateSubstore",
"terminatedOutboxSubstore",
"registeredNamesSubstore"
"ownChainName",
"ownChainNonce",
"chainInfos",
"terminatedStateAccounts",
"terminatedOutboxAccounts"
],
"properties": {
"outboxRootSubstore": {
"type": "array",
"fieldNumber": 1,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"properties": {
"storeKey": {
"dataType": "bytes",
"fieldNumber": 1
},
"storeValue": {
"$id": "/modules/interoperability/outbox",
"type": "object",
"required": ["root"],
"properties": {
"root": {
"dataType": "bytes",
"minLength": 32,
"maxLength": 32,
"fieldNumber": 1
}
},
"fieldNumber": 2
}
}
}
"ownChainName": {
"dataType": "string",
"maxLength": 32,
"fieldNumber": 1
},
"ownChainNonce": {
"dataType": "uint64",
"fieldNumber": 2
},
"chainDataSubstore": {
"chainInfos": {
"type": "array",
"fieldNumber": 2,
"fieldNumber": 3,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"required": ["chainID", "chainData", "channelData", "chainValidators"],
"properties": {
"storeKey": {
"chainID": {
"dataType": "bytes",
"minLength": 4,
"maxLength": 4,
"fieldNumber": 1
},
"storeValue": {
"chainData": {
"$id": "/modules/interoperability/chainData",
"type": "object",
"required": ["name", "lastCertificate", "status"],
"properties": {
"name": {
"dataType": "string",
"minLength": 1,
"maxLength": 32,
"fieldNumber": 1
},
"lastCertificate": {
Expand Down Expand Up @@ -123,25 +86,17 @@
}
},
"fieldNumber": 2
}
}
}
},
"channelDataSubstore": {
"type": "array",
"fieldNumber": 3,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"properties": {
"storeKey": {
"dataType": "bytes",
"fieldNumber": 1
},
"storeValue": {
"channelData": {
"$id": "/modules/interoperability/channel",
"type": "object",
"required": ["inbox", "outbox", "partnerChainOutboxRoot", "messageFeeTokenID"],
"required": [
"inbox",
"outbox",
"partnerChainOutboxRoot",
"messageFeeTokenID",
"minReturnFeePerByte"
],
"properties": {
"inbox": {
"type": "object",
Expand All @@ -158,14 +113,14 @@
"fieldNumber": 1
},
"size": {
"dataType": "uint32",
"fieldNumber": 2
"fieldNumber": 2,
"dataType": "uint32"
},
"root": {
"fieldNumber": 3,
"dataType": "bytes",
"minLength": 32,
"maxLength": 32,
"fieldNumber": 3
"maxLength": 32
}
}
},
Expand All @@ -184,14 +139,14 @@
"fieldNumber": 1
},
"size": {
"dataType": "uint32",
"fieldNumber": 2
"fieldNumber": 2,
"dataType": "uint32"
},
"root": {
"fieldNumber": 3,
"dataType": "bytes",
"minLength": 32,
"maxLength": 32,
"fieldNumber": 3
"maxLength": 32
}
}
},
Expand All @@ -206,26 +161,15 @@
"minLength": 8,
"maxLength": 8,
"fieldNumber": 4
},
"minReturnFeePerByte": {
"dataType": "uint64",
"fieldNumber": 5
}
},
"fieldNumber": 2
}
}
}
},
"chainValidatorsSubstore": {
"type": "array",
"fieldNumber": 4,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"properties": {
"storeKey": {
"dataType": "bytes",
"fieldNumber": 1
"fieldNumber": 3
},
"storeValue": {
"fieldNumber": 2,
"chainValidators": {
"$id": "/modules/interoperability/chainValidators",
"type": "object",
"required": ["activeValidators", "certificateThreshold"],
Expand Down Expand Up @@ -256,59 +200,26 @@
"dataType": "uint64",
"fieldNumber": 2
}
}
}
}
}
},
"ownChainDataSubstore": {
"type": "array",
"fieldNumber": 5,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"properties": {
"storeKey": {
"dataType": "bytes",
"fieldNumber": 1
},
"storeValue": {
"$id": "/modules/interoperability/ownChainAccount",
"type": "object",
"required": ["name", "chainID", "nonce"],
"properties": {
"name": {
"dataType": "string",
"fieldNumber": 1
},
"chainID": {
"dataType": "bytes",
"minLength": 4,
"maxLength": 4,
"fieldNumber": 2
},
"nonce": {
"dataType": "uint64",
"fieldNumber": 3
}
},
"fieldNumber": 2
"fieldNumber": 4
}
}
}
},
"terminatedStateSubstore": {
"terminatedStateAccounts": {
"type": "array",
"fieldNumber": 6,
"fieldNumber": 4,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"required": ["chainID", "terminatedStateAccount"],
"properties": {
"storeKey": {
"chainID": {
"dataType": "bytes",
"minLength": 4,
"maxLength": 4,
"fieldNumber": 1
},
"storeValue": {
"terminatedStateAccount": {
"$id": "/modules/interoperability/terminatedState",
"type": "object",
"required": ["stateRoot", "mainchainStateRoot", "initialized"],
Expand All @@ -335,18 +246,20 @@
}
}
},
"terminatedOutboxSubstore": {
"terminatedOutboxAccounts": {
"type": "array",
"fieldNumber": 7,
"fieldNumber": 5,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"required": ["chainID", "terminatedOutboxAccount"],
"properties": {
"storeKey": {
"chainID": {
"dataType": "bytes",
"minLength": 4,
"maxLength": 4,
"fieldNumber": 1
},
"storeValue": {
"terminatedOutboxAccount": {
"$id": "/modules/interoperability/terminatedOutbox",
"type": "object",
"required": ["outboxRoot", "outboxSize", "partnerChainInboxSize"],
Expand All @@ -370,34 +283,6 @@
}
}
}
},
"registeredNamesSubstore": {
"type": "array",
"fieldNumber": 8,
"items": {
"type": "object",
"required": ["storeKey", "storeValue"],
"properties": {
"storeKey": {
"dataType": "bytes",
"fieldNumber": 1
},
"storeValue": {
"$id": "/modules/interoperability/chainId",
"type": "object",
"required": ["chainID"],
"properties": {
"chainID": {
"dataType": "bytes",
"minLength": 4,
"maxLength": 4,
"fieldNumber": 1
}
},
"fieldNumber": 2
}
}
}
}
}
}
Expand Down
Binary file modified examples/pos-mainchain/config/default/genesis_block.blob
Binary file not shown.
Loading