Skip to content

Commit

Permalink
kumquat testnet elfs (#1721)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyusufatik authored Jan 20, 2025
1 parent 1265a26 commit 9397151
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 15 deletions.
4 changes: 4 additions & 0 deletions bin/citrea/src/guests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ lazy_static! {
let mut m = HashMap::new();

m.insert(SpecId::Genesis, guest!("../../../resources/guests/risc0/testnet/batch-0.elf"));
m.insert(SpecId::Kumquat, guest!("../../../resources/guests/risc0/testnet/batch-1.elf"));

m
};
pub(crate) static ref BATCH_PROOF_DEVNET_GUESTS: HashMap<SpecId, (Digest, Vec<u8>)> = {
Expand All @@ -124,6 +126,8 @@ lazy_static! {
let mut m = HashMap::new();

m.insert(SpecId::Genesis, guest!("../../../resources/guests/risc0/testnet/light-0.elf"));
m.insert(SpecId::Kumquat, guest!("../../../resources/guests/risc0/testnet/light-0.elf"));

m
};
pub(crate) static ref LIGHT_CLIENT_DEVNET_GUESTS: HashMap<SpecId, (Digest, Vec<u8>)> = {
Expand Down
21 changes: 15 additions & 6 deletions crates/bitcoin-da/src/network_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,21 @@ pub const INITIAL_MAINNET_STATE: LatestDaState = LatestDaState {
};

pub const INITIAL_TESTNET4_STATE: LatestDaState = LatestDaState {
block_hash: [0; 32],
block_height: 0,
total_work: [0; 32],
current_target_bits: 0,
epoch_start_time: 0,
prev_11_timestamps: [0; 11],
block_hash: [
23, 127, 64, 127, 125, 161, 124, 0, 211, 77, 133, 12, 72, 88, 78, 207, 139, 187, 129, 203,
169, 14, 92, 196, 28, 174, 217, 21, 0, 0, 0, 0,
],
block_height: 65884,
total_work: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 41, 97, 206, 2, 179,
219, 94, 51, 54,
],
current_target_bits: 0x19078cc7,
epoch_start_time: 1736771729,
prev_11_timestamps: [
1737353678, 1737350076, 1737351277, 1737352478, 1737353679, 1737354880, 1737347673,
1737348874, 1737350075, 1737351276, 1737352477,
],
};

pub const INITIAL_SIGNET_STATE: LatestDaState = LatestDaState {
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/forks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub const MAINNET_FORKS: [Fork; 1] = [Fork::new(SpecId::Kumquat, 0)];

pub const TESTNET_FORKS: [Fork; 2] = [
Fork::new(SpecId::Genesis, 0),
Fork::new(SpecId::Kumquat, u64::MAX),
Fork::new(SpecId::Kumquat, 5546000), // will be reached Jan 24 2025 ~7 PM
];

pub const DEVNET_FORKS: [Fork; 2] = [
Expand Down
2 changes: 1 addition & 1 deletion crates/sovereign-sdk/rollup-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern crate alloc;
///
/// Mostly used for web3_clientVersion RPC calls and might be used for other purposes.
#[cfg(feature = "native")]
pub const CITREA_VERSION: &str = "v0.5.5";
pub const CITREA_VERSION: &str = "v0.6.0";

/// Fork module
pub mod fork;
Expand Down
2 changes: 2 additions & 0 deletions crates/sovereign-sdk/rollup-interface/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pub enum SpecId {
/// 1. the light client proof
/// 2. EVM cancun upgrade (with no kzg precompile)
/// 3. Don't use borsh when signing SoftConfirmation's
/// 4. Better usage of DA layer by committing only the hash
/// of the smart contracts to state
Kumquat = 1,
/// Fork2 spec
#[cfg(feature = "testing")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ const NETWORK: Network = match option_env!("CITREA_NETWORK") {
const L2_GENESIS_ROOT: [u8; 32] = {
let hex_root = match NETWORK {
Network::Mainnet => "0000000000000000000000000000000000000000000000000000000000000000",
// TODO: Update this after finding out the first batch prover output of the next release
Network::Testnet => "05183faf24857f0fa6d4a7738fe5ef14b7ebe88be0f66e6f87f461485554d531",
Network::Testnet => "30137f8bc0844bbbe0a324c17cb3a1920b086c6f8a2e11999f77299455c33079",
Network::Devnet => "c6584931466a25793f7f4d6d512d0ce53af4067d3ac61af20df968f5835d3743",
Network::Nightly | Network::TestNetworkWithForks => match option_env!("L2_GENESIS_ROOT") {
Some(hex_root) => hex_root,
Expand Down Expand Up @@ -56,9 +55,9 @@ const INITIAL_BATCH_PROOF_METHOD_IDS: &[(u64, [u32; 8])] = {
),
),
(
999999999,
5546000,
decode_to_u32_array(
"3631d90630a3f0deb47f3a3411fe6e7ede1b0d86ad4216c75041e1a2020f009f",
"b4a441f12ec8eb7e53967198bf006e98c2898cfe4ef68757d3d40918254e6bce",
),
),
],
Expand Down Expand Up @@ -115,7 +114,7 @@ const BATCH_PROVER_DA_PUBLIC_KEY: [u8; 33] = {
pub const METHOD_ID_UPGRADE_AUTHORITY_DA_PUBLIC_KEY: [u8; 33] = {
let hex_pub_key = match NETWORK {
Network::Mainnet => "000000000000000000000000000000000000000000000000000000000000000000",
Network::Testnet => "000000000000000000000000000000000000000000000000000000000000000000",
Network::Testnet => "03796a3a8a86ff1cc37437585f0450f6059c397c01bce06bfbaaa36242f7ebfc02",
Network::Devnet => "0388e988066db18e19750fa92aa0fbf9c85104be2b5b507ce0aa7f30f3fe24b1ac",
Network::Nightly | Network::TestNetworkWithForks => {
match option_env!("METHOD_ID_UPGRADE_AUTHORITY_DA_PUBLIC_KEY") {
Expand Down
Binary file added resources/guests/risc0/testnet/batch-1.elf
Binary file not shown.
Binary file modified resources/guests/risc0/testnet/light-0.elf
Binary file not shown.
4 changes: 2 additions & 2 deletions resources/scripts/fork1-data-pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import json

def json_rpc_req(method, params):
url = "https://rpc.devnet.citrea.xyz"
url = "https://rpc.testnet.citrea.xyz"
payload = json.dumps({
"jsonrpc": "2.0",
"id": 1,
Expand Down Expand Up @@ -44,7 +44,7 @@ def get_sequencer_commitments_on_slot_by_number(number):
sequencer_commitments = get_sequencer_commitments_on_slot_by_number(i)

if sequencer_commitments is not None:
print("Found sequencer commitment(s) on slot:\t", i, "using first one.")
print("Found", len(sequencer_commitments), "sequencer commitment(s) on slot:\t", i, "using first one.")
sequencer_commitment = sequencer_commitments[0]

print("Sequencer commitment start:\t", sequencer_commitment['l2StartBlockNumber'], "\tend:\t", sequencer_commitment['l2EndBlockNumber'])
Expand Down

0 comments on commit 9397151

Please sign in to comment.