Update to follow DB spec

This commit is contained in:
a_bennassar
2020-07-31 15:55:09 +02:00
parent 819b29d9ba
commit 638defd031
16 changed files with 172 additions and 107 deletions

View File

@@ -7,14 +7,17 @@ import (
"github.com/iden3/go-iden3-crypto/babyjub"
)
// L1Tx is a struct that represents an already forged L1 tx
// WARNING: this struct is very unclear and a complete guess
// L1Tx is a struct that represents a L1 tx
type L1Tx struct {
Tx
PublicKey babyjub.PublicKey
LoadAmount *big.Int // amount transfered from L1 -> L2
EthBlockNum uint64
EthTxHash eth.Hash
Position int // Position among all the L1Txs in that batch
ToForgeL1TxsNumber uint32
UserOrigin bool // true if the tx was originated by a user, false if it was aoriginated by a coordinator. Note that this differ from the spec for implementation simplification purpposes
PublicKey babyjub.PublicKey
LoadAmount *big.Int // amount transfered from L1 -> L2
EthBlockNum uint64 // Ethereum Block Number in which this L1Tx was added to the queue
EthTxHash eth.Hash // TxHash that added this L1Tx to the queue
Position int // Position among all the L1Txs in that batch
ToForgeL1TxsNum uint32 // toForgeL1TxsNum in which the tx was forged / will be forged
FromBJJ babyjub.PublicKey
CreateAccount bool // "from" + token ID is a new account
FromEthAddr eth.Address
}