fromRLPSerializedBlock throws "invalid block. More values=20 than expected were received (at most 5)" following Cancun activation
              
              #3274
            
            
              
                Unanswered
              
          
                  
                    
                      solimander
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 1 reply
-
| 
         Yes, you are trying to import RLP fields of a  import { Chain, Common, Hardfork } from '@ethereumjs/common';
import { Block, BlockHeader } from '@ethereumjs/block';
const common = new Common({ chain: Chain.Goerli, hardfork: Hardfork.Cancun });
const run = async () => {
  const providerURL = 'https://goerli.infura.io/v3/your-infura-key';
  const block = await Block.fromJsonRpcProvider(providerURL, 10507619n, {
    common
  });
  const headerRLP = block.header.serialize();
  const blockFromHeader = BlockHeader.fromRLPSerializedHeader(headerRLP, { common });
  console.log({ blockFromHeader });
};
run();I.e. the only change is:   | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Block.fromRLPSerializedBlockthrowsinvalid block. More values=20 than expected were received (at most 5)when providing a Goerli block following the activation of the Cancun hardfork.Repro:
Beta Was this translation helpful? Give feedback.
All reactions