From 4685c2b4e233ad5127f87ae3dc8f83b27611dbcf Mon Sep 17 00:00:00 2001 From: Arseniy Klempner Date: Mon, 10 Aug 2026 20:03:39 -0600 Subject: [PATCH] register: quiet helper stdout; commit the shared-faucet testnet descriptor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deployments/shared-faucet is the post-2026-08-05-reset testnet deployment, copied from logos-lez-rln — the testnet target's first committed profile. docs/journeys/register.md: the narrated pass from the first local run (devnet-up 15s / provision 350s; two consecutive fresh-devnet passes). --- deployments/shared-faucet/deployment.json | 11 + deployments/shared-faucet/storage.json | 1582 +++++++++++++++++++++ docs/journeys/register.md | 79 + scenarios/register/run.sh | 4 +- 4 files changed, 1674 insertions(+), 2 deletions(-) create mode 100644 deployments/shared-faucet/deployment.json create mode 100644 deployments/shared-faucet/storage.json create mode 100644 docs/journeys/register.md diff --git a/deployments/shared-faucet/deployment.json b/deployments/shared-faucet/deployment.json new file mode 100644 index 0000000..3373afe --- /dev/null +++ b/deployments/shared-faucet/deployment.json @@ -0,0 +1,11 @@ +{ + "name": "shared-faucet", + "tree_id": "15f5520c1648358440b73a7b11f4a8cf8e44b63b7a0ae326609863e3e2f1b6ee", + "sequencer": "https://testnet.lez.logos.co/", + "registration_program_id": "65343a570616eec04387832a193b258ee48d445f1feb4d842db4f320feec3e7b", + "merkle_program_id": "ec8c814c6b2d0854c75a86a5e1c63f0df00598f23b27b3fc8f14e3eeeba0161d", + "config_account": "8Subd1uJZAQRxTnh3Y2KQEaoexpyFQHp28yWCzZcZB14", + "payment_account": "EMG8ax4F9nRyKPbAu87xctu25Ku6JAkk5fsKLTCkY6K7", + "supply_holding": "DJwWhGqfkFdxnu54umQXUiFzPPr6ADRC5n3Xm3CbECok", + "funding": "faucet" +} diff --git a/deployments/shared-faucet/storage.json b/deployments/shared-faucet/storage.json new file mode 100644 index 0000000..5c07ac7 --- /dev/null +++ b/deployments/shared-faucet/storage.json @@ -0,0 +1,1582 @@ +{ + "key_chain": { + "accounts": [ + { + "Public": { + "account_id": "C9YvbHUWspdWx6fjMATnoAxm9pjj92hWkchW5Ytdymjg", + "chain_index": [], + "data": { + "sk": "e24cedb35c43daf3d7e5ec586f8e59642310fcf4a1910c369955ce6c5d6852ea", + "ssk": "a6eec4ae7eb1972b4c289f5ccd077d3d7315588e42dcc0f16167880ff8f4394a", + "pk": "09cab528beaa7fc15478d2da19ce8679dcd52ccba4725cb3950abfeb5e21d30e", + "cc": [ + 239, + 25, + 184, + 208, + 227, + 0, + 123, + 160, + 16, + 72, + 156, + 28, + 128, + 54, + 177, + 162, + 176, + 100, + 224, + 138, + 87, + 92, + 93, + 159, + 70, + 178, + 7, + 79, + 115, + 155, + 50, + 173 + ], + "cci": null + } + } + }, + { + "Public": { + "account_id": "EMG8ax4F9nRyKPbAu87xctu25Ku6JAkk5fsKLTCkY6K7", + "chain_index": [ + 1 + ], + "data": { + "sk": "8d4725a9478f2b7ea232f812ffb40667893deba9a51c5204b9ef1d5a0a62b566", + "ssk": "81ed6f2a4cb412f00f67d9d03c2dd956d2d22549aa18b718b982da8fbc7259d7", + "pk": "6ff437435c3f63731ef8005deaa5e627386a630af175003d2cefa0aec5b7769b", + "cc": [ + 222, + 93, + 122, + 46, + 26, + 157, + 89, + 187, + 92, + 234, + 187, + 202, + 96, + 37, + 119, + 111, + 81, + 3, + 179, + 66, + 200, + 81, + 140, + 58, + 184, + 137, + 117, + 20, + 232, + 173, + 92, + 68 + ], + "cci": 1 + } + } + }, + { + "Public": { + "account_id": "HbM6fYTQwwatzhC5Put9bAUM2bLLwA5YvRWqSNaNZnA7", + "chain_index": [ + 0 + ], + "data": { + "sk": "ca70fe5f109792250592e85149aa70e5f967d8af205ba2033c4e90e36dfe0cfb", + "ssk": "e8d4898a638f9c7a1d582cb8b340198b8f96bf71948775a2fa9a5935b3117910", + "pk": "ed46885a279f9ee3be96b482653d440e6f17f584679de60e3dc590a6e27ee93f", + "cc": [ + 130, + 245, + 117, + 30, + 162, + 39, + 108, + 73, + 9, + 171, + 29, + 112, + 112, + 4, + 46, + 154, + 54, + 237, + 165, + 36, + 128, + 196, + 113, + 108, + 28, + 196, + 159, + 167, + 55, + 117, + 171, + 120 + ], + "cci": 0 + } + } + }, + { + "Private": { + "account_id": "BQycf8N343jXWuxgHvktVcy3byrUPPiviM1vZxYen7Qp", + "chain_index": [], + "data": { + "value": [ + { + "secret_spending_key": [ + 48, + 119, + 160, + 7, + 94, + 231, + 119, + 203, + 254, + 106, + 196, + 186, + 134, + 90, + 150, + 83, + 252, + 167, + 117, + 107, + 32, + 223, + 206, + 92, + 26, + 33, + 102, + 167, + 155, + 70, + 133, + 120 + ], + "private_key_holder": { + "nullifier_secret_key": [ + 188, + 92, + 62, + 156, + 71, + 250, + 143, + 141, + 228, + 195, + 178, + 254, + 233, + 234, + 88, + 38, + 33, + 65, + 182, + 150, + 80, + 92, + 198, + 157, + 77, + 18, + 235, + 67, + 151, + 233, + 5, + 219 + ], + "viewing_secret_key": { + "d": [ + 195, + 28, + 235, + 74, + 50, + 213, + 20, + 131, + 202, + 147, + 163, + 58, + 160, + 154, + 47, + 188, + 84, + 182, + 94, + 144, + 64, + 3, + 8, + 74, + 140, + 89, + 150, + 154, + 231, + 104, + 89, + 43 + ], + "z": [ + 175, + 106, + 7, + 119, + 56, + 219, + 208, + 104, + 94, + 37, + 70, + 61, + 156, + 145, + 70, + 6, + 194, + 20, + 81, + 222, + 2, + 238, + 14, + 79, + 58, + 98, + 48, + 46, + 141, + 82, + 64, + 79 + ] + } + }, + "nullifier_public_key": [ + 34, + 46, + 179, + 254, + 241, + 122, + 204, + 107, + 157, + 87, + 62, + 20, + 165, + 246, + 121, + 232, + 171, + 16, + 66, + 25, + 155, + 50, + 78, + 114, + 210, + 247, + 88, + 62, + 108, + 63, + 11, + 11 + ], + "viewing_public_key": [ + 10, + 84, + 163, + 82, + 50, + 24, + 85, + 178, + 164, + 59, + 245, + 19, + 166, + 87, + 181, + 170, + 197, + 95, + 189, + 76, + 145, + 196, + 149, + 81, + 160, + 116, + 27, + 22, + 183, + 70, + 244, + 241, + 149, + 242, + 182, + 0, + 17, + 73, + 167, + 144, + 102, + 158, + 57, + 84, + 171, + 179, + 104, + 52, + 28, + 216, + 24, + 108, + 183, + 156, + 237, + 137, + 83, + 6, + 185, + 154, + 192, + 170, + 156, + 105, + 215, + 98, + 83, + 242, + 44, + 43, + 153, + 203, + 70, + 147, + 56, + 27, + 246, + 22, + 224, + 204, + 22, + 110, + 188, + 5, + 123, + 18, + 162, + 155, + 133, + 157, + 165, + 112, + 46, + 79, + 252, + 136, + 177, + 64, + 13, + 215, + 101, + 37, + 33, + 12, + 100, + 11, + 27, + 72, + 146, + 71, + 3, + 35, + 160, + 117, + 153, + 148, + 106, + 30, + 185, + 65, + 11, + 144, + 176, + 15, + 114, + 15, + 234, + 20, + 12, + 77, + 234, + 140, + 80, + 37, + 60, + 57, + 43, + 152, + 160, + 208, + 163, + 99, + 21, + 62, + 79, + 26, + 14, + 78, + 40, + 14, + 79, + 227, + 47, + 144, + 59, + 195, + 33, + 167, + 158, + 75, + 163, + 110, + 223, + 208, + 11, + 96, + 198, + 177, + 196, + 229, + 10, + 57, + 25, + 123, + 51, + 117, + 171, + 81, + 41, + 126, + 45, + 56, + 55, + 228, + 182, + 80, + 211, + 201, + 20, + 88, + 137, + 170, + 97, + 216, + 78, + 137, + 187, + 38, + 112, + 55, + 41, + 147, + 25, + 150, + 135, + 129, + 131, + 254, + 241, + 137, + 23, + 196, + 54, + 153, + 184, + 88, + 247, + 27, + 205, + 242, + 76, + 186, + 218, + 28, + 153, + 232, + 50, + 100, + 114, + 217, + 94, + 213, + 214, + 91, + 149, + 37, + 55, + 191, + 5, + 133, + 43, + 83, + 149, + 116, + 24, + 2, + 211, + 56, + 99, + 134, + 197, + 82, + 126, + 176, + 50, + 222, + 32, + 25, + 252, + 171, + 183, + 233, + 100, + 196, + 58, + 34, + 193, + 255, + 236, + 116, + 170, + 137, + 164, + 127, + 234, + 0, + 252, + 75, + 95, + 11, + 64, + 194, + 186, + 23, + 181, + 126, + 54, + 97, + 143, + 130, + 103, + 93, + 185, + 162, + 194, + 146, + 27, + 144, + 22, + 61, + 88, + 115, + 60, + 77, + 36, + 150, + 31, + 167, + 100, + 103, + 72, + 200, + 8, + 120, + 36, + 4, + 105, + 72, + 29, + 102, + 192, + 246, + 209, + 136, + 105, + 12, + 107, + 109, + 204, + 28, + 64, + 145, + 85, + 9, + 124, + 161, + 201, + 200, + 173, + 204, + 115, + 205, + 65, + 76, + 20, + 122, + 39, + 174, + 246, + 217, + 60, + 5, + 60, + 171, + 249, + 160, + 180, + 51, + 113, + 82, + 39, + 96, + 111, + 108, + 23, + 186, + 239, + 209, + 58, + 204, + 154, + 110, + 12, + 245, + 182, + 207, + 155, + 46, + 41, + 247, + 91, + 181, + 8, + 140, + 23, + 33, + 110, + 205, + 236, + 97, + 130, + 162, + 74, + 243, + 40, + 145, + 254, + 161, + 4, + 193, + 172, + 202, + 186, + 185, + 180, + 1, + 154, + 65, + 10, + 67, + 6, + 28, + 185, + 14, + 72, + 69, + 141, + 249, + 181, + 194, + 244, + 225, + 125, + 86, + 234, + 201, + 58, + 113, + 64, + 249, + 166, + 8, + 162, + 177, + 40, + 205, + 196, + 196, + 164, + 101, + 75, + 48, + 100, + 21, + 105, + 106, + 54, + 139, + 16, + 141, + 50, + 199, + 114, + 112, + 162, + 48, + 70, + 148, + 157, + 65, + 3, + 74, + 186, + 186, + 155, + 70, + 139, + 205, + 107, + 19, + 153, + 68, + 156, + 154, + 70, + 34, + 18, + 136, + 102, + 83, + 137, + 91, + 71, + 8, + 92, + 49, + 41, + 198, + 180, + 1, + 210, + 57, + 29, + 160, + 41, + 136, + 21, + 165, + 98, + 149, + 159, + 224, + 248, + 25, + 164, + 52, + 75, + 139, + 151, + 199, + 74, + 120, + 156, + 39, + 182, + 119, + 81, + 75, + 135, + 87, + 150, + 73, + 90, + 101, + 67, + 51, + 104, + 51, + 57, + 140, + 135, + 186, + 199, + 206, + 161, + 156, + 49, + 12, + 54, + 167, + 86, + 200, + 57, + 11, + 21, + 113, + 15, + 128, + 109, + 15, + 180, + 158, + 51, + 137, + 146, + 173, + 215, + 203, + 100, + 17, + 86, + 210, + 90, + 171, + 107, + 67, + 20, + 49, + 34, + 181, + 53, + 100, + 169, + 109, + 120, + 201, + 216, + 176, + 173, + 185, + 24, + 124, + 176, + 123, + 126, + 1, + 50, + 172, + 18, + 245, + 189, + 220, + 0, + 92, + 250, + 16, + 176, + 151, + 27, + 113, + 11, + 195, + 201, + 151, + 192, + 7, + 3, + 232, + 120, + 198, + 69, + 91, + 81, + 83, + 28, + 165, + 33, + 14, + 37, + 230, + 200, + 243, + 198, + 173, + 8, + 22, + 44, + 121, + 216, + 205, + 15, + 252, + 19, + 177, + 43, + 103, + 181, + 210, + 176, + 163, + 104, + 131, + 175, + 9, + 105, + 134, + 164, + 36, + 146, + 0, + 166, + 60, + 42, + 65, + 111, + 50, + 70, + 235, + 203, + 126, + 220, + 5, + 88, + 103, + 100, + 78, + 132, + 20, + 99, + 191, + 75, + 92, + 82, + 212, + 148, + 221, + 83, + 94, + 169, + 115, + 48, + 23, + 131, + 72, + 239, + 118, + 67, + 101, + 23, + 10, + 87, + 28, + 200, + 53, + 75, + 198, + 5, + 120, + 15, + 100, + 73, + 3, + 216, + 37, + 81, + 111, + 32, + 143, + 111, + 88, + 128, + 111, + 26, + 105, + 109, + 36, + 120, + 129, + 137, + 29, + 144, + 33, + 129, + 202, + 33, + 194, + 211, + 146, + 168, + 59, + 132, + 174, + 207, + 160, + 86, + 128, + 92, + 94, + 186, + 9, + 77, + 175, + 148, + 86, + 41, + 215, + 130, + 15, + 84, + 105, + 102, + 100, + 13, + 242, + 22, + 128, + 39, + 169, + 178, + 202, + 105, + 166, + 82, + 225, + 7, + 16, + 4, + 109, + 9, + 88, + 138, + 87, + 135, + 51, + 59, + 129, + 112, + 134, + 138, + 38, + 218, + 150, + 52, + 42, + 25, + 131, + 143, + 121, + 42, + 197, + 249, + 89, + 199, + 106, + 92, + 240, + 6, + 179, + 83, + 201, + 105, + 152, + 23, + 71, + 206, + 108, + 173, + 131, + 228, + 90, + 171, + 214, + 90, + 53, + 105, + 164, + 5, + 144, + 124, + 240, + 163, + 83, + 10, + 82, + 50, + 150, + 163, + 153, + 242, + 198, + 45, + 114, + 231, + 54, + 147, + 248, + 73, + 140, + 131, + 104, + 200, + 100, + 85, + 58, + 145, + 97, + 255, + 247, + 99, + 206, + 246, + 173, + 42, + 248, + 176, + 83, + 116, + 206, + 77, + 123, + 80, + 53, + 36, + 85, + 158, + 228, + 131, + 103, + 209, + 2, + 156, + 242, + 62, + 19, + 232, + 5, + 126, + 27, + 85, + 238, + 28, + 131, + 33, + 132, + 51, + 179, + 118, + 104, + 131, + 183, + 28, + 223, + 199, + 159, + 172, + 151, + 23, + 214, + 245, + 42, + 32, + 233, + 69, + 5, + 148, + 206, + 132, + 226, + 179, + 241, + 121, + 179, + 19, + 130, + 177, + 36, + 156, + 144, + 1, + 161, + 167, + 167, + 137, + 21, + 56, + 193, + 14, + 162, + 87, + 184, + 26, + 235, + 174, + 145, + 100, + 83, + 26, + 140, + 19, + 42, + 25, + 101, + 230, + 88, + 151, + 16, + 192, + 60, + 170, + 85, + 119, + 128, + 1, + 75, + 144, + 231, + 152, + 95, + 1, + 159, + 239, + 213, + 32, + 41, + 25, + 16, + 99, + 37, + 59, + 74, + 153, + 157, + 42, + 7, + 12, + 82, + 114, + 59, + 184, + 8, + 130, + 19, + 209, + 54, + 38, + 89, + 45, + 223, + 52, + 17, + 212, + 55, + 197, + 107, + 202, + 153, + 178, + 211, + 41, + 130, + 5, + 151, + 44, + 1, + 104, + 228, + 163, + 86, + 242, + 214, + 106, + 156, + 87, + 7, + 178, + 86, + 140, + 235, + 26, + 197, + 125, + 208, + 51, + 7, + 113, + 90, + 155, + 231, + 163, + 132, + 163, + 125, + 108, + 60, + 62, + 227, + 195, + 87, + 130, + 71, + 182, + 40, + 211, + 204, + 192, + 209, + 189, + 249, + 227, + 54, + 46, + 215, + 107, + 35, + 104, + 100, + 116, + 172, + 52, + 144, + 50, + 53, + 89, + 17, + 182, + 1, + 53, + 77, + 47, + 18, + 167, + 223, + 59, + 8, + 255, + 102, + 29, + 61, + 25, + 144, + 234, + 101, + 137, + 37, + 34, + 126, + 150, + 195, + 84, + 88, + 166, + 97, + 167, + 38, + 205, + 196, + 55, + 197, + 43, + 134, + 177, + 248, + 246, + 87, + 217, + 195, + 207, + 7, + 114, + 158, + 15, + 75, + 103, + 110, + 171, + 11, + 100, + 242, + 133, + 49, + 19, + 125, + 20, + 219, + 64, + 228, + 225, + 183, + 128, + 228, + 102, + 182, + 193, + 9, + 136, + 213, + 108, + 214, + 73, + 95, + 39, + 231, + 71, + 47, + 187, + 197, + 96, + 138, + 73, + 171, + 26, + 49, + 54, + 206, + 170, + 37, + 142, + 118, + 208, + 36, + 204, + 227, + 161, + 170, + 220, + 184, + 254, + 237, + 111, + 245, + 20, + 179, + 37, + 216, + 24, + 191, + 22, + 164, + 159, + 71, + 52, + 147, + 142, + 81 + ] + }, + [ + [ + { + "Regular": 0 + }, + { + "program_owner": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "balance": 0, + "data": [], + "nonce": 0 + } + ] + ] + ], + "ccc": [ + 117, + 196, + 134, + 244, + 171, + 112, + 152, + 111, + 27, + 128, + 211, + 253, + 36, + 1, + 11, + 111, + 32, + 118, + 8, + 4, + 142, + 207, + 59, + 100, + 241, + 18, + 211, + 133, + 68, + 117, + 99, + 100 + ], + "cci": null + } + } + } + ], + "sealing_secret_key": null, + "group_key_holders": {}, + "shared_private_accounts": {} + }, + "last_synced_block": 0, + "labels": {} +} \ No newline at end of file diff --git a/docs/journeys/register.md b/docs/journeys/register.md new file mode 100644 index 0000000..f603347 --- /dev/null +++ b/docs/journeys/register.md @@ -0,0 +1,79 @@ +# register — what a pass looks like + +`./run.sh register --target local` on a darwin-arm64 laptop, nothing else +running, 2026-08-10. One command: boots a local sequencer, provisions a fresh +RLN tree, and drives a paid membership through the full module stack. + +## The run, narrated + +**Artifacts** (seconds, all from the flake pins): + +``` +== artifacts == +e2e: pins consistent: lez-rln ff02e202cedb (rln-layouts + flake.lock) +e2e: bundles: logos-logos_execution_zone-module-lib.lgx, logos-liblogos_lez_rln_module-module-lib.lgx, logos-liblogos_rln_module-module-lib.lgx +``` + +The pin gate matters: if the rln-modules tree pinned `rln-layouts` at a +different lez-rln rev than the one deployed, chain-state decode skew would +present as phantom chain bugs. It fails loudly instead. + +**Target** — a fresh chain and a fresh tree, every run: + +``` +e2e: timing: devnet-up 15s # dev.sh, sequencer build cached +e2e: timing: provision 350s # run_setup: programs + config + faucet PDA +e2e: timing: stage 0s +e2e: deployment: sequencer http://127.0.0.1:3040/, funding faucet +``` + +Provisioning dominates a cold run (~6 min); `E2E_DEVNET=external` plus +`E2E_DEPLOYMENT_DIR` skips both for the inner loop. + +**The scenario** — registration is paid from a faucet claim (no gifter, no +pre-funded pool), and the price comes from the live bounds, not a constant: + +``` +== wallet == +e2e: holding: 3d6d39a789a9866173c49a6b7b084cc487397a5402f8c5d7fd92b122f66026a6 +e2e: claiming 2000000 RLNTOK from the faucet (rate 100 x price 10000 x2) + +== registration == +e2e: keystore unlocked +e2e: register(logos:local:98cee59d…, rate 100) via membership module +e2e: pending membership: 7a8217ad… (commitment 317ce6db326b77f0…) +e2e: state poll 3: active +e2e: ACTIVE at leaf 0 +e2e: get_merkle_proof returned a rooted proof +e2e: cross-check: rln module sees the membership (active) + +== rate-limit proofs == +e2e: proof issued (message_id 0, epoch 29773555) +e2e: epoch quota: remaining 99/100 in epoch 29773555 +e2e: verify_proof: valid +e2e: tampered signal correctly invalid + +e2e: PASS — registered on logos:local:98cee59d028f02cf72606efcf1008aa5c032df6930114b5284a59b926cf0b5a9 +``` + +The registry id is `logos:${E2E_TARGET}:` — the target is +a flag; the same file, unchanged, runs `--target testnet` with the testnet +poll budgets from the contract. + +## What it proves + +- The three-module stack (`logos_execution_zone` → + `liblogos_lez_rln_module` → `liblogos_rln_module`) loads and speaks the + lidl wire in a logoscore daemon. +- The paid Register path end-to-end on chain: claim → register → active + leaf → merkle proof, cross-checked between the two RLN modules. +- Proof crypto against live chain state: generate → quota decrement → + verify valid → tampered-signal invalid. +- R2 (lp calls into a Rust module) and R4 (host-stamped persistence path) + hold — their failure modes have dedicated diagnostics in the scenario. + +## Knobs + +`E2E_KEEP=1` leaves the devnet + daemon up for inspection. `E2E_RATE_LIMIT` +changes the registered rate (claim scales with it). `E2E_DEVNET=external` +attaches to your own sequencer. Budgets: `docs/contract.md`. diff --git a/scenarios/register/run.sh b/scenarios/register/run.sh index e1f21b5..dfdc736 100755 --- a/scenarios/register/run.sh +++ b/scenarios/register/run.sh @@ -106,7 +106,7 @@ section "wallet" wallet_open "$NODE" || die "wallet open failed" CHAIN_HEAD=$(chain_head) || die "cannot probe chain head at $E2E_SEQUENCER" say "syncing wallet to chain head $CHAIN_HEAD" -wallet_sync "$NODE" "$CHAIN_HEAD" +wallet_sync "$NODE" >/dev/null || die "wallet sync failed" # ---------- faucet funding (Register-instruction path, no gifter) ----------- say "deriving a fresh holding account" @@ -126,7 +126,7 @@ say "claiming $CLAIM RLNTOK from the faucet (rate $RATE_LIMIT x price $PRICE x2) CLAIM_RES=$(node_call "$NODE" liblogos_lez_rln_module claim_tokens \ "$(argfile cfg2 "$E2E_CONFIG_ACCOUNT")" "$(argfile hold "$HOLDING")" "$CLAIM" | jres) || CLAIM_RES="" [ -n "$CLAIM_RES" ] || die "claim_tokens failed" -wait_balance "$NODE" "$HOLDING" "$CLAIM" || die "faucet credit never landed (want $CLAIM)" +wait_balance "$NODE" "$HOLDING" "$CLAIM" >/dev/null || die "faucet credit never landed (want $CLAIM)" # ---------- scope (the identity is generated INSIDE the module) -------------- # The consumer supplies only the scope (registry_id + rln_identifier) and the