diff --git a/README.md b/README.md index 278299d..44c7632 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ With that ZK program compilation takes just a few seconds. Check out the demo at [https://skyward.run](https://skyward.run). The code for it is in [examples/example-vite](./examples/example-vite) folder. -You could see pre-cached compilation is 4-5x faster. After you refresh the page, the improvement is about 15x, which is considerable for a repeat user. +You could see pre-cached compilation is 2-5x faster, on mobile and desktop. +After you refresh the page, the improvement is about 15x on mobile, which is considerable for a repeat user. More complex ZK program you have, more the difference is. ## Installation diff --git a/examples/example-vite/src/data/skyward.json b/examples/example-vite/src/data/skyward.json index 3150f9e..32997e5 100644 --- a/examples/example-vite/src/data/skyward.json +++ b/examples/example-vite/src/data/skyward.json @@ -1 +1 @@ -{"version":"1","programs":{"uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I":{"name":"hello-program","verificationKey":{"data":"AAAxHIvaXF+vRj2/+pyAfE6U29d1K5GmGbhiKR9lTC6LJ2o1ygGxXERl1oQh6DBxf/hDUD0HOeg/JajCp3V6b5wytil2mfx8v2DB5RuNQ7VxJWkha0TSnJJsOl0FxhjldBbOY3tUZzZxHpPhHOKHz/ZAXRYFIsf2x+7boXC0iPurETHN7j5IevHIgf2fSW8WgHZYn83hpVI33LBdN1pIbUc7oWAUQVmmgp04jRqTCYK1oNg+Y9DeIuT4EVbp/yN7eS7Ay8ahic2sSAZvtn08MdRyk/jm2cLlJbeAAad6Xyz/H9l7JrkbVwDMMPxvHVHs27tNoJCzIlrRzB7pg3ju9aQOu4h3thDr+WSgFQWKvcRPeL7f3TFjIr8WZ2457RgMcTwXwORKbqJCcyKVNOE+FlNwVkOKER+WIpC0OlgGuayPFwQQkbb91jaRlJvahfwkbF2+AJmDnavmNpop9T+/Xak1adXIrsRPeOjC+qIKxIbGimoMOoYzYlevKA80LnJ7HC0IxR+yNLvoSYxDDPNRD+OCCxk5lM2h8IDUiCNWH4FZNJ+doiigKjyZlu/xZ7jHcX7qibu/32KFTX85DPSk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roKqsggzLBy/IjAfxS0BxFy5zywXqp+NogFkoTEJmR5MaqOkPfap+OsD1lGScY6+X4WW/HqCWrmA3ZTqDGngQMTGXLCtl6IS/cQpihS1NRbNqOtKTaCB9COQu0oz6RivBlywuaj3MKUdmbQ2gVDj+SGQItCNaXawyPSBjB9VT+68SoJVySQsYPCuEZCb0V/40n/a7RAbyrnNjP+2HwD7p27Pl1RSzqq35xiPdnycD1UeEPLpx/ON65mYCkn+KLQZmkqPio+vA2KmJngWTx+ol4rVFimGm76VT0xCFDsu2K0YX0yoLNH4u2XfmT9NR8gGfkVRCnnNjlbgHQmEwC75+GmEJ5DjD3d+s6IXTQ60MHvxbTHHlnfmPbgKn2SAI0uVoewKC9GyK6dSaboLw3C48jl0E2kyc+7umhCk3kEeWmt//GSjRNhoq+B+mynXiOtgFs/Am2v1TBjSb+6tcijsf5tFJmeGxlCjJnTdNWBkSHpMoo6OFkkpA6/FBAUHLSM7Yv8oYyd0GtwF5cCwQ6aRTbl9oG/mUn5Q92OnDMQcUjpgEho0Dcp2OqZyyxqQSPrbIIZZQrS2HkxBgjcfcSTuSHo7ONqlRjLUpO5yS95VLGXBLLHuCiIMGT+DW6DoJRtRIS+JieVWBoX0YsWgYInXrVlWUv6gDng5AyVFkUIFwZk7/3mVAgvXO83ArVKA4S747jT60w5bgV4Jy55slDM=","hash":"uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I"},"files":{"srs-fq-32768.header":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fq-32768.header","integrity":"sha384-6VwJKiwVHDvWFkDQxsp67QbFnTz45IU0NUWRanXIA38s1maorH1OXvYJHeR5u59U"},"srs-fq-32768":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fq-32768","integrity":"sha384-tMtPofIUE-IUh3-P4e73x6kExbo75d1OxKdhxX9fNVEqMP2T9iwNERfrGU0MoPYD"},"srs-fp-65536.header":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fp-65536.header","integrity":"sha384-eThPovjIjgJIZwy9XlkDNCgBeGyHm3_mgNu1pfszISXN5s1jcSqxe62yDK2cuW_I"},"srs-fp-65536":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fp-65536","integrity":"sha384-FEtfEGpBVVkU9g0kFlwEhGJaW5-_TXFnQllx05egnz6zLUK55plX_ea1ak7ozEdF"},"step-vk-hello-program-addition.header":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/step-vk-hello-program-addition.header","integrity":"sha384-lrq1sLrJy6xm4L_giSvERrufW3BHK5HLsfIoafDVeXAhF3nxenambwvM9DnGWmkl"},"step-vk-hello-program-addition":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/step-vk-hello-program-addition","integrity":"sha384-nKo2lXtvyIS1fsMnZh98DnIV5QA9Y4eY28viRP_WYhGyakecslRY0-_jwA9Py0Nh"},"lagrange-basis-fp-512.header":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/lagrange-basis-fp-512.header","integrity":"sha384-reLFjS1GdZYbrxRz2bVULQryJXjMGf2wo312oLugcaDLjU8tmBdq_4QLBR_lsy4C"},"lagrange-basis-fp-512":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/lagrange-basis-fp-512","integrity":"sha384-GnRksOhIsZPKmel-oLGfVAruDkSgJSdsvmkFYJki-GVt9QKFfzgvyilFiZHJgWXH"},"wrap-vk-hello-program.header":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/wrap-vk-hello-program.header","integrity":"sha384-VG9qKkbKAOdXQ-pGCTgPYQWclKhoNb_7bqzHGjZUjbBwK2h5AKwKlzt5OC30F3i2"},"wrap-vk-hello-program":{"dataType":"string","href":"https://swrd.ukstv.me/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/wrap-vk-hello-program","integrity":"sha384-0wJkNgr27ZHluVb6e0UZyLQypWSPFHR9nYjBtedRWN0De52Kd0GPmwutKprjs12E"}}}}} \ No newline at end of file +{"version":"1","programs":{"uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I":{"name":"hello-program","verificationKey":{"data":"AAAxHIvaXF+vRj2/+pyAfE6U29d1K5GmGbhiKR9lTC6LJ2o1ygGxXERl1oQh6DBxf/hDUD0HOeg/JajCp3V6b5wytil2mfx8v2DB5RuNQ7VxJWkha0TSnJJsOl0FxhjldBbOY3tUZzZxHpPhHOKHz/ZAXRYFIsf2x+7boXC0iPurETHN7j5IevHIgf2fSW8WgHZYn83hpVI33LBdN1pIbUc7oWAUQVmmgp04jRqTCYK1oNg+Y9DeIuT4EVbp/yN7eS7Ay8ahic2sSAZvtn08MdRyk/jm2cLlJbeAAad6Xyz/H9l7JrkbVwDMMPxvHVHs27tNoJCzIlrRzB7pg3ju9aQOu4h3thDr+WSgFQWKvcRPeL7f3TFjIr8WZ2457RgMcTwXwORKbqJCcyKVNOE+FlNwVkOKER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ge9IDYwXckBUXb5ikD3alrrv5mvMu6itB7ix2f8lbiF9Fkmc4Bk2ycIWXJDCuBN+2sTFqzUeoT6xY8XWaOcnDvqOgSm/CCSv38umiOE2jEpsKYxhRc6W70UJkrzd3hr2DiSF1I2B+krpUVK1GeOdCLC5sl7YPzk+pF8183uI9wse6UTlqIiroKqsggzLBy/IjAfxS0BxFy5zywXqp+NogFkoTEJmR5MaqOkPfap+OsD1lGScY6+X4WW/HqCWrmA3ZTqDGngQMTGXLCtl6IS/cQpihS1NRbNqOtKTaCB9COQu0oz6RivBlywuaj3MKUdmbQ2gVDj+SGQItCNaXawyPSBjB9VT+68SoJVySQsYPCuEZCb0V/40n/a7RAbyrnNjP+2HwD7p27Pl1RSzqq35xiPdnycD1UeEPLpx/ON65mYCkn+KLQZmkqPio+vA2KmJngWTx+ol4rVFimGm76VT0xCFDsu2K0YX0yoLNH4u2XfmT9NR8gGfkVRCnnNjlbgHQmEwC75+GmEJ5DjD3d+s6IXTQ60MHvxbTHHlnfmPbgKn2SAI0uVoewKC9GyK6dSaboLw3C48jl0E2kyc+7umhCk3kEeWmt//GSjRNhoq+B+mynXiOtgFs/Am2v1TBjSb+6tcijsf5tFJmeGxlCjJnTdNWBkSHpMoo6OFkkpA6/FBAUHLSM7Yv8oYyd0GtwF5cCwQ6aRTbl9oG/mUn5Q92OnDMQcUjpgEho0Dcp2OqZyyxqQSPrbIIZZQrS2HkxBgjcfcSTuSHo7ONqlRjLUpO5yS95VLGXBLLHuCiIMGT+DW6DoJRtRIS+JieVWBoX0YsWgYInXrVlWUv6gDng5AyVFkUIFwZk7/3mVAgvXO83ArVKA4S747jT60w5bgV4Jy55slDM=","hash":"uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I"},"files":{"srs-fq-32768.header":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fq-32768.header","integrity":"sha384-6VwJKiwVHDvWFkDQxsp67QbFnTz45IU0NUWRanXIA38s1maorH1OXvYJHeR5u59U"},"srs-fq-32768":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fq-32768","integrity":"sha384-tMtPofIUE-IUh3-P4e73x6kExbo75d1OxKdhxX9fNVEqMP2T9iwNERfrGU0MoPYD"},"srs-fp-65536.header":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fp-65536.header","integrity":"sha384-eThPovjIjgJIZwy9XlkDNCgBeGyHm3_mgNu1pfszISXN5s1jcSqxe62yDK2cuW_I"},"srs-fp-65536":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/srs-fp-65536","integrity":"sha384-FEtfEGpBVVkU9g0kFlwEhGJaW5-_TXFnQllx05egnz6zLUK55plX_ea1ak7ozEdF"},"step-vk-hello-program-addition.header":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/step-vk-hello-program-addition.header","integrity":"sha384-lrq1sLrJy6xm4L_giSvERrufW3BHK5HLsfIoafDVeXAhF3nxenambwvM9DnGWmkl"},"step-vk-hello-program-addition":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/step-vk-hello-program-addition","integrity":"sha384-nKo2lXtvyIS1fsMnZh98DnIV5QA9Y4eY28viRP_WYhGyakecslRY0-_jwA9Py0Nh"},"lagrange-basis-fp-512.header":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/lagrange-basis-fp-512.header","integrity":"sha384-reLFjS1GdZYbrxRz2bVULQryJXjMGf2wo312oLugcaDLjU8tmBdq_4QLBR_lsy4C"},"lagrange-basis-fp-512":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/lagrange-basis-fp-512","integrity":"sha384-GnRksOhIsZPKmel-oLGfVAruDkSgJSdsvmkFYJki-GVt9QKFfzgvyilFiZHJgWXH"},"wrap-vk-hello-program.header":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/wrap-vk-hello-program.header","integrity":"sha384-VG9qKkbKAOdXQ-pGCTgPYQWclKhoNb_7bqzHGjZUjbBwK2h5AKwKlzt5OC30F3i2"},"wrap-vk-hello-program":{"dataType":"string","href":"https://d.skyward.run/JttCSnUZRUdjNYcRrnzbN/uJS7R9Qnl78lcuvLU7yVsZaAVYD_otIMyBjj8G2XV42I/wrap-vk-hello-program","integrity":"sha384-0wJkNgr27ZHluVb6e0UZyLQypWSPFHR9nYjBtedRWN0De52Kd0GPmwutKprjs12E"}}}}} \ No newline at end of file diff --git a/packages/skyward/README.md b/packages/skyward/README.md index 2b9766d..d85dc56 100644 --- a/packages/skyward/README.md +++ b/packages/skyward/README.md @@ -7,7 +7,8 @@ With that ZK program compilation takes just a few seconds. Check out the demo at [https://skyward.run](https://skyward.run). The code for it is in [examples/example-vite](https://github.com/ukstv/skyward/tree/main/examples/example-vite) folder. -You could see pre-cached compilation is 4-5x faster. After you refresh the page, the improvement is about 15x, which is considerable for a repeat user. +You could see pre-cached compilation is 2-5x faster, on mobile and desktop. +After you refresh the page, the improvement is about 15x on mobile, which is considerable for a repeat user. More complex ZK program you have, more the difference is. ## Installation