@@ -103,14 +103,13 @@ impl<'a> SubmitPrep<'a> {
103103 }
104104
105105 /// Encodes the rollup block into a sidecar.
106+ #[ instrument( skip( self ) , level = "debug" ) ]
106107 async fn build_sidecar ( & self ) -> eyre:: Result < BlobTransactionSidecar > {
107- let sidecar = self . block . encode_blob :: < SimpleCoder > ( ) . build ( ) ?;
108-
109- Ok ( sidecar)
108+ self . block . encode_blob :: < SimpleCoder > ( ) . build ( ) . map_err ( Into :: into)
110109 }
111110
112111 /// Build a signature and header input for the host chain transaction.
113- async fn build_input ( & self ) -> eyre:: Result < Vec < u8 > > {
112+ async fn build_input ( & self ) -> eyre:: Result < Bytes > {
114113 let ( v, r, s) = self . quincey_signature ( ) . await ?;
115114
116115 let header = Zenith :: BlockHeader {
@@ -120,16 +119,14 @@ impl<'a> SubmitPrep<'a> {
120119 rewardAddress : self . sig_request ( ) . ru_reward_address ,
121120 blockDataHash : * self . block . contents_hash ( ) ,
122121 } ;
123- debug ! ( ?header. hostBlockNumber, "built zenith block header" ) ;
124-
125- let data = Zenith :: submitBlockCall { header, v, r, s, _4 : Bytes :: new ( ) } . abi_encode ( ) ;
122+ let call = Zenith :: submitBlockCall { header, v, r, s, _4 : Bytes :: new ( ) } ;
126123
127- Ok ( data )
124+ Ok ( call . abi_encode ( ) . into ( ) )
128125 }
129126
130127 /// Create a new transaction request for the host chain.
131128 async fn new_tx_request ( & self ) -> eyre:: Result < TransactionRequest > {
132- let nonce =
129+ let nonce: u64 =
133130 self . provider . get_transaction_count ( self . provider . default_signer_address ( ) ) . await ?;
134131
135132 let ( sidecar, input) = try_join ! ( self . build_sidecar( ) , self . build_input( ) ) ?;
@@ -144,7 +141,6 @@ impl<'a> SubmitPrep<'a> {
144141 }
145142
146143 /// Prepares a transaction for submission to the host chain.
147- #[ instrument( skip_all, level = "debug" ) ]
148144 pub async fn prep_transaction ( self , prev_host : & Header ) -> eyre:: Result < Bumpable > {
149145 let req = self . new_tx_request ( ) . in_current_span ( ) . await ?;
150146 Ok ( Bumpable :: new ( req, prev_host) )
0 commit comments