Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cometbft contract #21

Merged
merged 2 commits into from
May 27, 2024
Merged

fix: cometbft contract #21

merged 2 commits into from
May 27, 2024

Conversation

j75689
Copy link
Collaborator

@j75689 j75689 commented May 27, 2024

Description

  1. In the cometbft contract, if there is any error when executing apply_light_block, an Error error code will be returned instead of returning validatorSetChanged=false.
  2. relayer and bls key should be updated and encoded to bytes.

Related

https://github.com/bnb-chain/op-geth/blob/f9643c4e38c6911714bdae55a3f1bb937100c2be/core/vm/lightclient/lightclient.go#L86
https://github.com/bnb-chain/op-geth/blob/f9643c4e38c6911714bdae55a3f1bb937100c2be/core/vm/contracts.go#L1322

Copy link
Contributor

github-actions bot commented May 27, 2024

Valgrind Results:

==5261== Cachegrind, a cache and branch-prediction profiler
==5261== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==5261== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==5261== Command: target/release/snailtracer
==5261== 
--5261-- warning: L3 cache found, using its data for the LL simulation.
==5261== brk segment overflow in thread #1: can't grow to 0x4cb4000
==5261== (see section Limitations in user manual)
==5261== NOTE: further instances of this message will not be shown
Snailtracer Host+Interpreter benchmark (5.7s) ... 1_753_142_871.000 ns/iter (1.000 R²)
==5261== 
==5261== I   refs:      1,348,416,905
==5261== I1  misses:            7,703
==5261== LLi misses:            3,060
==5261== I1  miss rate:          0.00%
==5261== LLi miss rate:          0.00%
==5261== 
==5261== D   refs:        677,296,448  (452,038,814 rd   + 225,257,634 wr)
==5261== D1  misses:        1,227,924  (    686,154 rd   +     541,770 wr)
==5261== LLd misses:          201,148  (      4,162 rd   +     196,986 wr)
==5261== D1  miss rate:           0.2% (        0.2%     +         0.2%  )
==5261== LLd miss rate:           0.0% (        0.0%     +         0.1%  )
==5261== 
==5261== LL refs:           1,235,627  (    693,857 rd   +     541,770 wr)
==5261== LL misses:           204,208  (      7,222 rd   +     196,986 wr)
==5261== LL miss rate:            0.0% (        0.0%     +         0.1%  )

@j75689 j75689 changed the title fix: return error if apply_light_block failed fix: cometbft contract May 27, 2024
@unclezoro unclezoro merged commit 4be2578 into develop May 27, 2024
22 of 24 checks passed
j75689 added a commit that referenced this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants