Skip to content

Commit

Permalink
fix L2MsgHashes
Browse files Browse the repository at this point in the history
  • Loading branch information
gusiri committed Oct 16, 2024
1 parent b91ff20 commit 4cdf298
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions prover/backend/aggregation/craft.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const (
func collectFields(cfg *config.Config, req *Request) (*CollectedFields, error) {

var (
l2MessageHashes []string
l2MsgBlockOffsets []bool
cf = &CollectedFields{
allL2MessageHashes []string
l2MsgBlockOffsets []bool
cf = &CollectedFields{
L2MsgTreeDepth: l2MsgMerkleTreeDepth,
ParentAggregationLastBlockTimestamp: uint(req.ParentAggregationLastBlockTimestamp),
LastFinalizedL1RollingHash: req.ParentAggregationLastL1RollingHash,
Expand All @@ -55,9 +55,10 @@ func collectFields(cfg *config.Config, req *Request) (*CollectedFields, error) {
for i, execReqFPath := range req.ExecutionProofs {

var (
po = &execution.Response{}
fpath = path.Join(cfg.Execution.DirTo(), execReqFPath)
f = files.MustRead(fpath)
po = &execution.Response{}
l2MessageHashes []string
fpath = path.Join(cfg.Execution.DirTo(), execReqFPath)
f = files.MustRead(fpath)
)

if err := json.NewDecoder(f).Decode(po); err != nil {
Expand Down Expand Up @@ -166,7 +167,7 @@ func collectFields(cfg *config.Config, req *Request) (*CollectedFields, error) {
}

cf.L2MessagingBlocksOffsets = utils.HexEncodeToString(PackOffsets(l2MsgBlockOffsets))
cf.L2MsgRootHashes = PackInMiniTrees(l2MessageHashes)
cf.L2MsgRootHashes = PackInMiniTrees(allL2MessageHashes)

return cf, nil

Expand Down

0 comments on commit 4cdf298

Please sign in to comment.