mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Implement Pipeline.prepareForgeBatchArgs()
- Implement Pipeline.prepareForgeBatchArgs() - Add a minimal stress test for the coordinator (that also runs the synchronizer) - Update txprocessor.ProcessTxs() to return valid results for batches without transactions - Add the boilerplate for the corresponding test, leaving as TODO the zkInput values - Update prover client to use the same point format as proof server (projective) - Update interface of TxSelector.GetCoordIdxs to also return the authorizations to create accounts that go with the l1CoordinatorTxs.
This commit is contained in:
@@ -67,6 +67,50 @@ func (s *Mock) handleCancel(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, "OK")
|
||||
}
|
||||
|
||||
/* Status example from the real server proof:
|
||||
|
||||
Status:
|
||||
{
|
||||
"proof": "{\n \"pi_a\": [\n \"1368015179489954701390400359078579693043519447331113978918064868415326638035\",\n \"9918110051302171585080402603319702774565515993150576347155970296011118125764\",\n \"1\"\n ],\n \"pi_b\": [\n [\n \"10857046999023057135944570762232829481370756359578518086990519993285655852781\",\n \"11559732032986387107991004021392285783925812861821192530917403151452391805634\"\n ],\n [\n \"8495653923123431417604973247489272438418190587263600148770280649306958101930\",\n \"4082367875863433681332203403145435568316851327593401208105741076214120093531\"\n ],\n [\n \"1\",\n \"0\"\n ]\n ],\n \"pi_c\": [\n \"1368015179489954701390400359078579693043519447331113978918064868415326638035\",\n \"9918110051302171585080402603319702774565515993150576347155970296011118125764\",\n \"1\"\n ],\n \"protocol\": \"groth\"\n}\n",
|
||||
"pubData": "[\n \"8863150934551775031093873719629424744398133643983814385850330952980893030086\"\n]\n",
|
||||
"status": "success"
|
||||
}
|
||||
|
||||
proof:
|
||||
{
|
||||
"pi_a": [
|
||||
"1368015179489954701390400359078579693043519447331113978918064868415326638035",
|
||||
"9918110051302171585080402603319702774565515993150576347155970296011118125764",
|
||||
"1"
|
||||
],
|
||||
"pi_b": [
|
||||
[
|
||||
"10857046999023057135944570762232829481370756359578518086990519993285655852781",
|
||||
"11559732032986387107991004021392285783925812861821192530917403151452391805634"
|
||||
],
|
||||
[
|
||||
"8495653923123431417604973247489272438418190587263600148770280649306958101930",
|
||||
"4082367875863433681332203403145435568316851327593401208105741076214120093531"
|
||||
],
|
||||
[
|
||||
"1",
|
||||
"0"
|
||||
]
|
||||
],
|
||||
"pi_c": [
|
||||
"1368015179489954701390400359078579693043519447331113978918064868415326638035",
|
||||
"9918110051302171585080402603319702774565515993150576347155970296011118125764",
|
||||
"1"
|
||||
],
|
||||
"protocol": "groth"
|
||||
}
|
||||
|
||||
pubData:
|
||||
[
|
||||
"8863150934551775031093873719629424744398133643983814385850330952980893030086"
|
||||
]
|
||||
*/
|
||||
|
||||
func (s *Mock) handleStatus(c *gin.Context) {
|
||||
s.RLock()
|
||||
c.JSON(http.StatusOK, prover.Status{
|
||||
@@ -133,11 +177,11 @@ func (s *Mock) runProver(ctx context.Context) {
|
||||
s.counter++
|
||||
// Mock data
|
||||
s.proof = fmt.Sprintf(`{
|
||||
"pi_a": ["%v", "%v"],
|
||||
"pi_b": [["%v", "%v"],["%v", "%v"],["%v", "%v"]],
|
||||
"pi_c": ["%v", "%v"],
|
||||
"pi_a": ["%v", "%v", "1"],
|
||||
"pi_b": [["%v", "%v"],["%v", "%v"],["1", "0"]],
|
||||
"pi_c": ["%v", "%v", "1"],
|
||||
"protocol": "groth16"
|
||||
}`, i, i+1, i+2, i+3, i+4, i+5, i+6, i+7, i+8, i+9) //nolint:gomnd
|
||||
}`, i, i+1, i+2, i+3, i+4, i+5, i+6, i+7) //nolint:gomnd
|
||||
s.pubData = fmt.Sprintf(`[
|
||||
"%v"
|
||||
]`, i+42) //nolint:gomnd
|
||||
|
||||
Reference in New Issue
Block a user