diff --git a/bindings/encoding/input.go b/bindings/encoding/input.go index d09741dd5..8ebd3290c 100644 --- a/bindings/encoding/input.go +++ b/bindings/encoding/input.go @@ -57,7 +57,7 @@ var ( Components: []abi.ArgumentMarshaling{ { Name: "tier", - Type: "uint64", + Type: "uint16", }, { Name: "fee", diff --git a/bindings/encoding/input_test.go b/bindings/encoding/input_test.go index d031ffb6e..f58d05fef 100644 --- a/bindings/encoding/input_test.go +++ b/bindings/encoding/input_test.go @@ -18,7 +18,7 @@ func TestEncodeEvidence(t *testing.T) { SignalRoot: randomHash(), Graffiti: randomHash(), Tier: uint16(rand.Uint64()), - Proofs: randomHash().Big().Bytes(), + Proof: randomHash().Big().Bytes(), } b, err := EncodeEvidence(evidence) @@ -32,7 +32,7 @@ func TestEncodeProverAssignment(t *testing.T) { &ProverAssignment{ Prover: common.BigToAddress(new(big.Int).SetUint64(rand.Uint64())), FeeToken: common.Address{}, - TierFees: []*TierFee{}, + TierFees: []TierFee{{Tier: 0, Fee: common.Big1}}, Signature: randomHash().Big().Bytes(), Expiry: 1024, }, diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index a3f848b8c..356aed5a0 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -36,7 +36,7 @@ type BlockEvidence struct { SignalRoot [32]byte Graffiti [32]byte Tier uint16 - Proofs []byte + Proof []byte } // TierFee should be same with TaikoData.TierFee. @@ -49,7 +49,7 @@ type TierFee struct { type ProverAssignment struct { Prover common.Address FeeToken common.Address - TierFees []*TierFee + TierFees []TierFee Expiry uint64 Signature []byte } diff --git a/proposer/proposer.go b/proposer/proposer.go index 37e42923e..cce0fa0aa 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -409,7 +409,7 @@ func (p *Proposer) ProposeTxList( &encoding.ProverAssignment{ Prover: prover, FeeToken: common.Address{}, - TierFees: []*encoding.TierFee{}, // TODO: update tier fees + TierFees: []encoding.TierFee{}, // TODO: update tier fees Expiry: uint64(proverAssignmentTimeout.Seconds()), Signature: signature, }, diff --git a/proposer/proposer_test.go b/proposer/proposer_test.go index 4508b2a8d..4da60efd3 100644 --- a/proposer/proposer_test.go +++ b/proposer/proposer_test.go @@ -175,7 +175,7 @@ func (s *ProposerTestSuite) TestSendProposeBlockTx() { &encoding.ProverAssignment{ Prover: prover, FeeToken: common.Address{}, - TierFees: []*encoding.TierFee{}, + TierFees: []encoding.TierFee{}, Expiry: uint64(proverAssignmentTimeout.Seconds()), Signature: signature, }, diff --git a/proposer/prover_selector/eth_fee_eoa_selector.go b/proposer/prover_selector/eth_fee_eoa_selector.go index 11784c89b..7644d82a1 100644 --- a/proposer/prover_selector/eth_fee_eoa_selector.go +++ b/proposer/prover_selector/eth_fee_eoa_selector.go @@ -227,7 +227,7 @@ func assignProver( encoded, err := encoding.EncodeProverAssignment(&encoding.ProverAssignment{ Prover: result.Prover, FeeToken: common.Address{}, - TierFees: []*encoding.TierFee{}, // TODO: update tier fees + TierFees: []encoding.TierFee{}, // TODO: update tier fees Expiry: reqBody.Expiry, Signature: result.SignedPayload, }) diff --git a/prover/proof_submitter/valid_proof_submitter.go b/prover/proof_submitter/valid_proof_submitter.go index a7e9dd864..4c1a88dfb 100644 --- a/prover/proof_submitter/valid_proof_submitter.go +++ b/prover/proof_submitter/valid_proof_submitter.go @@ -228,14 +228,14 @@ func (s *ValidProofSubmitter) SubmitProof( SignalRoot: proofWithHeader.Opts.SignalRoot, Graffiti: s.graffiti, Tier: 0, // TODO: update tier - Proofs: zkProof, + Proof: zkProof, } circuitsIdx, err := proofProducer.DegreeToCircuitsIdx(proofWithHeader.Degree) if err != nil { return err } - evidence.Proofs = append(uint16ToBytes(circuitsIdx), evidence.Proofs...) + evidence.Proof = append(uint16ToBytes(circuitsIdx), evidence.Proof...) input, err := encoding.EncodeEvidence(evidence) if err != nil { diff --git a/prover/prover.go b/prover/prover.go index ea054c07f..b9b386f36 100644 --- a/prover/prover.go +++ b/prover/prover.go @@ -461,16 +461,11 @@ func (p *Prover) onBlockProposed( p.cancelProof(ctx, event.Meta.Id) } - block, err := p.rpc.TaikoL1.GetBlock(&bind.CallOpts{Context: ctx}, event.BlockId.Uint64()) - if err != nil { - return err - } - log.Info( "Proposed block information", "blockID", event.BlockId, - "assignedProver", block.AssignedProver, - "proposedAt", block.ProposedAt, + "assignedProver", event.AssignedProver, + "minTier", event.MinTier, ) // TODO: add this back