Radius
Search
K

Encrypted Mempool

When a user submits a transaction to the sequencer:
  1. 1.
    User generates a time-lock puzzle and a symmetric key.
  2. 2.
    User signs the message and receives the signature, body, and auth_info.
    • auth_info: includes account-related information, such as the address.
    • body: includes the transaction content, including the sender, receiver, and sent value.
    • signature: The signature from signing the message.
  3. 3.
    User encrypts the body of the transaction using the symmetric key.
  4. 4.
    User sends the encrypted transaction and the proof to the sequencer.
json value
{
"jsonrpc": "2.0",
"id": 1,
"method": "send_tx",
"params": [
{
"message_length": 272,
"nonce": "57661d170099578e08e9f51591fb96da4da4cd00a261e31b1f54f2e577cf5d26",
"signatures": [
"bdbcab7048e6f8aa1ca3743567c667478f1ded50ac5054490e62f456e002221729fa555d8973b09c2c5f780be5a537fc37c351407f416f4b33a5bff540f9f8ec"
],
"tx_hash": "D845257B0C9A680738E0F7AED784D82BDA062BF6FAA021D1DED96280CE680DF9",
"tx_info": {
"tx_type": "L3",
"auth_bytes": "0a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21024839d25c8c60ff075e8d5aa65ffaffe883a4e8bba03d9ae79df0ce37b401f1c412040a02080112130a0d0a057374616b6512043430303010a08d06"
},
"encrypted_tx": [
"2c6970535699f20b8bfbc14416c6147a0c3095577f1c7e788b7ffe5a4e0d59599ca93b14e4004ccc253948010579f02bf4be0f9c2dcb5515f40dfce39577526b7cd042c6c79b6c6f202299bbf1b0e676d670105b3ef26ceebc218a169666923815687bbb0896885d571560edfb8c9a69f1f591c5b000b93929998c4aaf4aa04419fcc7205550a21d2111b22a471da4c56a3a4f0933f589bf13a69d7bab64dc5595ba4f0a5b5cfaafdac9cade213d65211683b97ed696d53e61bd63598b1eca0c889ddae071a744ad0d88ca772a893eccad9983cfbc6ce7e96e93f5750f26d233fcf9d35a862457695c03be7f36c438aa2d6179fb99c1a67e55d44e87c2bc260aae294de6363bad07458fae84ab589eb7279a7191132d0aecab4843374694c212db8f1c432b2874ab0fb6a5d2d18481fd2bfea80d8b709defa4545c474a396b7336bd373559547e19cd6b45105103d351d5923bb69d769c20df74f30a4575785f"
],
"proofs": {
"commitment": "1f2703b88c21a9d805f9d31f85882dd7867874c6c9d9967171e031166c23c7ab",
"time_lock_puzzle": "90d3ccd22313c84d5dbb488b03f3c57cae7282bd612fb4201d4642ce9c1d8fbf9e0c72355d2f77d2e0081896ef7baf7aac793602c3552b5dba0bf4e9bb59580f901f53dce483d30806b61aada49a2345cdd752a9f21a59a4c59c531209ece9e40914a650b369ab58e16c586eb259e00766ab59775b633287a6267ad09c65758ef42df2594eb6c1ea04303dd64e6ba9da95718cf772a991aef1b4ac974284f54be181f3444b7ac23b8c3a4eb50df270a360e39e376b4f27a05eba38a16f4189ef",
"encryption": "aa8bb7591b9e75936e9cd58271a56b78525ddcbde6d3d57d91c49b65e2c5423ebef7c742850d5275f519e03ecfe60963abf3e0cf854184317c6615eabf201330a259524cf19b6c2d8091226659575422bf7ffb80ef1f78952c92181a1f2fb8b68d407597667a3c7fc21a93b3e2d3c0b4b162c8a322c0745560f8bf082e35e7432dd7d85e5d72e4d7299d6c80eaec4ec980c0cc3830fe102ca556dc7c37e6ab8dc240a1eee1d953e6b5eb806659b88ee72897bb1aa0b1a9b1e94d7161fc545597adda7e7cdcfc861dc653835b1dc32f44571bb38d6857665286d4faa5b37f9b4522c981279a16f681103bb9ce6c36243da0fcfc3099671f0aa77619d82deb8d01f591f607fc1c925b9504cf7038c8ecd4f63943af022f01f5848d7ebeeefa818f8f9920e6e358a973c6f85f70d70dc3b8a5d61c39be0eaf55167a94da86c6aff7576d946a152f3ef6c76ce2e5df6ef67984f1296b5bd4c5e2b058fe80a4018e64904c3b6f92b495078f510744d3341a71ddfbbe141f44f9d820a882d98acc374a97bf56640c6910c3ca821184fcbfa843ccf08a9e41899828bf028792da675b6e61dcaa37a35eed5d3758caa6a2b40acbb8cbd1913e82b611f561da6f53ae2e9c4fbf664a89b72aee5a8cb205467c804eeab7e917a916c9faa37e169aec86a9d9b0a68eea13287beb26efee9c8a635018ca558a99b23e2698110e1be2bb71eb9ea2da6147bea131ecda5b1fb04f16f00eab5ca132ab02eeec64cf4c0d0423f1cd8a905edc3d7bf476d7b6a503d7eb546fa693df4c1ae9605ad4aa0215ced70ba8999a567c771bd9843962a40ebd193ec2130dfe8a3061334df93cec4edd08fdbe487a8332209d6c13cade4690faa50b31a286d3cebb0be7caee73237645a1c606f928be8577649cf2aa9312deaceccf8c19d671327317ec4d699d1bab5cd66c62b32a5290db02951228211817a55836f1b093a4f2a9c2416caaaef7ed99e34ccaff224fedf46af59d060fc55b480dd59fe87ab5688968da4cace4b215a3858f12e785e51c328af5f0cf401118d7e56e55ae9d050c320b0ec7ea55ee00f907eb8150c32d9129b96a89dc7ce6406187f71b9f50456c13d076c8f6c989d7247007a7be0dbe18d6dceea5bb3339d74314ff70e55e7a048c6d225458dbb25cd10a0b64874a553720ef78c794a58fe707bcec6db692aaa535e323961442549c60efd8c11aa38d89a474126f7b7e3257d81062715567b6ea248067164e729e3649793bfdd8387a2d67a148c1626441671e99e32068cbcaa9c9d3a11130926f203ece30de23787d469f6265d9f33a82cad2c63d70855fdb9f06b2105aba9b22391e81a80a497bb1c937c166fef9314aaa1da24322e4750d3e8c748485043f65bdb0154be37a828efeec587ac99b2de7a87722bd6a5ccabaa2ba347c49f0d2e110f1bd1ccc9a9e0679c600558adf3dd9def3e19b5a6d21a17f45a6c9c4665e869eddffb213615685663ac79e22385e443bd96a4f6097f07bd4d4bb30b581437e3c5359772591316e2a62b29b356516849e4f637d470aec65c7c2973ca62252ef61cb9f9420aaadd71b7578af3bd87091498b3d624580a5a81a029f8cdbb72a08a7e7956bb038bf78bc5f979315f42460b4ca160517846508824fb3904016c405f65c64da22f5e23313857b29b71db6416dec27f25e932e43fcc1e9ff203d4e7d963958917330ccec8f34b82f7d28980e14a213e12f10b4ffc9c5986e7dc76d35e251ec16634e8c4a403a32852bf4ac0f8f9f953032c3db279749bd61d69714fb6dee9170e6c4adce5c14af2c5f24ba733b63c34f40824320d7fb162cada161bcc8f607bf953fd2ced1986794a022c968350d4a1b386b652aa986e194c5e3defaf9d24ebc7ba7a5c5762315ecb5ba7f852a8c5f5a576b652aa986e194c5e3defaf9d24ebc7ba7a5c5762315ecb5ba7f852a8c5f5a570118b6913ed47f39267e5690a54d44226876ebb3620f279d890d7f67d9b5eb3c705c4b8847af8f38cdfd2874fbf96af3be8720259397e7e90a7e13deca576e59aec21a8296dad4e1d3242608a8939d8f0e234bab8436a264f021893badcf9d37"
},
"zkp_parameters": {
"time_lock_puzzle": {
"r1": "8311367187610813912406245734624703063529937388018141295225718404462288806585840988073755105923602313288393430677311458905771086232470238401638653596326164611547360230641659900555443951287070039746711154647105887109592565480452865853439470816122272830904869027039455058587345998514282430538441134657768521008408358976833674097823531349559813103836600718862938115213171242172970051176742496910870309162435735419364435115591426907515725898529751170357477678970101355848522740539557486611300125393474461923928041772603345955494081243398145757006054698895060078784042554725112512254899021164440749767126552885196521176495",
"r3": "21865873484179022469274593984477293263526006801954805830063423233787975094281720298805048190585149119010232970397215811735338963529446933479464074781852912714901792710881822991733871655731433417652518087800002089080393942397437412322511937173987111745923223553410698421558333388104927299147373976592668826260018771099887099913767070512903441693494534308241779137437349750658709341782597060039089927592539313010803040179604159939280638001697059921601627398075586810077179184490238560431509345568561876696421479428468675074148704060823032549877420074504557504055651695437681055328345282993996162146851162007266569064118",
"s1": "14661526489240635812666537760385640963791605164075234923025156752098338799021019988054694918103319572793277036413602179243864197687955300119897490031949011274326771992183334134511491130333684967753741286875403608397711841155377063810555982016773875495935574756034510671162735082643830509977938995108454421624598366745078340463022891672442783519298050260796682640898976518998242449172951681279877024651040868695005648512053342453124698780770233481819823707363277865636442082023200115071084159073685725181504730768000464340912733423980080028006617287548454892877800899288072064504809802440994798796572392014334261142119",
"s3": "18226959456517070245844733451626313319562041076055691673869609032924911828449369114886087299860289527537201196283999024924837059855138692508726746990663442721553960671914115644948992868314809193900459359491728708761123834030140082183991810634103648214151239955292320246735707119751542296915695928936562682247088315324390715459251877680132867959813379000533350305885152942232262786948023511369501403898341657997714614380781662185536551483868879081584380892572945991555915728824786010577701842188305574407046859558829253910790483234895752858663272975035907448497128676304292698306249058068988415014859431617789264417685",
"k": "2668329648405646483708775851347781708033353029290047827295351461319558180722200542364766031461837303654727805282570"
},
"encryption": {
"rollup_id": "196BA6309240BD0992867FC96A384BC97112577E9791D7AAA1FC6F0A5B746B6E"
}
}
}
]
}
These values are submitted to the sequencer as part of the transaction process.

Time-lock puzzle with PVDE

Create and Encrypt Time-lock Puzzle (user)
  1. 1.
    Create time-lock puzzle
    1. 1.
      Generate modulus: $N = p*q$
    2. 2.
      Select generator: $g \in G,\; where\;G\;is\;RSA\;group$
    3. 3.
      Compute symmetric key: $S_k = g^{2^T} mod \; N$
  2. 2.
    Encrypt transaction
    1. 1.
      Generate symmetric key on an elliptic curve $k = (k_0, k_1) \gets JubJubAffine(S_K) \in F^2_q$
    2. 2.
      Encrypt message with Poseidon Encryption scheme: $C_{TX}=ENC(k, TX)$
Solve and Decrypt Time-lock Puzzle (sequencer)
  1. 1.
    Solve time-lock puzzle
    1. 1.
      Receive public parameter: $N, T$
    2. 2.
      Compute symmetric key: $S_K = g^{2^T} mod \; N$
  2. 2.
    Decrypt cipher text
    1. 1.
      Generate symmetric key on an elliptic curve $k = (k_0, k_1) \gets JubJubAffine(S_K) \in F^2_q$
    2. 2.
      Decrypt message with Poseidon encryption scheme: $TX = DEC(C_{TX}, k)$

Order commitment

The sequencer determines the order of the transactions and computes the order commitment before solving the timelock puzzle. The commitment is committed to the data availability (DA) or settlement layer, then to the user, which is used to verify that the sequencer submitted the transactions to the rollup in order.
[proposed] To compute the order commitment, hash chaining is used. The sequencer receives a new transaction from the user, verifies the zk proof, and finalizes the order before decrypting it. For each transaction, the sequencer computes Keccak256(block height | tx hash) value and adds it to the hash chain. And also we consider bringing in MMR for better performance.