Skip to content

Commit

Permalink
Update circuit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed Jan 6, 2025
1 parent 00b7594 commit aac9ec0
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 179 deletions.
4 changes: 2 additions & 2 deletions packages/circuits/tests/email_auth_production.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const option = {
output: path.join(__dirname, "../build"),
recompile: true,
};
const shaPrecomputeSelector = '<div id=3D\"[^"]*zkemail[^"]*\"[^>]*>[^<>/]+</div>';
const shaPrecomputeSelector = '<div id=3D\"[^"]*zkemail[^"]*\"[^>]*>(<[^<>]+>)*[^<>/]+(<[^<>]+>)*</div>';

jest.setTimeout(1440000);
describe("Email Auth Production", () => {
Expand Down Expand Up @@ -700,7 +700,7 @@ describe("Email Auth Production", () => {
);
console.log("expectedEmailNullifier done");

const timestamp = BigInt(1734913850);
const timestamp = BigInt(1736165125);
expect(timestamp).toEqual(witness[1 + domainFields.length + 2]);
console.log("timestamp done");

Expand Down
6 changes: 3 additions & 3 deletions packages/circuits/tests/email_auth_recipient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const option = {
output: path.join(__dirname, "../build"),
recompile: true,
};
const shaPrecomputeSelector = '\\\[zkemail-begin\\\]';
const shaPrecomputeSelector = '<div id=3D\"[^"]*zkemail[^"]*\"[^>]*>(<[^<>]+>)*[^<>/]+(<[^<>]+>)*</div>';


jest.setTimeout(1440000);
Expand Down Expand Up @@ -81,7 +81,7 @@ describe("Email Auth with Recipient", () => {
witness[1 + domainFields.length + 1]
);

const timestamp = BigInt(1734798639);
const timestamp = BigInt(1729865810);
expect(timestamp).toEqual(witness[1 + domainFields.length + 2]);

const maskedCommand = "Send 0.1 ETH to ";
Expand Down Expand Up @@ -173,7 +173,7 @@ describe("Email Auth with Recipient", () => {
witness[1 + domainFields.length + 1]
);

const timestamp = BigInt(1734798636);
const timestamp = BigInt(1729865832);
expect(timestamp).toEqual(witness[1 + domainFields.length + 2]);

const maskedCommand = "Swap 1 ETH to DAI";
Expand Down
141 changes: 71 additions & 70 deletions packages/circuits/tests/emails/recovery_icloud_pc.eml
Original file line number Diff line number Diff line change
@@ -1,113 +1,114 @@
Delivered-To: emaiwallet.alice@gmail.com
Received: by 2002:a05:6f02:6f0:b0:7c:27d1:5778 with SMTP id f48csp3859401rce;
Sun, 22 Dec 2024 16:30:51 -0800 (PST)
X-Google-Smtp-Source: AGHT+IFcCNkrQinnjnyrS1yfQUlyzfRKx7OA8f1tGmyWDh73tYcugvrWOpVWclkGd0fwEiZy7gB/
X-Received: by 2002:ac8:5916:0:b0:467:50d0:8866 with SMTP id d75a77b69052e-46a4a8cd55emr192738531cf.19.1734913850997;
Sun, 22 Dec 2024 16:30:50 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1734913850; cv=none;
Received: by 2002:a05:6f02:6f0:b0:7c:27d1:5778 with SMTP id f48csp11960157rce;
Mon, 6 Jan 2025 04:05:26 -0800 (PST)
X-Google-Smtp-Source: AGHT+IGqxheiTMlWW9Z2RX8eg15wu7QCSSTLEPy0IL/R70QT0oryzJtSYnzrZ86+bVPEe8pN3D8h
X-Received: by 2002:a05:6a20:158c:b0:1e1:afd3:bbfc with SMTP id adf61e73a8af0-1e5e0446374mr90839524637.3.1736165126404;
Mon, 06 Jan 2025 04:05:26 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1736165126; cv=none;
d=google.com; s=arc-20240605;
b=Vzbx9Rr4PXixt6I9QRTgR+uVzYhEJM+0eqKCBf5zyXbOsczNbeveVwlS4tjPNDcpNm
2X8dGoGbhXDbemMXx74YIqnn8iUrwtt1yisSt+wM/MiWBLbV/E1OQHYx+5EUfY8EdlgO
AHFpJ846TWg/xzoD3Fq1txS0DnMUVjnXUy+53TtV+kdPdniwkI5ziWeKOHKdrdctpCwY
61ucmFGwEzn27xyq66UjxmPFfAm9FNqc7YkdbguVrz+M/NSCQbD8EAcN4z2kdXacSHdx
QsjMOry+d0VvWlevht9Xzk/7ASwpCTJCeTkX/DdIUodGn5dlzHH6cu9T2vD5ygjfCGJr
+PSA==
b=TsqCYIoxoDu2zGjIWUViqJWF9lnL0fTfYQtO//mFOfz0PgI3H92b4qFXVGrkO8GN7d
J/NwLzyNe3veYlxFIFQwJv3I0NtJ7/hXed/B9LyFC7z0CT5YkN6yDmlQH0bsXTWd+DUc
Fp+PjbODezqd574uQ2G+4/TutkPK7zJPYIIUjxHbTIs4t4vYSbUQiWgnssD8MtEvaS7X
qQQrNO8dk30t7vZaeSEvBSUbOO04+Ua5Qwq5Uf0K+KaRLiQ2gv/AZtvj25is9WzefQhA
vSer7mRWBx9LGFlGN0D5pnFhf8/DpP+r750LnJvIqGmrEAANkRVfHOL5LgnP4QG2zM72
PXuQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
h=references:in-reply-to:mime-version:message-id:date:subject:from:to
:dkim-signature;
bh=rGP22xcq+LGp1lgg/d/J8Njqp+pVlZSJ7HNkuBfz1Xs=;
bh=5yKMRSxFFcyhYdYNPGMmgTZTPXvb4Lwx6XQPlpQVByk=;
fh=mGvgZSvjBMYp45+5ZRabA1Bu+M/iTPP6wzPoGZ2mmaM=;
b=AkMCAum0ssqEu4LNpgy1yzqAAaHWhUFJQzTypQ07W2DCE+MtRbqBEMFolaFMYhq19S
Bqtlv+/YNK5JQxwHiC4KwJcDP+bns7h7TV1xOil7ajSuYPeIcEbzcJw8TR41XVxhAKrf
Ic8vMtanwLg4cQseXJ+twvsOCW7b/JQlxdXy0tAa8wEwqE+Lk4FdopANlbnDghiMwaJ+
wpTLhDN/j814pKTutLKy6ntcTGfSu2IdCHm+7QMTUBA+ojidp471z//vSuEO/HVGnryn
fBH0LT7Xf8+0IjLpeuXLSK5iw9nPX+gGVORM7N7WQuKMa9JuFo37pucp5w5G42H50K9w
ddXA==;
b=hNIRRw8Cgpq+VHiAw3zlR+Ri32eyq2jHmkWr7oiEaTa32/NnFYJ+Uk1C9wNHtJmNRn
qV6sUrpQp1nrmv2D3mW2qs6qfpMPh7Uwz8+tY12BE8KlWUcNM3UBkotA6EY3vMZXUnF5
TK8qXGcxv8LpnAiVW11wh6/zdGU8FDmmbdglNgNg8rxkqNrf/SHAD7L8W/TYw/0pFEXx
fUXIZJRA05uYgkwqCuWs56bfvQT3P85O4MdCBTPqcx6lvaYbf4Uhfp1bVImSQZ+fFOR2
LTGJ1sj4Ssgc/yU5K1XhoGpXulQlVl8/xSr3IeyiFhHYy3Uj8Vx9pAn3hmXVa3UMvO0N
JAgQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@icloud.com header.s=1a1hai header.b=s16sE1d5;
spf=pass (google.com: domain of suegamisora@icloud.com designates 17.58.23.195 as permitted sender) smtp.mailfrom=suegamisora@icloud.com;
dkim=pass header.i=@icloud.com header.s=1a1hai header.b=SjD7mhGW;
spf=pass (google.com: domain of suegamisora@icloud.com designates 17.58.23.185 as permitted sender) smtp.mailfrom=suegamisora@icloud.com;
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=icloud.com
Return-Path: <suegamisora@icloud.com>
Received: from mr85p00im-ztdg06021801.me.com (mr85p00im-ztdg06021801.me.com. [17.58.23.195])
by mx.google.com with ESMTPS id d75a77b69052e-46a3e681121si104953891cf.6.2024.12.22.16.30.50
Received: from mr85p00im-ztdg06011101.me.com (mr85p00im-ztdg06011101.me.com. [17.58.23.185])
by mx.google.com with ESMTPS id d2e1a72fcca58-72aad8fd6b6si12330529b3a.210.2025.01.06.04.05.26
for <emaiwallet.alice@gmail.com>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 22 Dec 2024 16:30:50 -0800 (PST)
Received-SPF: pass (google.com: domain of suegamisora@icloud.com designates 17.58.23.195 as permitted sender) client-ip=17.58.23.195;
Mon, 06 Jan 2025 04:05:26 -0800 (PST)
Received-SPF: pass (google.com: domain of suegamisora@icloud.com designates 17.58.23.185 as permitted sender) client-ip=17.58.23.185;
Authentication-Results: mx.google.com;
dkim=pass header.i=@icloud.com header.s=1a1hai header.b=s16sE1d5;
spf=pass (google.com: domain of suegamisora@icloud.com designates 17.58.23.195 as permitted sender) smtp.mailfrom=suegamisora@icloud.com;
dkim=pass header.i=@icloud.com header.s=1a1hai header.b=SjD7mhGW;
spf=pass (google.com: domain of suegamisora@icloud.com designates 17.58.23.185 as permitted sender) smtp.mailfrom=suegamisora@icloud.com;
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=icloud.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com;
s=1a1hai; t=1734913850;
bh=rGP22xcq+LGp1lgg/d/J8Njqp+pVlZSJ7HNkuBfz1Xs=;
s=1a1hai; t=1736165125;
bh=5yKMRSxFFcyhYdYNPGMmgTZTPXvb4Lwx6XQPlpQVByk=;
h=To:From:Subject:Date:Message-id:Content-Type:MIME-Version:
x-icloud-hme;
b=s16sE1d5U41tBBZOG352dX4p27WA35UFmM0e8EhcQ7YZrKXYnzVyB3VAXkUGJ8qvC
sR3Q2TXJNd7aSRyKwsjcuA1eJsksCBgf923W9T2nVR/peQO/1oLOfqptR8GjoUOgF/
GYmOirmvvF9ksnq0a8wSBvANk6M+kL4BXoOiKf4tpxlLwpjnS5aK+r2+H1/rKnwuRC
U1P4AIJP50rFiHy/NKAPtYUaGe8IsaLqUprE8D8wJSF4vEG/ELBCpmLoMHVvEOXKh8
+JdB4N1WDg5DjPpSGGLsOsM+IBY0E8H0vhVxVj1J1/l3vKv0N32F+czLniIosris0n
tjXn/dIGhyMrQ==
Received: from mr85p00im-ztdg06021801.me.com (mr85p00im-ztdg06021801.me.com [17.58.23.195])
by mr85p00im-ztdg06021801.me.com (Postfix) with ESMTPS id 5562244251C
for <emaiwallet.alice@gmail.com>; Mon, 23 Dec 2024 00:30:49 +0000 (UTC)
Received: from p00-mailws2-6bf78668bd-p4g8r (mr38p00im.dlb-asmtpoutvip.me.com [10.112.84.233])
by mr85p00im-ztdg06021801.me.com (Postfix) with ESMTPSA id 4B630442384
for <emaiwallet.alice@gmail.com>; Mon, 23 Dec 2024 00:30:36 +0000 (UTC)
b=SjD7mhGW5uYOnq7aPRWZzbpdt3W6nwa++Gdr5xcytuAgectDfuojc9eckiJEoo+Ba
NBpr1Bgc44E60HkERImIVl9JoUZojRKbh4LdFRfQgfe3WaWJvjSAwegoqBGE3DQ471
m+2APYozMfUi79Lw5kHS2tGowoS4axCoAomYGDWFlmBmZ16z/og4xAk6zM/8FmjW9r
XAgkH5yMYCcRsXAHiq4+x2efTwgd65HfEnmbN0E2HsfjKIwG/cFvvsuEZjIm28O3Np
EKCvkTmm6rq5VksOJ5kHtFd/amLUBk5L50Lw4LJqCf7U40O7Di2JExqDnxrw+LJdkU
ciBJgTZ5oUkvw==
Received: from mr85p00im-ztdg06011101.me.com (mr85p00im-ztdg06011101.me.com [17.58.23.185])
by mr85p00im-ztdg06011101.me.com (Postfix) with ESMTPS id 93BD8DA0211
for <emaiwallet.alice@gmail.com>; Mon, 6 Jan 2025 12:05:25 +0000 (UTC)
Received: from p00-mailws2-6bf78668bd-hdj6p (mr38p00im.dlb-asmtpoutvip.me.com [10.112.84.233])
by mr85p00im-ztdg06011101.me.com (Postfix) with ESMTPSA id 2EFDFDA0316
for <emaiwallet.alice@gmail.com>; Mon, 6 Jan 2025 12:05:25 +0000 (UTC)
To: emaiwallet.alice@gmail.com
From: =?utf-8?B?5pyr56We5aWP5a6Z?= <suegamisora@icloud.com>
Subject: Re: [Reply Needed] Test Email 12
Date: Mon, 23 Dec 2024 00:30:36 +0000 (UTC)
Date: Mon, 6 Jan 2025 12:05:25 +0000 (UTC)
X-Mailer: iCloud MailClientcurrent MailServer2429B28.6954931b110c
Message-id: <a13eab5f-0705-4688-b081-04d3f6b71245@me.com>
Content-Type: multipart/alternative; boundary=Apple-Webmail-42--62d665fb-b13a-47b6-9e81-9128439a2d95
Message-id: <3cab81ac-2b74-4ef3-93bd-76d02772b2f2@me.com>
Content-Type: multipart/alternative; boundary=Apple-Webmail-42--883448a3-b31a-49e3-853a-2519f800d45b
MIME-Version: 1.0
In-Reply-To: <6768aefc.050a0220.18d0a2.16c6@mx.google.com>
References: <6768aefc.050a0220.18d0a2.16c6@mx.google.com>
X-Proofpoint-GUID: fsBBwcllw1Z6NoqqsHvWFsDjfs67qw84
X-Proofpoint-ORIG-GUID: fsBBwcllw1Z6NoqqsHvWFsDjfs67qw84
In-Reply-To: <677bc6e0.050a0220.e60ed.61a3@mx.google.com>
References: <677bc6e0.050a0220.e60ed.61a3@mx.google.com>
X-Proofpoint-GUID: FfozdXya2QGFjKy1JlyjTMhnuJpz1C3Z
X-Proofpoint-ORIG-GUID: FfozdXya2QGFjKy1JlyjTMhnuJpz1C3Z
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34
definitions=2024-12-22_11,2024-12-19_01,2024-11-22_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 phishscore=0
suspectscore=0 clxscore=1011 adultscore=0 bulkscore=0 mlxlogscore=656
mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.19.0-2308100000 definitions=main-2412230003
definitions=2025-01-02_03,2025-01-06_02,2024-11-22_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0
suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=740 clxscore=1015
mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.19.0-2308100000 definitions=main-2501060107


--Apple-Webmail-42--62d665fb-b13a-47b6-9e81-9128439a2d95
--Apple-Webmail-42--883448a3-b31a-49e3-853a-2519f800d45b
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8;
format=flowed
2024=E5=B9=B412=E6=9C=8823=E6=97=A5 9:29=E3=80=81emaiwallet.alice@gmail.co=
m=E3=81=8B=E3=82=89=E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=EF=BC=9A Hello! Th=
is is a test email with a basic HTML body. [zkemail-begin]Accept guardian =
request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC Code 01eb9b204cc24c=
3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76[zkemail-end] Thank you!
--Apple-Webmail-42--62d665fb-b13a-47b6-9e81-9128439a2d95
Confirm 2025=E5=B9=B41=E6=9C=886=E6=97=A5 21:04=E3=80=81emaiwallet.alice@g=
mail.com=E3=81=8B=E3=82=89=E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=EF=BC=9A He=
llo! This is a test email with a basic HTML body. Accept guardian request =
for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC Code 01eb9b204cc24c3baee11a=
ccc37d253a9c53e92b1a2cc07763475c135d575b76 Thank you!
--Apple-Webmail-42--883448a3-b31a-49e3-853a-2519f800d45b
Content-Type: multipart/related;
type="text/html";
boundary=Apple-Webmail-86--62d665fb-b13a-47b6-9e81-9128439a2d95
boundary=Apple-Webmail-86--883448a3-b31a-49e3-853a-2519f800d45b
--Apple-Webmail-86--62d665fb-b13a-47b6-9e81-9128439a2d95
--Apple-Webmail-86--883448a3-b31a-49e3-853a-2519f800d45b
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8;

<html><body><div><div><br></div><div><br></div><blockquote type=3D"cite"><div>2024=E5=B9=
=B412=E6=9C=8823=E6=97=A5 9:29=E3=80=81emaiwallet.alice@gmail.com=E3=81=8B=
<html><body><div><div>Confirm</div><div><br></div><blockquote type=3D"cite"><div>2025=E5=
=B9=B41=E6=9C=886=E6=97=A5 21:04=E3=80=81emaiwallet.alice@gmail.com=E3=81=8B=
=E3=82=89=E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=EF=BC=9A<br></div><div><br><=
/div><div><br></div><div><h1>Hello!<br></h1><p>This is a test email with a=
basic HTML body.<br></p><div style=3D"display: none;">[zkemail-begin]Acce=
pt guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC Code 01=
eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76[zkemail-end=
]<br></div><p><b>Thank you!</b><br></p></div></blockquote></div></body></html>
--Apple-Webmail-86--62d665fb-b13a-47b6-9e81-9128439a2d95--
basic HTML body.<br></p><div style=3D"display: none;"><div id=3D"3D&quot;=
zkemail&quot;">Accept guardian request for 0x04884491560f38342C56E26BDD0fE=
Abb68E2d2FC Code 01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135=
d575b76<br></div></div><p><b>Thank you!</b><br></p></div></blockquote></di=
v></body></html>
--Apple-Webmail-86--883448a3-b31a-49e3-853a-2519f800d45b--

--Apple-Webmail-42--62d665fb-b13a-47b6-9e81-9128439a2d95--
--Apple-Webmail-42--883448a3-b31a-49e3-853a-2519f800d45b--

Loading

0 comments on commit aac9ec0

Please sign in to comment.