From 079b29c28877c04c85d61c666d53435535bddf8e Mon Sep 17 00:00:00 2001 From: Barrie Byron Date: Tue, 19 Sep 2023 11:57:13 -0400 Subject: [PATCH 1/2] o1js Pack edits for product name --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5433b13..8109219 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# O1JS Pack +# o1js Pack -Make the most of your ZKApp state! +Make the most of your zkApp state! ## What is it -O1JS Pack is a library for [O1JS](https://github.com/o1-labs/o1js/) that allows a zkapp developer to pack extra data into a single Field. +o1js Pack is a library for [O1JS](https://github.com/o1-labs/o1js/) that allows a zkApp developer to pack extra data into a single Field. -### Usage in a ZKApp +### Usage in a zkApp ``` import { @@ -25,9 +25,9 @@ const myPackedUInts = new MyPackedUInts(MyPackedUInts.pack(sevenUints), sevenUin ## What's the catch? -If a zkapp has two or more independent Fields of state, then preconditions can be set on just one, or on any combination of the Fields. With SnarkyPack, one precondition will be set on the packed Field, which means that independent updates cannot happen asynchronously. +If a zkApp has two or more independent Fields of state, then preconditions can be set on just one, or on any combination of the Fields. With o1js Pack, one precondition can be set on the packed Field, which means that independent updates cannot happen asynchronously. -For example, let's say there is a voting app with two independent Fields of state: `yesCount` and `noCount`. If one user issues an update to `yesCount` and another user issues an update to `noCount` at the same time, both proofs may be valid at the same time. Both transactions may succeed during the same block, since they don't interfere with each others' preconditions. With SnarkyPack, a devolper can save state by putting both `yesCount` and `noCount` into the same Field of state, making room for other state to exist on chain. The tradeoff is that two votes will no longer be able to be cast independently. `yesCount` and `noCount` depend on the same precontition, meaning that to update one or the other, you must lock both. +For example, let's say there is a voting app with two independent Fields of state: `yesCount` and `noCount`. If one user issues an update to `yesCount` and another user issues an update to `noCount` at the same time, both proofs may be valid at the same time. Both transactions may succeed during the same block, since they don't interfere with each others' preconditions. With o1js Pack, a developer can save state by putting both `yesCount` and `noCount` into the same Field of state, making room for other states to exist on chain. The tradeoff is that two votes will no longer be able to be cast independently. `yesCount` and `noCount` depend on the same precontition, meaning that to update one or the other, you must lock both. ## How to build @@ -50,7 +50,7 @@ npm run coverage ## Credits -Thanks to @mario_zito for seeding the idea for this library on discord ([Thread 1](https://discord.com/channels/484437221055922177/1128509274465779822), [Thread 2](https://discord.com/channels/484437221055922177/1128501705173106698)), and to @gregor for sounding out the early implementation. +Thanks to @mario_zito for seeding the idea for this library on Discord ([Thread 1](https://discord.com/channels/484437221055922177/1128509274465779822), [Thread 2](https://discord.com/channels/484437221055922177/1128501705173106698)), and to @gregor for sounding out the early implementation. Thanks to @iam-dev for early adoption! From 2b69a4dd7a953d0888ca6267fc574b23e59c4eef Mon Sep 17 00:00:00 2001 From: Barrie Byron Date: Tue, 19 Sep 2023 12:28:52 -0400 Subject: [PATCH 2/2] o1js --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8109219..242c351 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Make the most of your zkApp state! ## What is it -o1js Pack is a library for [O1JS](https://github.com/o1-labs/o1js/) that allows a zkApp developer to pack extra data into a single Field. +o1js Pack is a library for [o1js](https://github.com/o1-labs/o1js/) that allows a zkApp developer to pack extra data into a single Field. ### Usage in a zkApp