Skip to content

Commit

Permalink
Merge pull request #104 from lukso-network/feature/l15-prod-resume
Browse files Browse the repository at this point in the history
Feature/l15 prod resume
  • Loading branch information
atif-konasl authored Oct 31, 2021
2 parents b92580f + fe0ea21 commit c6c97c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions consensus/pandora/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ func (p *Pandora) verifyHeader(chain consensus.ChainHeaderReader, header, parent

func (p *Pandora) VerifyBLSSignature(header *types.Header) error {
// decode the extraData byte

l15ProdValidBlock4728 := common.HexToHash("0xd5aa89dff5365a87d6ed489a58c4e9d570e90bce327c2d51449f9e9e2917f588")
if header.Hash() == l15ProdValidBlock4728 {
log.Info("l15ProdValidBlock4728 is received no need bls sign verification")
return nil
}

extraDataWithBLSSig := new(ExtraDataSealed)
if err := rlp.DecodeBytes(header.Extra, extraDataWithBLSSig); err != nil {
log.Error("Failed to decode extraData with signature", "err", err)
Expand Down
9 changes: 8 additions & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,13 @@ func (bc *BlockChain) notifyAndGetConfirmationFromOrchestrator(block *types.Bloc
log.Debug("notifyAndGetConfirmationFromOrchestrator", "sending header with header hash", block.Header().Hash(), "blockNumber", block.NumberU64())
bc.pendingHeaderContainer.NotifyHeader(block.Header())

l15ProdValidBlock4728 := common.HexToHash("0xd5aa89dff5365a87d6ed489a58c4e9d570e90bce327c2d51449f9e9e2917f588")

if block.Hash() == l15ProdValidBlock4728 {
log.Info("l15ProdValidBlock4728 block has received so no orchestrator verification is needed")
return NonStatTy, nil
}

retryLimit := orchestratorConfirmationRetrievalLimit
status := pandora_orcclient.Pending
var wg sync.WaitGroup
Expand Down Expand Up @@ -2829,6 +2836,6 @@ func (bc *BlockChain) ResumeL15ProdTestnet() {
log.Warn("Failed to resume l15 prod testnet, could not insert chain the side chain block with "+
"hash: %v and index %v", l15ProdValidBlock4728, index)
}
log.Info("Successfully resume l15 prod testnet. Current head %v with hash %v", newHead, l15ProdValidBlock4728)
log.Info("Successfully resume l15 prod testnet. Current head %v with hash %v","head", newHead, "blockHash", l15ProdValidBlock4728)
}
}

0 comments on commit c6c97c1

Please sign in to comment.