From cad51e1fe171cdf666f7cc4770e12c912abe2e01 Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Wed, 13 Dec 2023 15:42:02 +0100 Subject: [PATCH] Make test vectors consistent with TIP-49 example --- tips/TIP-0046/tip-0046.md | 41 +++++++++++++++------------------------ 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/tips/TIP-0046/tip-0046.md b/tips/TIP-0046/tip-0046.md index 7a4445911..a47f0810c 100644 --- a/tips/TIP-0046/tip-0046.md +++ b/tips/TIP-0046/tip-0046.md @@ -688,17 +688,8 @@ transaction, the transaction will never result in the locking of the account. # Test Vectors -The containing protocol parameter are used to calculate IDs: - -```json -{ - "genesisUnixTimestamp": "1695275822", - "slotDurationInSeconds": 10, - "slotsPerEpochExponent": 13 -} -``` - -Protocol parameters hash: `0xf6021fae654975db2e82c17444dc8d43573cb4222f506fb46ba46a097cf8c873` +The protocol parameters used in the following test vectors are the same as in +[TIP-49](../TIP-0049/tip-0049.md#protocol-parameters-hash). ## Slot Commitment ID @@ -736,7 +727,7 @@ Block (json-encoded): "header": { "protocolVersion": 3, "networkId": "8342982141227064571", - "issuingTime": "1702296928622173761", + "issuingTime": "1695275852000000000", "slotCommitmentId": "0x3a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2a", "latestFinalizedSlot": 500, "issuerId": "0x17432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a" @@ -763,7 +754,7 @@ Block (json-encoded): "signature": { "type": 0, "publicKey": "0x2daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257ac", - "signature": "0xc5a08bedb7c3b828bb700e74256b23ff423150ad62774aa9a373ea219d63438fd736992f73de9afc2c7724e72297c0f7ae6a1e031979fc994b895431b62aa70e" + "signature": "0xc2982c2476379db0c8d39a204801163fc05dc1c7aa7df537e6041f91491943ab1de29a2dfe6076588c53b8d2ccf5eabe49f2cb64198303682859fd0c58348b0d" } } ``` @@ -771,13 +762,13 @@ Block (json-encoded): Block (hex-encoded binary serialization): ``` -0x03fb5c44ef0d3ac873415ec39409c69f173a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2af401000017432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a000627e0461873f37040c9e59c35ad8a106fa1b94f5ec9ef89499b31904f9a3de59be58dd44a714821f8f257e0a502b71ac7ee57530bb9dc29fe12ff3936f925b835a297680400b769489951e512546cd9c9fbdab348b6cba91a601a29b50854e55a6e14f6803ca1d81ac7eff5ceaaa7bacf26f1aa4754d42edeab45d6169ea723b7fdf0f6ff3b6ebe90d09dbff6bc553936ba75a143de4ac932986fbe7b1d78f639bc6ee8aee10d510d41572851530be884778052aaea5315941f4337752905599710b55e64018c71f4d8f299d0636d50484d05e6ac5667b50300001800000000037461670f0000006c754128356c071e5549764a48427b6003000000000000002daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257acc5a08bedb7c3b828bb700e74256b23ff423150ad62774aa9a373ea219d63438fd736992f73de9afc2c7724e72297c0f7ae6a1e031979fc994b895431b62aa70e +0x03fb5c44ef0d3ac87300f8c1ca67d486173a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2af401000017432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a000627e0461873f37040c9e59c35ad8a106fa1b94f5ec9ef89499b31904f9a3de59be58dd44a714821f8f257e0a502b71ac7ee57530bb9dc29fe12ff3936f925b835a297680400b769489951e512546cd9c9fbdab348b6cba91a601a29b50854e55a6e14f6803ca1d81ac7eff5ceaaa7bacf26f1aa4754d42edeab45d6169ea723b7fdf0f6ff3b6ebe90d09dbff6bc553936ba75a143de4ac932986fbe7b1d78f639bc6ee8aee10d510d41572851530be884778052aaea5315941f4337752905599710b55e64018c71f4d8f299d0636d50484d05e6ac5667b50300001800000000037461670f0000006c754128356c071e5549764a48427b6003000000000000002daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257acc2982c2476379db0c8d39a204801163fc05dc1c7aa7df537e6041f91491943ab1de29a2dfe6076588c53b8d2ccf5eabe49f2cb64198303682859fd0c58348b0d ``` Block ID: ``` -0xf52472e4df8e3526326592f9aeacb15689d9421d6f0ab261cf000b19e085d10a01000000 +0x1d5f495c0f4b883cf2c79cafd382c73484c65651099329e3b0b4c969c35d620004000000 ``` ## Basic Block ID (Transaction payload) @@ -789,7 +780,7 @@ Block (json-encoded): "header": { "protocolVersion": 3, "networkId": "8342982141227064571", - "issuingTime": "1702296814123999060", + "issuingTime": "1695275852000000000", "slotCommitmentId": "0x3a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2a", "latestFinalizedSlot": 500, "issuerId": "0x17432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a" @@ -916,7 +907,7 @@ Block (json-encoded): "signature": { "type": 0, "publicKey": "0x2daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257ac", - "signature": "0x3c4187eee8bf6b324b119132b58d164f01da0b91a115d93540ee71c59fb29dec946b2d83db5820ef08d63b3fc80d63667b6fd319f215d7e637833644b05d310a" + "signature": "0x95830802c10334d917b9b9c82a5144754b4e7955667acd3ce8e502877ff716c5e45bfddf4aa6b83c0432538e317c732edbba8f047919418bbb50a54fbe45810b" } } ``` @@ -924,13 +915,13 @@ Block (json-encoded): Block (hex-encoded binary serialization): ``` -0x03fb5c44ef0d3ac87354df23eceec59f173a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2af401000017432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a000627e0461873f37040c9e59c35ad8a106fa1b94f5ec9ef89499b31904f9a3de59be58dd44a714821f8f257e0a502b71ac7ee57530bb9dc29fe12ff3936f925b835a297680400b769489951e512546cd9c9fbdab348b6cba91a601a29b50854e55a6e14f6803ca1d81ac7eff5ceaaa7bacf26f1aa4754d42edeab45d6169ea723b7fdf0f6ff3b6ebe90d09dbff6bc553936ba75a143de4ac932986fbe7b1d78f639bc6ee8aee10d510d41572851530be884778052aaea5315941f4337752905599710b55e64018c71f4d8f299d0636d50484d05e6ac5667b50300004e02000001fb5c44ef0d3ac873000010000300013a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2a0217432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a030000020000f09d3cd648a7246c7c1b2ba2f9182465ae5742b78c592392b4b455ab8ed7195200000000000000d2c5ccba12b6fad51652131289867492799c9fc5710244418aa6e955f8fa826100000000000002007e0d0a5848362b23120f55115b096774036d7610137a631413221f5573344507ed08000000000000476820096e7038107d071a4e473f1e295f346e2d0824263e5e3e7d004f6b69158d08000000000000010100000000020000a0860100000000000000000000000000010000ed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a0105086372557616532f714f104e5f44297b7a286d077956291a6d4f59081f484463712a64300c00f46312374981be1400000000000000000000000000000000000000000000000001a0860100000000008813000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000ed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a0103010568656c6c6f0500776f726c6400020000002daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257ac328034c1701ae304fcf69b542ceeacf7aa2e94df6e2191b0e1e345c62c49d4afa5f4f58ccc8fa3d400e8c01a19719cf26820337d5c35d5cb5fcafe6d97eab4020100006003000000000000002daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257ac3c4187eee8bf6b324b119132b58d164f01da0b91a115d93540ee71c59fb29dec946b2d83db5820ef08d63b3fc80d63667b6fd319f215d7e637833644b05d310a +0x03fb5c44ef0d3ac87300f8c1ca67d486173a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2af401000017432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a000627e0461873f37040c9e59c35ad8a106fa1b94f5ec9ef89499b31904f9a3de59be58dd44a714821f8f257e0a502b71ac7ee57530bb9dc29fe12ff3936f925b835a297680400b769489951e512546cd9c9fbdab348b6cba91a601a29b50854e55a6e14f6803ca1d81ac7eff5ceaaa7bacf26f1aa4754d42edeab45d6169ea723b7fdf0f6ff3b6ebe90d09dbff6bc553936ba75a143de4ac932986fbe7b1d78f639bc6ee8aee10d510d41572851530be884778052aaea5315941f4337752905599710b55e64018c71f4d8f299d0636d50484d05e6ac5667b50300004e02000001fb5c44ef0d3ac873000010000300013a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2a0217432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a030000020000f09d3cd648a7246c7c1b2ba2f9182465ae5742b78c592392b4b455ab8ed7195200000000000000d2c5ccba12b6fad51652131289867492799c9fc5710244418aa6e955f8fa826100000000000002007e0d0a5848362b23120f55115b096774036d7610137a631413221f5573344507ed08000000000000476820096e7038107d071a4e473f1e295f346e2d0824263e5e3e7d004f6b69158d08000000000000010100000000020000a0860100000000000000000000000000010000ed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a0105086372557616532f714f104e5f44297b7a286d077956291a6d4f59081f484463712a64300c00f46312374981be1400000000000000000000000000000000000000000000000001a0860100000000008813000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000ed1484f4d1f7d8c037087fed661dd92faccae1eed3c01182d6fdd6828cea144a0103010568656c6c6f0500776f726c6400020000002daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257ac328034c1701ae304fcf69b542ceeacf7aa2e94df6e2191b0e1e345c62c49d4afa5f4f58ccc8fa3d400e8c01a19719cf26820337d5c35d5cb5fcafe6d97eab4020100006003000000000000002daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257ac95830802c10334d917b9b9c82a5144754b4e7955667acd3ce8e502877ff716c5e45bfddf4aa6b83c0432538e317c732edbba8f047919418bbb50a54fbe45810b ``` Block ID: ``` -0x87759b3c31d5f20f6988cc23560d5ed487abe326a697ed5dd801fa27123836b901000000 +0xedcd454ff664cb13cdebc46fb41f86b072e97f4f545e0989892736e38cf3c3b904000000 ``` ## Validation Block ID @@ -942,7 +933,7 @@ Block (json-encoded): "header": { "protocolVersion": 3, "networkId": "8342982141227064571", - "issuingTime": "1702296902730775289", + "issuingTime": "1695275852000000000", "slotCommitmentId": "0x3a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2a", "latestFinalizedSlot": 500, "issuerId": "0x17432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a" @@ -960,12 +951,12 @@ Block (json-encoded): "weakParents": [], "shallowLikeParents": [], "highestSupportedVersion": 3, - "protocolParametersHash": "0x19ad3c9790609d755a14bc5b11e21e7255e991f7afc750c18f573b972c0e10a6" + "protocolParametersHash": "0xf07f73636669d9cb4be9faf017b3bfa16101d22ce2989010ca8409f2ea1665b2" }, "signature": { "type": 0, - "publicKey": "0xeeb2c7adb0ff4872396f256219f9698d44c182b73369d9b69a0171a463334228", - "signature": "0x68f7ea9a65587bc45fa5fd9275c9e328003fc69fe82626f072cdb1d67e354c951856bbd7d3c5e7233e88282c6909b4653b121246d7921e26eb59257fa0ed5a00" + "publicKey": "0x2daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257ac", + "signature": "0xcf8e6fcd642e20ae68cf6a38d664d84b0e3594ac417c8efe0b08793716f33d59b4be5390524ba19a8b45601b871f4609ba7bca4327c9a74e34e58f8350d10808" } } ``` @@ -973,13 +964,13 @@ Block (json-encoded): Block (hex-encoded binary serialization): ``` -0x03fb5c44ef0d3ac873f9fa838d03c69f173a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2af401000017432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a010627e0461873f37040c9e59c35ad8a106fa1b94f5ec9ef89499b31904f9a3de59be58dd44a714821f8f257e0a502b71ac7ee57530bb9dc29fe12ff3936f925b835a297680400b769489951e512546cd9c9fbdab348b6cba91a601a29b50854e55a6e14f6803ca1d81ac7eff5ceaaa7bacf26f1aa4754d42edeab45d6169ea723b7fdf0f6ff3b6ebe90d09dbff6bc553936ba75a143de4ac932986fbe7b1d78f639bc6ee8aee10d510d41572851530be884778052aaea5315941f4337752905599710b55e64018c71f4d8f299d0636d50484d05e6ac5667b50300000319ad3c9790609d755a14bc5b11e21e7255e991f7afc750c18f573b972c0e10a600eeb2c7adb0ff4872396f256219f9698d44c182b73369d9b69a0171a46333422868f7ea9a65587bc45fa5fd9275c9e328003fc69fe82626f072cdb1d67e354c951856bbd7d3c5e7233e88282c6909b4653b121246d7921e26eb59257fa0ed5a00 +0x03fb5c44ef0d3ac87300f8c1ca67d486173a1e3b617060146e0362361a4b752833186108395f3b2b3d3e6c655e287d70767ea58d2af401000017432c5a7a672503480241125e3952414a7a320441080c624c264b004e09614a010627e0461873f37040c9e59c35ad8a106fa1b94f5ec9ef89499b31904f9a3de59be58dd44a714821f8f257e0a502b71ac7ee57530bb9dc29fe12ff3936f925b835a297680400b769489951e512546cd9c9fbdab348b6cba91a601a29b50854e55a6e14f6803ca1d81ac7eff5ceaaa7bacf26f1aa4754d42edeab45d6169ea723b7fdf0f6ff3b6ebe90d09dbff6bc553936ba75a143de4ac932986fbe7b1d78f639bc6ee8aee10d510d41572851530be884778052aaea5315941f4337752905599710b55e64018c71f4d8f299d0636d50484d05e6ac5667b503000003f07f73636669d9cb4be9faf017b3bfa16101d22ce2989010ca8409f2ea1665b2002daefbcbadd044da470acd2f7fcf6fcb04b873cc801e7ee408018e1dfa0257accf8e6fcd642e20ae68cf6a38d664d84b0e3594ac417c8efe0b08793716f33d59b4be5390524ba19a8b45601b871f4609ba7bca4327c9a74e34e58f8350d10808 ``` Block ID: ``` -0x60be578c68cb16712c7bbd1c7722568aa05af1e77f4a6d545775293ed02a020c01000000 +0x53db1037f8885e4e3d77270ab15c6323e0e1317d90d9ce4adc5728b7eccfd73604000000 ``` # Copyright