Commit Graph

30 Commits

Author SHA1 Message Date
Benjamin Diamond 4770d48a74 kill add function
as of 445cef33d1, no longer used.
2019-05-12 15:51:28 -04:00
Benjamin Diamond 6ef82cf683 fixed compute u
Now agrees with "ProofUtils.paddedHash("Zether", epoch)"
2019-03-13 15:40:03 -04:00
Benjamin Diamond 73a068395f compute u adjustments 2019-03-13 14:50:23 -04:00
Benjamin Diamond 14f19ee010 successfully changed post --> get
Now, no "request header too large" errors when sending using anonymity set. works! Actually, no changes were required on the Java side.

solves part of https://github.com/QuorumEngineering/BulletProofPOC/issues/4
2019-03-11 10:46:42 -04:00
Benjamin Diamond 3ccca85727 bug fixed: justifying byte slices
Default is left-justify, not right; caused failure to parse point occasionally.
2019-03-07 11:45:36 -05:00
Benjamin Diamond 93b1c4c0f6 kill "adjust" function
This is only necessary if you attempt to track `acc` locally. Have to re-pull everything _anyway_ for transfers; thus only relevant for withdrawals. seems not worth it probably
2019-03-06 19:19:56 -05:00
Benjamin Diamond 29476d08e5 eliminate readBalance start >=0 check
subtle stuff: even though proposed debits are compared against the account state for proof generation, they are ultimately added to pTransfers when the thing goes through. this means that the value in pTransfers can sometimes be negative even during normal operation of the contract.
2019-03-06 17:23:48 -05:00
Benjamin Diamond 9f36d4db2d fixed bugs.
First successful transfer!
2019-03-06 12:58:41 -05:00
Benjamin Diamond 66e5fabdff string handling fixes 2019-03-06 10:37:57 -05:00
Benjamin Diamond 2427f18817 computeU function now works. burns work 2019-03-05 18:14:29 -05:00
Benjamin Diamond 8073d834e2 finalized add and adjust functions 2019-03-05 17:33:14 -05:00
Benjamin Diamond cc95beb46e finally have working mapInto
fixed some extremely difficult bugs.
2019-03-05 13:37:54 -05:00
Benjamin Diamond f83fbe9083 more fixes
burn also now needs to return an interface, as it needs to compute g_epoch ^ x in go and return it to JS.
2019-03-04 16:09:07 -05:00
Benjamin Diamond dbce5562a8 resurrect the "add" function
appears that i need it back now, now that rolling over is happening again
2019-03-04 16:00:10 -05:00
Benjamin Diamond 3a3589e076 epoch just an integer / string fixes
actually, still need to replicate the computation of u on the go side, will be a pain.
2019-03-04 15:57:51 -05:00
Benjamin Diamond 1c08c03895 compiles
At this point just a "rough draft" of what it will ultimately look like.
2019-03-03 15:48:19 -05:00
Benjamin Diamond 4da88cc73e stashing more progress
No idea if any of this works; still much to do...
2019-02-27 11:47:50 -05:00
Benjamin Diamond 3e377a11e9 stashing basic changes 2019-02-26 18:37:03 -05:00
Benjamin Diamond 3b511eb4ca remove superfluous variables 2019-02-26 17:25:28 -05:00
Benjamin Diamond 9755dc2e1f fixed bug in range checking
Previous version would have rejected as an "Invalid search range" a readBalance query which included the maximum possible size in its range. Note that the previous understood its parameters as a half-open interval [start, end), whereas now it understands them as a closed interval, [start, end].
2019-02-22 12:22:58 -05:00
Benjamin Diamond 960b24addc killed the add function
Glad to no longer need this... It was a bad fix
2019-02-20 16:27:17 -05:00
Benjamin Diamond ff7e4dfd4f small changes 2019-02-19 14:12:14 -05:00
zzy96 75aee1d1ab change field generator to comply with java side 2019-02-19 16:11:41 +08:00
zzy96 baeb66d3a4 geth precompiled/api is able to connect with rpc service outside 2019-02-18 18:26:46 +08:00
Benjamin Diamond 91d86556a7 refactors
Fixed bug (BigEndian.Uint64 requires length to be only 8 bytes) which caused undue failure in proof length checking...
2019-02-07 15:20:14 -05:00
Benjamin Diamond 5e60dd8671 various refactors
Moved (or rather copied) lots of the "prove transfer" computations to the geth side, so that the information can be easily passed back to the caller (and subsequently to the contract).
2019-02-07 13:39:51 -05:00
Benjamin Diamond c2ea1e8007 add elliptic add routine in zether
This is hopefully a temporary solution. Much better would be to get full utilities within the geth console.
2019-02-06 16:55:38 -05:00
Benjamin Diamond d23d629c23 rename create --> prove, add proof type 2019-02-06 14:47:35 -05:00
Benjamin Diamond 3c98621de1 ready for java integration
Also added support for specifying a range in ReadBalance
2019-02-06 10:22:15 -05:00
Benjamin Diamond a349741c26 rename zsc --> zether
avoids a name collision with the ZSC smart contract.
2019-02-05 17:12:19 -05:00