diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e786ec..04814e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,3 +151,10 @@ jobs: # vectors before printing anything, so a broken primitive exits non-zero. - name: secp256k1 probe self-test run: python3 -I tools/secp256k1_probe.py + + # The claim fixture is the cross-language vector the contract's digest tests run + # against. Before #76 it was a hand-pasted blob nobody could re-derive, so when the + # encoding changed there was no way to tell the fixture had gone stale. Now the + # script is the derivation and this step fails if the committed file disagrees. + - name: The claim fixture is what the generator produces + run: python3 tools/make_claim_fixture.py --check diff --git a/docs/interface.md b/docs/interface.md index 911da43..ccfe461 100644 --- a/docs/interface.md +++ b/docs/interface.md @@ -60,6 +60,36 @@ proof must match. **Until the template is set, `request_advance` refuses with `TemplateNotSet` (10).** The contract deploys in a safe state rather than one that accepts anything. +### The template holds eight parts and takes seven values (#76) + +``` +pub_id, start_year, start_month, start_day, end_year, end_month, end_day +``` + +Seven, not three, because **AdSense has no string form for a date.** `startDate` and `endDate` on +`accounts.reports.generate` are `object (Date)` — `{year, month, day}` as *integers* — which the +REST transport flattens into `startDate.year=2026&startDate.month=7&startDate.day=1`. Unpadded: +`7`, never `07`. Verified against Google's own reference, not inferred. + +So the rebuilt URL is the one `be/src/adsense/request.ts` actually sends: + +``` +https://adsense.googleapis.com/v2/accounts//reports:generate + ?dateRange=CUSTOM + &startDate.year=&startDate.month=&startDate.day= + &endDate.year=&endDate.month=&endDate.day= + &metrics=ESTIMATED_EARNINGS¤cyCode=USD&reportingTimeZone=ACCOUNT_TIME_ZONE +``` + +**The interface does not change.** `request_advance` still takes `window_start` and `window_end` as +`YYYY-MM-DD`, and the nullifier is still computed over those strings. `claim::split_date` converts +them on the way into the template — ten bytes of fixed-width parsing, every byte checked, no JSON. +A window that is not exactly `dddd-dd-dd` is refused with `ClaimMismatch` rather than guessed at. + +A four-part template is now refused by `set_claim_template` itself. It described +`?startDate=2026-07-01`, a request the AdSense API cannot serve, so every real proof built against +it was refused with a bare `ClaimMismatch` and no clue why. + ## 3. The claim's context, rebuilt rather than parsed Canonical context is sorted-key JSON with no whitespace. A JSON parser in `no_std` wasm would be @@ -67,12 +97,30 @@ large, slow, and its bugs indistinguishable from a bad proof, so the contract ** string from the values it was handed and compares byte for byte: ``` -{"contextAddress":"","contextMessage":"","extractedParameters":{"currency":"USD","endDate":"","revenueUsd":"
","startDate":""},"providerHash":""} +{"contextAddress":"","contextMessage":"","extractedParameters":{"revenueUsd":"
"},"providerHash":""} ``` Key order above is alphabetical because that is what canonicalisation produces — it is not a stylistic choice and must not be "tidied". +### `extractedParameters` holds the figure and nothing else (#76) + +It used to carry `currency`, `startDate` and `endDate` as well. Those cannot be there. A Reclaim +`responseMatches` regex captures **one contiguous substring**, and AdSense echoes the window back as +`"startDate":{"year":2026,"month":7,"day":1}` — there is no `"2026-07-01"` anywhere in the response +to capture. A context asking for one describes a proof the provider cannot produce. + +Neither field left the signature; both moved to where the provider actually puts them, and both are +in `parameters`, which this contract pins: + +| Was asserted by | Now asserted by | +| --- | --- | +| `extractedParameters.currency` | the `"currencyCode": "USD"` response match | +| `extractedParameters.startDate` / `.endDate` | the URL — Google computes the totals **for the window in the URL** | + +So the window and the currency are held exactly as strongly as before. What changed is which signed +field holds them. + `canonical_context_matches` in `sc/reclaim-claim` does this comparison. Any difference at all — ordering, whitespace, a trailing byte — is a refusal. @@ -204,9 +252,8 @@ request_advance( borrower: Address, // must equal contextAddress inside the signed claim revenue_usd: String, // decimal string from extractedParameters pub_id: String, // AdSense publisher id - window_start: String, // YYYY-MM-DD, must match the template + window_start: String, // YYYY-MM-DD; split into year/month/day for the URL (§2) window_end: String, - context_message: String, timestamp_s: u64, epoch: u64, signature: BytesN<64>, @@ -217,7 +264,8 @@ request_advance( Order is the security property, and it does not change: 1. template is set, else `TemplateNotSet` -2. rebuild `context` and `parameters`; rebuild `identifier`; build the digest +2. split each window date into unpadded year/month/day, else `ClaimMismatch`; rebuild `context` and + `parameters`; rebuild `identifier`; build the digest 3. freshness 4. **cross-contract `verify_proof`** — everything after this point is attested 5. nullifier not spent → **write the nullifier** @@ -234,3 +282,21 @@ transfer in between is the classic race. (#5) and are set by `set_claim_template` — no code change, one admin call. Everything else here is frozen. @Lin1er @AncungAulia — build against it. + +### What this freeze got wrong, and how (#76) + +The freeze happened before any real AdSense response existed — deliberately, because waiting would +have cost all of M2 to a problem about a Google account. The gamble was that the *shape* of a +claim could be pinned ahead of seeing one. It mostly held; in two places it did not: + +- `?startDate=2026-07-01` is not a request AdSense can serve. +- `extractedParameters` asked for fields a single-capture regex cannot extract. + +Every real proof would have been refused, with `ClaimMismatch` and no indication of which byte was +wrong — the hardest failure in this pipeline to read. Found by @Lin1er on #6 while building the +provider, by comparing this document against the API rather than against the contract, which is the +only way it could have been found before the first proof arrived. + +The lesson worth keeping is narrow: **the part of a freeze that describes someone else's API is a +guess until it is checked against that API.** Checking it did not need a live account — the +reference page was enough, and nobody read it. diff --git a/sc/advance/src/claim.rs b/sc/advance/src/claim.rs index 714ecfb..58c459a 100644 --- a/sc/advance/src/claim.rs +++ b/sc/advance/src/claim.rs @@ -69,31 +69,88 @@ pub fn rebuild_parameters(parts: &Vec, values: &[Bytes]) -> Option Some(out) } +/// Split `"YYYY-MM-DD"` into the three unpadded ASCII numbers AdSense takes (#76). +/// +/// The AdSense Management API has **no string form for a date**. `startDate` and `endDate` +/// on `accounts.reports.generate` are `object (Date)` — `{year, month, day}` as *integers* +/// — which the REST transport flattens into `startDate.year=2026&startDate.month=7& +/// startDate.day=1`. Integers, so `7`, never `07`. +/// +/// So the contract takes the window in the one form a human and a nullifier can both read, +/// `YYYY-MM-DD`, and produces the six values the signed URL actually carries. The interface +/// and the nullifier are unchanged; only what gets interleaved into the template changes. +/// +/// Fixed-width parsing of exactly ten bytes. No JSON, no allocation beyond the three +/// outputs, and every byte is checked: a caller cannot smuggle a `&` or a digit-shaped +/// surprise into the URL this helps rebuild. +/// +/// Returns `None` for anything that is not exactly `dddd-dd-dd`. +pub fn split_date(env: &Env, date: &Bytes) -> Option<(Bytes, Bytes, Bytes)> { + if date.len() != 10 { + return None; + } + let mut b = [0u8; 10]; + date.copy_into_slice(&mut b); + if b[4] != b'-' || b[7] != b'-' { + return None; + } + for (i, c) in b.iter().enumerate() { + if i != 4 && i != 7 && !c.is_ascii_digit() { + return None; + } + } + Some(( + unpadded(env, &b[0..4]), + unpadded(env, &b[5..7]), + unpadded(env, &b[8..10]), + )) +} + +/// ASCII digits with leading zeros removed, as an integer is serialised. `"07"` → `"7"`, +/// `"00"` → `"0"`. Never empty, so the rebuilt URL always has a value where one belongs. +fn unpadded(env: &Env, digits: &[u8]) -> Bytes { + let mut i = 0; + while i + 1 < digits.len() && digits[i] == b'0' { + i += 1; + } + Bytes::from_slice(env, &digits[i..]) +} + /// Rebuild the canonical context, byte for byte. /// /// Canonical context is sorted-key JSON with no whitespace, so the key order below is /// alphabetical because that is what canonicalisation produces — it is not style and must /// not be tidied. Building it rather than parsing it keeps a JSON parser out of the wasm, /// where its bugs would be indistinguishable from a bad proof. -#[allow(clippy::too_many_arguments)] +/// +/// # Why `extractedParameters` holds only the figure (#76) +/// +/// It used to carry `currency`, `startDate` and `endDate` too. Those cannot be there: a +/// Reclaim `responseMatches` regex captures one contiguous substring, and AdSense echoes +/// the window back as `"startDate":{"year":2026,"month":7,"day":1}` — there is no +/// `"2026-07-01"` anywhere in the response to capture. A context asking for one describes +/// a proof the provider cannot produce, which is why every real AdSense proof was refused. +/// +/// Neither field is lost, only moved to where it is actually signed: +/// +/// * **the currency** by the `"currencyCode": "USD"` match, which lives in `parameters`; +/// * **the window** by the URL, which lives in `parameters` too — Google computes the +/// totals *for the window in the URL*, so the URL alone fixes the period. +/// +/// `parameters` is pinned in this contract and rebuilt here, so both are as strongly held +/// as they were in the context. Nothing moved outside the signature. pub fn rebuild_context( env: &Env, borrower: &Bytes, revenue_usd: &Bytes, - window_start: &Bytes, - window_end: &Bytes, provider_hash: &Bytes, ) -> Bytes { let mut out = Bytes::from_slice(env, br#"{"contextAddress":""#); out.append(borrower); out.extend_from_slice(br#"","contextMessage":""#); out.extend_from_slice(CONTEXT_MESSAGE); - out.extend_from_slice(br#"","extractedParameters":{"currency":"USD","endDate":""#); - out.append(window_end); - out.extend_from_slice(br#"","revenueUsd":""#); + out.extend_from_slice(br#"","extractedParameters":{"revenueUsd":""#); out.append(revenue_usd); - out.extend_from_slice(br#"","startDate":""#); - out.append(window_start); out.extend_from_slice(br#""},"providerHash":""#); out.append(provider_hash); out.extend_from_slice(br#""}"#); diff --git a/sc/advance/src/lib.rs b/sc/advance/src/lib.rs index c67d381..e87386f 100644 --- a/sc/advance/src/lib.rs +++ b/sc/advance/src/lib.rs @@ -466,15 +466,23 @@ impl AdvanceContract { /// proof must match. /// /// `parts` are the literal segments of the request, interleaved at verification time - /// with the publisher id, window start and window end — so it must hold exactly four - /// entries for the three values this contract supplies. + /// with the **seven** values this contract supplies, in this order: + /// + /// ```text + /// pub_id, start_year, start_month, start_day, end_year, end_month, end_day + /// ``` + /// + /// So it must hold exactly eight entries. Seven rather than three because AdSense has + /// no string form for a date: `reports:generate` takes `startDate.year=2026& + /// startDate.month=7&startDate.day=1`, unpadded, and one `"2026-07-01"` cannot fill + /// three query parameters (#76). pub fn set_claim_template( env: Env, parts: Vec, provider_hash: Bytes, ) -> Result<(), Error> { let admin = Self::require_admin(&env)?; - if parts.len() != 4 { + if parts.len() != 8 { return Err(Error::ClaimMismatch); } let n = parts.len(); @@ -551,17 +559,17 @@ impl AdvanceContract { let start_b = claim::string_bytes(&env, &window_start).ok_or(Error::ClaimMismatch)?; let end_b = claim::string_bytes(&env, &window_end).ok_or(Error::ClaimMismatch)?; + // The window reaches the signed URL as six unpadded numbers, because that is the + // only form AdSense accepts (#76). `window_start` and `window_end` stay + // `YYYY-MM-DD` in the interface and in the nullifier — this is a re-encoding on + // the way into the template, not a change to what is being borrowed against. + let (sy, sm, sd) = claim::split_date(&env, &start_b).ok_or(Error::ClaimMismatch)?; + let (ey, em, ed) = claim::split_date(&env, &end_b).ok_or(Error::ClaimMismatch)?; + let parameters = - claim::rebuild_parameters(&parts, &[pub_id_b.clone(), start_b.clone(), end_b.clone()]) + claim::rebuild_parameters(&parts, &[pub_id_b.clone(), sy, sm, sd, ey, em, ed]) .ok_or(Error::ClaimMismatch)?; - let context = claim::rebuild_context( - &env, - &borrower_b, - &revenue_b, - &start_b, - &end_b, - &provider_hash, - ); + let context = claim::rebuild_context(&env, &borrower_b, &revenue_b, &provider_hash); let identifier = claim::identifier(&env, ¶meters, &context); let identifier_hex = claim::hex_prefixed(&identifier); diff --git a/sc/advance/src/test_claim.rs b/sc/advance/src/test_claim.rs index 33cf496..b0b3263 100644 --- a/sc/advance/src/test_claim.rs +++ b/sc/advance/src/test_claim.rs @@ -8,9 +8,15 @@ //! the contract builds the digest wrongly by one byte, recovery yields a different address //! and the test fails, which is the only property worth testing here. //! -//! The fixture is generated by `tools/secp256k1_probe.py`, the implementation proven in #3 -//! against a **real production-attestor signature** accepted on chain. So the chain of -//! trust is: real attestor → Python reference → this fixture → the contract. +//! The fixture is generated by `tools/make_claim_fixture.py`, which signs with +//! `tools/secp256k1_probe.py` — the implementation proven in #3 against a **real +//! production-attestor signature** accepted on chain. So the chain of trust is: real +//! attestor → Python reference → this fixture → the contract. +//! +//! Regenerate it with `python3 tools/make_claim_fixture.py` whenever the claim encoding +//! changes, and copy the new `signature64` and `signerAddress` into the constants below. +//! `--check` fails if the committed fixture no longer matches the script, so the two +//! cannot drift apart silently the way they did before #76. #![cfg(test)] @@ -31,19 +37,31 @@ pub(crate) const PROVIDER_HASH: &str = "0x569b93233185c054ed9fda68b5aef8fda180b6d291180450bf757b11bb52f7df"; pub(crate) const TIMESTAMP_S: u64 = 1_760_000_000; pub(crate) const EPOCH: u64 = 1; -const SIGNATURE_HEX: &str = "41a1b3f92c2cee207d8fde5fd489da05f1d7b18f72af79c33d4cf17697509d7271b51ba7a3d9dd551f2e5aeba4aa1c8716d9945ae74b200c92da34739e80986d"; +const SIGNATURE_HEX: &str = "0a1607562845069dcd91874ae32ffc55d2ce799078af623b8300c1765137ca0f577ba3ed8dc8895867e717734d9535536384718e77126229ed28327c54cf202f"; pub(crate) const RECOVERY_ID: u32 = 1; /// The address the fixture's signature recovers to. const SIGNER: [u8; 20] = [ - 0x15, 0x63, 0x91, 0x5e, 0x19, 0x4d, 0x8c, 0xfb, 0xa1, 0x94, 0x35, 0x70, 0x60, 0x3f, 0x76, 0x06, - 0xa3, 0x11, 0x55, 0x08, + 0x19, 0xe7, 0xe3, 0x76, 0xe7, 0xc2, 0x13, 0xb7, 0xe7, 0xe7, 0xe4, 0x6c, 0xc7, 0x0a, 0x5d, 0xd0, + 0x86, 0xda, 0xff, 0x2a, ]; -pub(crate) const TEMPLATE: [&[u8]; 4] = [ +/// The literal segments of the request, with seven values interleaved between them: +/// `pub_id`, then each date as unpadded year, month and day (#76). +/// +/// This is the query `be/src/adsense/request.ts` actually builds. AdSense's `startDate` +/// and `endDate` are `object (Date)` — `{year, month, day}` as integers — which the REST +/// transport flattens into three query parameters each. There is no string date form, so +/// one `"2026-07-01"` cannot fill them, which is why the earlier three-value template +/// described a request AdSense could never serve. +pub(crate) const TEMPLATE: [&[u8]; 8] = [ br#"{"method":"GET","url":"https://adsense.googleapis.com/v2/accounts/"#, - b"/reports:generate?startDate=", - b"&endDate=", - br#"&metrics=ESTIMATED_EARNINGS"}"#, + b"/reports:generate?dateRange=CUSTOM&startDate.year=", + b"&startDate.month=", + b"&startDate.day=", + b"&endDate.year=", + b"&endDate.month=", + b"&endDate.day=", + br#"&metrics=ESTIMATED_EARNINGS¤cyCode=USD&reportingTimeZone=ACCOUNT_TIME_ZONE"}"#, ]; // --- a stand-in for Reclaim's verifier that does the same cryptography --- @@ -267,6 +285,94 @@ fn a_proof_at_the_edge_of_the_window_still_verifies() { assert!(verify(&f, REVENUE, PUB_ID, &f.borrower).is_ok()); } +// --- #76: the encoding AdSense actually produces --- + +#[test] +fn a_date_becomes_three_unpadded_numbers() { + let env = Env::default(); + let b = |s: &str| Bytes::from_slice(&env, s.as_bytes()); + + let (y, m, d) = crate::claim::split_date(&env, &b("2026-07-01")).expect("a valid date"); + assert_eq!(y, b("2026")); + // "7", not "07". AdSense's startDate.month is an integer, and a padded month produces + // a URL Google never sent, so a different identifier and an unexplained refusal. + assert_eq!(m, b("7")); + assert_eq!(d, b("1")); + + let (y, m, d) = crate::claim::split_date(&env, &b("2026-12-30")).expect("a valid date"); + assert_eq!((y, m, d), (b("2026"), b("12"), b("30"))); +} + +#[test] +fn a_window_that_is_not_yyyy_mm_dd_is_refused_rather_than_guessed() { + let env = Env::default(); + let b = |s: &str| Bytes::from_slice(&env, s.as_bytes()); + for bad in [ + "", + "2026-7-1", // already unpadded: ten bytes is the contract + "20260701", // no separators + "2026/07/01", // wrong separators + "2026-07-01 ", // trailing space + "202x-07-01", // not a digit + "2026-07-0a", + "2026-07-011", + ] { + assert!( + crate::claim::split_date(&env, &b(bad)).is_none(), + "{bad} must be refused" + ); + } +} + +#[test] +fn the_context_carries_only_the_figure() { + // Pinned byte for byte, because this is the half of #76 that cannot be caught by a + // type: a context with currency, startDate and endDate in it still compiles, still + // hashes, and is simply never what an attestor signed. + let env = Env::default(); + let b = |s: &str| Bytes::from_slice(&env, s.as_bytes()); + let got = crate::claim::rebuild_context(&env, &b(BORROWER), &b(REVENUE), &b(PROVIDER_HASH)); + let want = b(concat!( + r#"{"contextAddress":"GA2CD6PMHMBTCFAQDO3R22BSZN5ZSVTAKVNOKXL2SONZBLGRAYIOWWH2","#, + r#""contextMessage":"Forepay advance request","#, + r#""extractedParameters":{"revenueUsd":"1234.56"},"#, + r#""providerHash":"0x569b93233185c054ed9fda68b5aef8fda180b6d291180450bf757b11bb52f7df"}"#, + )); + assert_eq!(got, want); +} + +#[test] +fn the_template_the_contract_used_to_accept_is_refused_now() { + // The four-part, three-value template is what is pinned on the dev contract today. It + // describes `?startDate=2026-07-01`, a request the AdSense API cannot serve, so every + // real proof built against it was refused. Refusing the template itself is better than + // accepting it and failing later with a bare ClaimMismatch per proof. + let env = Env::default(); + env.mock_all_auths(); + let id = env.register( + AdvanceContract, + ( + Address::generate(&env), + Address::generate(&env), + Address::generate(&env), + ), + ); + let client = AdvanceContractClient::new(&env, &id); + let mut parts = Vec::new(&env); + for p in [ + &br#"{"method":"GET","url":"https://adsense.googleapis.com/v2/accounts/"#[..], + b"/reports:generate?startDate=", + b"&endDate=", + br#"&metrics=ESTIMATED_EARNINGS"}"#, + ] { + parts.push_back(Bytes::from_slice(&env, p)); + } + assert_eq!( + client.try_set_claim_template(&parts, &Bytes::from_slice(&env, b"0x00")), + Err(Ok(Error::ClaimMismatch)) + ); +} + #[test] fn only_the_admin_can_pin_the_template() { let env = Env::default(); diff --git a/sc/advance/test_snapshots/test_advance/a_borrower_without_a_trustline_gets_a_named_error_not_a_panic.1.json b/sc/advance/test_snapshots/test_advance/a_borrower_without_a_trustline_gets_a_named_error_not_a_panic.1.json index af564e2..b43fbc0 100644 --- a/sc/advance/test_snapshots/test_advance/a_borrower_without_a_trustline_gets_a_named_error_not_a_panic.1.json +++ b/sc/advance/test_snapshots/test_advance/a_borrower_without_a_trustline_gets_a_named_error_not_a_panic.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -243,13 +255,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/a_figure_below_the_floor_is_refused_rather_than_paid_as_dust.1.json b/sc/advance/test_snapshots/test_advance/a_figure_below_the_floor_is_refused_rather_than_paid_as_dust.1.json index f8dc865..ec44fe7 100644 --- a/sc/advance/test_snapshots/test_advance/a_figure_below_the_floor_is_refused_rather_than_paid_as_dust.1.json +++ b/sc/advance/test_snapshots/test_advance/a_figure_below_the_floor_is_refused_rather_than_paid_as_dust.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -200,13 +212,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/a_full_cycle_leaves_nothing_outstanding.1.json b/sc/advance/test_snapshots/test_advance/a_full_cycle_leaves_nothing_outstanding.1.json index 5135654..c825ff2 100644 --- a/sc/advance/test_snapshots/test_advance/a_full_cycle_leaves_nothing_outstanding.1.json +++ b/sc/advance/test_snapshots/test_advance/a_full_cycle_leaves_nothing_outstanding.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -456,13 +468,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/a_verified_claim_moves_real_usdc_to_the_borrower.1.json b/sc/advance/test_snapshots/test_advance/a_verified_claim_moves_real_usdc_to_the_borrower.1.json index 4f57963..5dede8a 100644 --- a/sc/advance/test_snapshots/test_advance/a_verified_claim_moves_real_usdc_to_the_borrower.1.json +++ b/sc/advance/test_snapshots/test_advance/a_verified_claim_moves_real_usdc_to_the_borrower.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -363,13 +375,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/a_zero_or_negative_repayment_is_refused.1.json b/sc/advance/test_snapshots/test_advance/a_zero_or_negative_repayment_is_refused.1.json index 45d9a60..88e2d0f 100644 --- a/sc/advance/test_snapshots/test_advance/a_zero_or_negative_repayment_is_refused.1.json +++ b/sc/advance/test_snapshots/test_advance/a_zero_or_negative_repayment_is_refused.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -364,13 +376,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/an_underfunded_contract_refuses_before_spending_the_nullifier.1.json b/sc/advance/test_snapshots/test_advance/an_underfunded_contract_refuses_before_spending_the_nullifier.1.json index 5b727fd..6d4f5e7 100644 --- a/sc/advance/test_snapshots/test_advance/an_underfunded_contract_refuses_before_spending_the_nullifier.1.json +++ b/sc/advance/test_snapshots/test_advance/an_underfunded_contract_refuses_before_spending_the_nullifier.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -244,13 +256,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/one_decimal_place_means_tenths_not_hundredths.1.json b/sc/advance/test_snapshots/test_advance/one_decimal_place_means_tenths_not_hundredths.1.json index dea66a8..83a22b9 100644 --- a/sc/advance/test_snapshots/test_advance/one_decimal_place_means_tenths_not_hundredths.1.json +++ b/sc/advance/test_snapshots/test_advance/one_decimal_place_means_tenths_not_hundredths.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -203,13 +215,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/overpaying_is_refused.1.json b/sc/advance/test_snapshots/test_advance/overpaying_is_refused.1.json index 157f9be..1051099 100644 --- a/sc/advance/test_snapshots/test_advance/overpaying_is_refused.1.json +++ b/sc/advance/test_snapshots/test_advance/overpaying_is_refused.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -406,13 +418,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/repaying_something_that_was_never_advanced_is_refused.1.json b/sc/advance/test_snapshots/test_advance/repaying_something_that_was_never_advanced_is_refused.1.json index c4ce3d6..c9f1a04 100644 --- a/sc/advance/test_snapshots/test_advance/repaying_something_that_was_never_advanced_is_refused.1.json +++ b/sc/advance/test_snapshots/test_advance/repaying_something_that_was_never_advanced_is_refused.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -201,13 +213,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/revenue_must_be_a_plain_decimal_with_at_most_two_places.1.json b/sc/advance/test_snapshots/test_advance/revenue_must_be_a_plain_decimal_with_at_most_two_places.1.json index f3cf019..5f5e521 100644 --- a/sc/advance/test_snapshots/test_advance/revenue_must_be_a_plain_decimal_with_at_most_two_places.1.json +++ b/sc/advance/test_snapshots/test_advance/revenue_must_be_a_plain_decimal_with_at_most_two_places.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -207,13 +219,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/the_cap_binds.1.json b/sc/advance/test_snapshots/test_advance/the_cap_binds.1.json index f8dc865..ec44fe7 100644 --- a/sc/advance/test_snapshots/test_advance/the_cap_binds.1.json +++ b/sc/advance/test_snapshots/test_advance/the_cap_binds.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -200,13 +212,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/the_floor_the_getter_reports_is_the_floor_quote_enforces.1.json b/sc/advance/test_snapshots/test_advance/the_floor_the_getter_reports_is_the_floor_quote_enforces.1.json index 8606dc0..6821297 100644 --- a/sc/advance/test_snapshots/test_advance/the_floor_the_getter_reports_is_the_floor_quote_enforces.1.json +++ b/sc/advance/test_snapshots/test_advance/the_floor_the_getter_reports_is_the_floor_quote_enforces.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -202,13 +214,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/the_ledger_records_what_was_proven_not_what_was_claimed.1.json b/sc/advance/test_snapshots/test_advance/the_ledger_records_what_was_proven_not_what_was_claimed.1.json index 4f57963..5dede8a 100644 --- a/sc/advance/test_snapshots/test_advance/the_ledger_records_what_was_proven_not_what_was_claimed.1.json +++ b/sc/advance/test_snapshots/test_advance/the_ledger_records_what_was_proven_not_what_was_claimed.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -363,13 +375,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/the_quote_is_a_quarter_of_proven_revenue.1.json b/sc/advance/test_snapshots/test_advance/the_quote_is_a_quarter_of_proven_revenue.1.json index c4ce3d6..c9f1a04 100644 --- a/sc/advance/test_snapshots/test_advance/the_quote_is_a_quarter_of_proven_revenue.1.json +++ b/sc/advance/test_snapshots/test_advance/the_quote_is_a_quarter_of_proven_revenue.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -201,13 +213,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/the_same_proof_cannot_draw_twice.1.json b/sc/advance/test_snapshots/test_advance/the_same_proof_cannot_draw_twice.1.json index 7ef37e9..7ee585f 100644 --- a/sc/advance/test_snapshots/test_advance/the_same_proof_cannot_draw_twice.1.json +++ b/sc/advance/test_snapshots/test_advance/the_same_proof_cannot_draw_twice.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -363,13 +375,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_advance/the_sizing_getter_describes_the_arithmetic_quote_actually_uses.1.json b/sc/advance/test_snapshots/test_advance/the_sizing_getter_describes_the_arithmetic_quote_actually_uses.1.json index dea66a8..83a22b9 100644 --- a/sc/advance/test_snapshots/test_advance/the_sizing_getter_describes_the_arithmetic_quote_actually_uses.1.json +++ b/sc/advance/test_snapshots/test_advance/the_sizing_getter_describes_the_arithmetic_quote_actually_uses.1.json @@ -42,13 +42,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -203,13 +215,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/a_different_window_is_a_different_nullifier.1.json b/sc/advance/test_snapshots/test_claim/a_different_window_is_a_different_nullifier.1.json index c97b799..b209b4d 100644 --- a/sc/advance/test_snapshots/test_claim/a_different_window_is_a_different_nullifier.1.json +++ b/sc/advance/test_snapshots/test_claim/a_different_window_is_a_different_nullifier.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -139,13 +151,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/a_proof_at_the_edge_of_the_window_still_verifies.1.json b/sc/advance/test_snapshots/test_claim/a_proof_at_the_edge_of_the_window_still_verifies.1.json index 7da551c..2889fe0 100644 --- a/sc/advance/test_snapshots/test_claim/a_proof_at_the_edge_of_the_window_still_verifies.1.json +++ b/sc/advance/test_snapshots/test_claim/a_proof_at_the_edge_of_the_window_still_verifies.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -138,13 +150,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/a_proof_bound_to_one_borrower_cannot_be_spent_by_another.1.json b/sc/advance/test_snapshots/test_claim/a_proof_bound_to_one_borrower_cannot_be_spent_by_another.1.json index a3f322e..9e73102 100644 --- a/sc/advance/test_snapshots/test_claim/a_proof_bound_to_one_borrower_cannot_be_spent_by_another.1.json +++ b/sc/advance/test_snapshots/test_claim/a_proof_bound_to_one_borrower_cannot_be_spent_by_another.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -138,13 +150,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/a_proof_from_the_future_is_refused.1.json b/sc/advance/test_snapshots/test_claim/a_proof_from_the_future_is_refused.1.json index 03fdf87..b25527e 100644 --- a/sc/advance/test_snapshots/test_claim/a_proof_from_the_future_is_refused.1.json +++ b/sc/advance/test_snapshots/test_claim/a_proof_from_the_future_is_refused.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -138,13 +150,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/a_refused_claim_does_not_burn_the_nullifier.1.json b/sc/advance/test_snapshots/test_claim/a_refused_claim_does_not_burn_the_nullifier.1.json index b598a00..b01daa2 100644 --- a/sc/advance/test_snapshots/test_claim/a_refused_claim_does_not_burn_the_nullifier.1.json +++ b/sc/advance/test_snapshots/test_claim/a_refused_claim_does_not_burn_the_nullifier.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -168,13 +180,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/a_stale_proof_is_refused.1.json b/sc/advance/test_snapshots/test_claim/a_stale_proof_is_refused.1.json index 57df80b..c6917f1 100644 --- a/sc/advance/test_snapshots/test_claim/a_stale_proof_is_refused.1.json +++ b/sc/advance/test_snapshots/test_claim/a_stale_proof_is_refused.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -138,13 +150,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/changing_the_publisher_id_breaks_verification.1.json b/sc/advance/test_snapshots/test_claim/changing_the_publisher_id_breaks_verification.1.json index 3ad01b6..83ecd8a 100644 --- a/sc/advance/test_snapshots/test_claim/changing_the_publisher_id_breaks_verification.1.json +++ b/sc/advance/test_snapshots/test_claim/changing_the_publisher_id_breaks_verification.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -138,13 +150,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/changing_the_revenue_figure_breaks_verification.1.json b/sc/advance/test_snapshots/test_claim/changing_the_revenue_figure_breaks_verification.1.json index 3ad01b6..83ecd8a 100644 --- a/sc/advance/test_snapshots/test_claim/changing_the_revenue_figure_breaks_verification.1.json +++ b/sc/advance/test_snapshots/test_claim/changing_the_revenue_figure_breaks_verification.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -138,13 +150,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/field_boundaries_cannot_be_shifted_between_publisher_and_window.1.json b/sc/advance/test_snapshots/test_claim/field_boundaries_cannot_be_shifted_between_publisher_and_window.1.json index c97b799..b209b4d 100644 --- a/sc/advance/test_snapshots/test_claim/field_boundaries_cannot_be_shifted_between_publisher_and_window.1.json +++ b/sc/advance/test_snapshots/test_claim/field_boundaries_cannot_be_shifted_between_publisher_and_window.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -139,13 +151,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/the_contract_rebuilds_the_exact_bytes_the_attestor_signed.1.json b/sc/advance/test_snapshots/test_claim/the_contract_rebuilds_the_exact_bytes_the_attestor_signed.1.json index 3ad01b6..83ecd8a 100644 --- a/sc/advance/test_snapshots/test_claim/the_contract_rebuilds_the_exact_bytes_the_attestor_signed.1.json +++ b/sc/advance/test_snapshots/test_claim/the_contract_rebuilds_the_exact_bytes_the_attestor_signed.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -138,13 +150,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/the_nullifier_is_recorded_as_spent_and_was_not_before.1.json b/sc/advance/test_snapshots/test_claim/the_nullifier_is_recorded_as_spent_and_was_not_before.1.json index 035dd0c..c1eeb3e 100644 --- a/sc/advance/test_snapshots/test_claim/the_nullifier_is_recorded_as_spent_and_was_not_before.1.json +++ b/sc/advance/test_snapshots/test_claim/the_nullifier_is_recorded_as_spent_and_was_not_before.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -168,13 +180,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/the_same_proof_cannot_fund_two_advances.1.json b/sc/advance/test_snapshots/test_claim/the_same_proof_cannot_fund_two_advances.1.json index 6a82da1..6e1e858 100644 --- a/sc/advance/test_snapshots/test_claim/the_same_proof_cannot_fund_two_advances.1.json +++ b/sc/advance/test_snapshots/test_claim/the_same_proof_cannot_fund_two_advances.1.json @@ -22,13 +22,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" }, { - "bytes": "26656e64446174653d" + "bytes": "267374617274446174652e6d6f6e74683d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" + }, + { + "bytes": "26656e64446174652e6461793d" + }, + { + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] }, @@ -166,13 +178,25 @@ "bytes": "7b226d6574686f64223a22474554222c2275726c223a2268747470733a2f2f616473656e73652e676f6f676c65617069732e636f6d2f76322f6163636f756e74732f" }, { - "bytes": "2f7265706f7274733a67656e65726174653f7374617274446174653d" + "bytes": "2f7265706f7274733a67656e65726174653f6461746552616e67653d435553544f4d267374617274446174652e796561723d" + }, + { + "bytes": "267374617274446174652e6d6f6e74683d" + }, + { + "bytes": "267374617274446174652e6461793d" + }, + { + "bytes": "26656e64446174652e796561723d" + }, + { + "bytes": "26656e64446174652e6d6f6e74683d" }, { - "bytes": "26656e64446174653d" + "bytes": "26656e64446174652e6461793d" }, { - "bytes": "266d6574726963733d455354494d415445445f4541524e494e4753227d" + "bytes": "266d6574726963733d455354494d415445445f4541524e494e47532663757272656e6379436f64653d555344267265706f7274696e6754696d655a6f6e653d4143434f554e545f54494d455f5a4f4e45227d" } ] } diff --git a/sc/advance/test_snapshots/test_claim/the_template_the_contract_used_to_accept_is_refused_now.1.json b/sc/advance/test_snapshots/test_claim/the_template_the_contract_used_to_accept_is_refused_now.1.json new file mode 100644 index 0000000..9f3ec69 --- /dev/null +++ b/sc/advance/test_snapshots/test_claim/the_template_the_contract_used_to_accept_is_refused_now.1.json @@ -0,0 +1,98 @@ +{ + "generators": { + "address": 4, + "nonce": 0, + "mux_id": 0 + }, + "auth": [ + [], + [] + ], + "ledger": { + "protocol_version": 29, + "sequence_number": 0, + "timestamp": 0, + "network_id": "0000000000000000000000000000000000000000000000000000000000000000", + "base_reserve": 0, + "min_persistent_entry_ttl": 4096, + "min_temp_entry_ttl": 16, + "max_entry_ttl": 6312000, + "ledger_entries": [ + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_data": { + "ext": "v0", + "contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4", + "key": "ledger_key_contract_instance", + "durability": "persistent", + "val": { + "contract_instance": { + "executable": { + "wasm": "0d6d61ed9340595cb73d424cebeddb6def971a72143eafd77ef9806c3724701a" + }, + "storage": [ + { + "key": { + "vec": [ + { + "symbol": "Admin" + } + ] + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM" + } + }, + { + "key": { + "vec": [ + { + "symbol": "Usdc" + } + ] + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M" + } + }, + { + "key": { + "vec": [ + { + "symbol": "Verifier" + } + ] + }, + "val": { + "address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4" + } + } + ] + } + } + } + }, + "ext": "v0" + }, + "live_until": 3110400 + }, + { + "entry": { + "last_modified_ledger_seq": 0, + "data": { + "contract_code": { + "ext": "v0", + "hash": "0d6d61ed9340595cb73d424cebeddb6def971a72143eafd77ef9806c3724701a", + "code": "746573745f636f6e74726163745f666f725f636f6e74726163745f69645f4341414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414149544134" + } + }, + "ext": "v0" + }, + "live_until": 3110400 + } + ] + }, + "events": [] +} \ No newline at end of file diff --git a/sc/wasm-hashes.txt b/sc/wasm-hashes.txt index e517fb5..7f0d009 100644 --- a/sc/wasm-hashes.txt +++ b/sc/wasm-hashes.txt @@ -18,7 +18,7 @@ # triple stellar-cli sha256 # --- verified by CI on every push --- -x86_64-unknown-linux-gnu 28.1.0 5d9ed165cafcdd45235dbacfdf4c00667b0f123781ee9c6890d7cd4465419914 +x86_64-unknown-linux-gnu 28.1.0 ea868981fa1cb4dae52f6237956056a913c8a7baff3ebdef65df0fc5ef32dd0b # @@UNVERIFIED@@ rows below this marker are reference only and are not checked -aarch64-apple-darwin 27.0.0 d8a55ce21baab9af8259ccdedd8ddb29421e1ee01c2b938a7c336a2a36c55e89 +aarch64-apple-darwin 27.0.0 5ccdbdb774d76ab28322fe7b991da7b0a412968ffffec45b03fe73a8c2902c36 diff --git a/tools/fixtures/forepay-claim.json b/tools/fixtures/forepay-claim.json index ca447aa..2d512be 100644 --- a/tools/fixtures/forepay-claim.json +++ b/tools/fixtures/forepay-claim.json @@ -1,4 +1,5 @@ { + "_source": "Generated by tools/make_claim_fixture.py. Signed with a published test key, not an attestor key \u2014 the real attestor vector is real-reclaim-proof.json.", "borrower": "GA2CD6PMHMBTCFAQDO3R22BSZN5ZSVTAKVNOKXL2SONZBLGRAYIOWWH2", "contextMessage": "Forepay advance request", "pubId": "pub-1234567890123456", @@ -8,16 +9,31 @@ "providerHash": "0x569b93233185c054ed9fda68b5aef8fda180b6d291180450bf757b11bb52f7df", "templateParts": [ "{\"method\":\"GET\",\"url\":\"https://adsense.googleapis.com/v2/accounts/", - "/reports:generate?startDate=", - "&endDate=", - "&metrics=ESTIMATED_EARNINGS\"}" + "/reports:generate?dateRange=CUSTOM&startDate.year=", + "&startDate.month=", + "&startDate.day=", + "&endDate.year=", + "&endDate.month=", + "&endDate.day=", + "&metrics=ESTIMATED_EARNINGS¤cyCode=USD&reportingTimeZone=ACCOUNT_TIME_ZONE\"}" + ], + "values": [ + "pub-1234567890123456", + "2026", + "7", + "1", + "2026", + "9", + "30" ], "timestampS": 1760000000, "epoch": 1, - "identifier": "0xb44163715ab6c857a53eff47415a2106baf7ce21bf397ef197b58d35a5cdd90b", - "signData": "0xb44163715ab6c857a53eff47415a2106baf7ce21bf397ef197b58d35a5cdd90b\nga2cd6pmhmbtcfaqdo3r22bszn5zsvtakvnokxl2sonzblgrayiowwh2\n1760000000\n1", - "messageDigest": "aa8e7c8bd442ce4447913d47fe05f9c65d903b283edafb18d698ff544ae9e0ec", - "signature64": "41a1b3f92c2cee207d8fde5fd489da05f1d7b18f72af79c33d4cf17697509d7271b51ba7a3d9dd551f2e5aeba4aa1c8716d9945ae74b200c92da34739e80986d", + "parameters": "{\"method\":\"GET\",\"url\":\"https://adsense.googleapis.com/v2/accounts/pub-1234567890123456/reports:generate?dateRange=CUSTOM&startDate.year=2026&startDate.month=7&startDate.day=1&endDate.year=2026&endDate.month=9&endDate.day=30&metrics=ESTIMATED_EARNINGS¤cyCode=USD&reportingTimeZone=ACCOUNT_TIME_ZONE\"}", + "context": "{\"contextAddress\":\"GA2CD6PMHMBTCFAQDO3R22BSZN5ZSVTAKVNOKXL2SONZBLGRAYIOWWH2\",\"contextMessage\":\"Forepay advance request\",\"extractedParameters\":{\"revenueUsd\":\"1234.56\"},\"providerHash\":\"0x569b93233185c054ed9fda68b5aef8fda180b6d291180450bf757b11bb52f7df\"}", + "identifier": "0x18303a91f81e35d749d26b04a60e1ae95974128afd7ca66b3950547527480dee", + "signData": "0x18303a91f81e35d749d26b04a60e1ae95974128afd7ca66b3950547527480dee\nga2cd6pmhmbtcfaqdo3r22bszn5zsvtakvnokxl2sonzblgrayiowwh2\n1760000000\n1", + "messageDigest": "050cf5ad472b586cdf388991f772f5289e723a19c3347a110c00662794c8dd2f", + "signature64": "0a1607562845069dcd91874ae32ffc55d2ce799078af623b8300c1765137ca0f577ba3ed8dc8895867e717734d9535536384718e77126229ed28327c54cf202f", "recoveryId": 1, - "signerAddress": "1563915e194d8cfba1943570603f7606a3115508" + "signerAddress": "19e7e376e7c213b7e7e7e46cc70a5dd086daff2a" } diff --git a/tools/make_claim_fixture.py b/tools/make_claim_fixture.py new file mode 100644 index 0000000..b3e11d7 --- /dev/null +++ b/tools/make_claim_fixture.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python3 +"""Regenerate tools/fixtures/forepay-claim.json, the cross-language claim vector (#76). + +The fixture is what proves `sc/advance/src/claim.rs` rebuilds the exact bytes an attestor +signed. It has to be regenerated whenever the claim encoding changes, and it was wrong to +have it as a hand-pasted blob the first time: when #76 changed the encoding, nobody could +re-derive it. This script is the derivation. + + python3 tools/make_claim_fixture.py # write the fixture + python3 tools/make_claim_fixture.py --check # fail if the file is out of date + +The signing key is a **test constant**, not a secret: the fixture's whole purpose is that +anyone can reproduce it, and the key it is signed with is public by construction. The real +attestor's signature is in tools/fixtures/real-reclaim-proof.json, which this never +replaces — that one proves the digest chain against Reclaim's own production key. +""" +from __future__ import annotations + +import argparse +import json +import sys +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent)) +import secp256k1_probe as secp # noqa: E402 + +HERE = Path(__file__).parent +OUT = HERE / "fixtures" / "forepay-claim.json" + +# A published test key. Same constant tools/rehearsal.py signs its probe proofs with. +TEST_KEY = 0x1111111111111111111111111111111111111111111111111111111111111111 + +BORROWER = "GA2CD6PMHMBTCFAQDO3R22BSZN5ZSVTAKVNOKXL2SONZBLGRAYIOWWH2" +CONTEXT_MESSAGE = "Forepay advance request" +PUB_ID = "pub-1234567890123456" +WINDOW_START = "2026-07-01" +WINDOW_END = "2026-09-30" +REVENUE = "1234.56" +PROVIDER_HASH = "0x569b93233185c054ed9fda68b5aef8fda180b6d291180450bf757b11bb52f7df" +TIMESTAMP_S = 1_760_000_000 +EPOCH = 1 + +# The literal segments of the request, with the seven values interleaved between them. +# The query is the one be/src/adsense/request.ts actually builds (#4, #74): AdSense takes +# each date as three unpadded integers, because `startDate` is an `object (Date)` and the +# REST transport flattens it. There is no string date form to use instead. +TEMPLATE = [ + '{"method":"GET","url":"https://adsense.googleapis.com/v2/accounts/', + "/reports:generate?dateRange=CUSTOM&startDate.year=", + "&startDate.month=", + "&startDate.day=", + "&endDate.year=", + "&endDate.month=", + "&endDate.day=", + '&metrics=ESTIMATED_EARNINGS¤cyCode=USD&reportingTimeZone=ACCOUNT_TIME_ZONE"}', +] + + +def unpadded(digits: str) -> str: + """ASCII digits as an integer is serialised: "07" -> "7", "00" -> "0".""" + return str(int(digits)) + + +def date_values(date: str) -> list[str]: + y, m, d = date.split("-") + return [unpadded(y), unpadded(m), unpadded(d)] + + +def build() -> dict: + values = [PUB_ID] + date_values(WINDOW_START) + date_values(WINDOW_END) + assert len(TEMPLATE) == len(values) + 1, "a template of N parts takes N-1 values" + + parameters = TEMPLATE[0] + for i, value in enumerate(values): + parameters += value + TEMPLATE[i + 1] + + context = ( + '{"contextAddress":"' + BORROWER + + '","contextMessage":"' + CONTEXT_MESSAGE + + '","extractedParameters":{"revenueUsd":"' + REVENUE + + '"},"providerHash":"' + PROVIDER_HASH + '"}' + ) + + identifier = "0x" + secp.keccak256( + b"http\n" + parameters.encode() + b"\n" + context.encode() + ).hex() + sign_data = f"{identifier}\n{BORROWER.lower()}\n{TIMESTAMP_S}\n{EPOCH}" + digest = secp.eip191_digest(sign_data) + r, s, rec = secp.sign(digest, TEST_KEY) + + return { + "_source": ( + "Generated by tools/make_claim_fixture.py. Signed with a published test key, " + "not an attestor key — the real attestor vector is real-reclaim-proof.json." + ), + "borrower": BORROWER, + "contextMessage": CONTEXT_MESSAGE, + "pubId": PUB_ID, + "windowStart": WINDOW_START, + "windowEnd": WINDOW_END, + "revenueUsd": REVENUE, + "providerHash": PROVIDER_HASH, + "templateParts": TEMPLATE, + "values": values, + "timestampS": TIMESTAMP_S, + "epoch": EPOCH, + "parameters": parameters, + "context": context, + "identifier": identifier, + "signData": sign_data, + "messageDigest": digest.hex(), + "signature64": (r.to_bytes(32, "big") + s.to_bytes(32, "big")).hex(), + "recoveryId": rec, + "signerAddress": secp.address_of(TEST_KEY).hex(), + } + + +def main() -> int: + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument("--check", action="store_true", help="fail if the fixture is stale") + a = ap.parse_args() + + fixture = json.dumps(build(), indent=2) + "\n" + if a.check: + if not OUT.exists() or OUT.read_text() != fixture: + print(f"{OUT} is out of date; run tools/make_claim_fixture.py", file=sys.stderr) + return 1 + print(f"{OUT} is up to date") + return 0 + + OUT.write_text(fixture) + print(f"wrote {OUT}") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tools/rehearsal.py b/tools/rehearsal.py index a397739..216c13a 100755 --- a/tools/rehearsal.py +++ b/tools/rehearsal.py @@ -54,11 +54,20 @@ IMPOSTOR_KEY = 0x3333333333333333333333333333333333333333333333333333333333333333 PROVIDER_HASH = "0x569b93233185c054ed9fda68b5aef8fda180b6d291180450bf757b11bb52f7df" CONTEXT_MESSAGE = "Forepay advance request" +# Eight literal segments with seven values between them: pub_id, then each date as an +# unpadded year, month and day. AdSense takes `startDate` as an `object (Date)`, which the +# REST transport flattens into three integer query parameters — there is no string date +# form, so a single "2026-07-01" cannot fill them (#76). Same bytes as +# tools/make_claim_fixture.py and be/src/adsense/request.ts. TEMPLATE = [ b'{"method":"GET","url":"https://adsense.googleapis.com/v2/accounts/', - b"/reports:generate?startDate=", - b"&endDate=", - b'&metrics=ESTIMATED_EARNINGS"}', + b"/reports:generate?dateRange=CUSTOM&startDate.year=", + b"&startDate.month=", + b"&startDate.day=", + b"&endDate.year=", + b"&endDate.month=", + b"&endDate.day=", + b'&metrics=ESTIMATED_EARNINGS¤cyCode=USD&reportingTimeZone=ACCOUNT_TIME_ZONE"}', ] STEPS = { @@ -159,14 +168,23 @@ def contract_error(out: str) -> str | None: return f"#{m.group(1)}" if m else None +def date_values(date): + """`"2026-07-01"` as the three unpadded numbers AdSense takes: `2026`, `7`, `1`.""" + return [str(int(part)).encode() for part in date.split("-")] + + def build_claim(pub_id, start, end, revenue, timestamp_s, key, *, borrower=BORROWER, epoch=0): - params = TEMPLATE[0] + pub_id.encode() + TEMPLATE[1] + start.encode() + TEMPLATE[2] + end.encode() + TEMPLATE[3] + values = [pub_id.encode()] + date_values(start) + date_values(end) + assert len(TEMPLATE) == len(values) + 1, "a template of N parts takes N-1 values" + params = TEMPLATE[0] + for i, value in enumerate(values): + params += value + TEMPLATE[i + 1] + # Only the figure. The currency is held by the signed `"currencyCode": "USD"` match and + # the window by the signed URL, so neither left the signature when they left here (#76). ctx = ( b'{"contextAddress":"' + borrower.encode() + b'","contextMessage":"' + CONTEXT_MESSAGE.encode() - + b'","extractedParameters":{"currency":"USD","endDate":"' + end.encode() - + b'","revenueUsd":"' + revenue.encode() - + b'","startDate":"' + start.encode() + + b'","extractedParameters":{"revenueUsd":"' + revenue.encode() + b'"},"providerHash":"' + PROVIDER_HASH.encode() + b'"}' ) identifier = "0x" + secp.keccak256(b"http\n" + params + b"\n" + ctx).hex()