Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circuits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ docker compose up -d
# export BITCOIN_NETWOKR=regtest

# testnet
# export BITCOIN_NETWOKR=testnet
# export BITCOIN_NETWOKR=testnet4
# export ESPLORA_URL=https://mempool.space/testnet/api


Expand Down
2 changes: 1 addition & 1 deletion circuits/cron-header-chain-proof.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ batch=${2:-$_batch}
function find_input_proof() {
local start="$1"
local input_file
input_file=$(find $DATA -maxdepth 1 -type f -name '*-*.bin' -printf '%f\n' |
input_file=$(find $DATA -maxdepth 1 -type f -regex '.*[0-9]+-[0-9]+\.bin$' -printf '%f\n' |
awk -v sum="$start" -F '[-.]' '($1 + $2) == sum { print $0; exit }')

if [ ! $input_file ]; then
Expand Down
4 changes: 3 additions & 1 deletion circuits/header-chain-proof/host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ impl ProofBuilder for HeaderChainProofBuilder {
let prev_receipt = if *init_input {
None
} else {
let public_inputs = fs::read(&format!("{}.public_inputs.bin", input_proof)).unwrap();
let public_inputs = fs::read(&format!("{}.public_inputs.bin", input_proof)).expect(
&format!("Failed to read public inputs from {}.public_inputs.bin", input_proof),
);
Some(public_inputs)
};

Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions crates/store/migrations/20250814113519_create_graph_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ CREATE TABLE graph
`init_withdraw_tx_hash` TEXT,
`bridge_out_start_at` BIGINT NOT NULL DEFAULT 0,
`zkm_version` TEXT NOT NULL DEFAULT '',
`status_updated_at` BIGINT NOT NULL DEFAULT 0,
`proceed_withdraw_height` BIGINT NOT NULL DEFAULT 0,
`created_at` BIGINT NOT NULL DEFAULT 0,
`updated_at` BIGINT NOT NULL DEFAULT 0,
PRIMARY KEY (`graph_id`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CREATE TABLE message
`state` TEXT NOT NULL DEFAULT 'pending',
`lock_time_until` BIGINT NOT NULL DEFAULT 0,
`weight` BIGINT NOT NULL DEFAULT 0,
`message_version` BIGINT NOT NULL DEFAULT 0,
`created_at` BIGINT NOT NULL DEFAULT 0,
`updated_at` BIGINT NOT NULL DEFAULT 0,
PRIMARY KEY (`message_id`)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ CREATE TABLE instance
`pegin_data_tx_hash` TEXT NOT NULL DEFAULT '',
`btc_height` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`parameters` TEXT,
`escrow_hash` TEXT,
`bridge_out_amount` TEXT NOT NULL DEFAULT '0',
`bridge_out_lock_time` BIGINT NOT NULL DEFAULT 0,
`post_pegin_txhash` TEXT,
`status_updated_at` BIGINT NOT NULL DEFAULT 0,
`created_at` BIGINT NOT NULL DEFAULT 0,
`updated_at` BIGINT NOT NULL DEFAULT 0,
PRIMARY KEY (`instance_id`)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CREATE TABLE operator_proof
`total_time_to_proof` BIGINT NOT NULL DEFAULT 0,
`proving_time` BIGINT NOT NULL DEFAULT 0,
`zkm_version` TEXT NOT NULL DEFAULT '',
`operator_committed_blockhash` TEXT NOT NULL,
`extra` TEXT,
`created_at` BIGINT NOT NULL DEFAULT 0,
`updated_at` BIGINT NOT NULL DEFAULT 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ CREATE TABLE watchtower_proof
`total_time_to_proof` BIGINT NOT NULL DEFAULT 0,
`proving_time` BIGINT NOT NULL DEFAULT 0,
`zkm_version` TEXT NOT NULL DEFAULT '',
`node_index` INTEGER NOT NULL DEFAULT 0,
`included` BOOLEAN NOT NULL DEFAULT 0,
`extra` TEXT,
`created_at` BIGINT NOT NULL DEFAULT 0,
`updated_at` BIGINT NOT NULL DEFAULT 0
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

19 changes: 2 additions & 17 deletions crates/store/src/localdb.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::utils::{QueryBuilder, QueryParam, create_place_holders};
use crate::{
BridgeOutGlobalStats, GoatTxRecord, Graph, GraphBtcTxVoutMonitor, GraphRawData, Instance,
LongRunningTaskProof, Message, MessageBroadcast, Node, NodesOverview, OperatorProof,
PeginGraphProcessData, PeginInstanceProcessData, SerializableTxid, WatchContract,
WatchtowerProof,
LongRunningTaskProof, Message, Node, NodesOverview, OperatorProof, PeginGraphProcessData,
PeginInstanceProcessData, SerializableTxid, WatchContract, WatchtowerProof,
};

use indexmap::IndexMap;
Expand Down Expand Up @@ -2080,20 +2079,6 @@ impl<'a> StorageProcessor<'a> {
}
}

pub async fn find_message_broadcasts(
&mut self,
graph_status: &str,
) -> anyhow::Result<Vec<MessageBroadcast>> {
let records = sqlx::query_as!(
MessageBroadcast,
"SELECT graph_id AS \"graph_id:Uuid\", graph_status, msg_type, msg_times, created_at, updated_at
FROM message_broadcast
WHERE graph_status = ? ",
graph_status
).fetch_all(self.conn()).await?;
Ok(records)
}

pub async fn add_message_broadcast_times(
&mut self,
graph_id: &Uuid,
Expand Down
10 changes: 0 additions & 10 deletions crates/store/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,16 +521,6 @@ pub enum MessageType {
InstanceDiscarded,
}

#[derive(Clone, FromRow, Debug, Serialize, Deserialize, Default)]
pub struct MessageBroadcast {
pub graph_id: Uuid,
pub graph_status: String,
pub msg_type: String,
pub msg_times: i64,
pub updated_at: i64,
pub created_at: i64,
}

#[derive(Clone, Debug, Serialize, Deserialize, Default, Display, EnumString)]
pub enum WatchContractStatus {
#[default]
Expand Down
Loading