@@ -671,6 +671,28 @@ static CREATE_BLOCK_SIGNATURES_INDEX: &str = r#"
671
671
CREATE INDEX IF NOT EXISTS idx_block_signatures_by_sighash ON block_signatures(signer_signature_hash);
672
672
"# ;
673
673
674
+ static DROP_BLOCK_REJECTION_SIGNER_ADDRS : & str = r#"
675
+ DROP TABLE IF EXISTS block_rejection_signer_addrs;
676
+ "# ;
677
+
678
+ static CREATE_BLOCK_REJECTION_SIGNER_ADDRS_V17 : & str = r#"
679
+ CREATE TABLE IF NOT EXISTS block_rejection_signer_addrs (
680
+ -- The block sighash commits to all of the stacks and burnchain state as of its parent,
681
+ -- as well as the tenure itself so there's no need to include the reward cycle. Just
682
+ -- the sighash is sufficient to uniquely identify the block across all burnchain, PoX,
683
+ -- and stacks forks.
684
+ signer_signature_hash TEXT NOT NULL,
685
+ -- the signer address that rejected the block
686
+ signer_addr TEXT NOT NULL,
687
+ -- the reject reason code
688
+ reject_code INTEGER NOT NULL,
689
+ PRIMARY KEY (signer_addr, signer_signature_hash)
690
+ ) STRICT;"# ;
691
+
692
+ static CREATE_BLOCK_REJECTION_SIGNER_ADDRS_INDEX : & str = r#"
693
+ CREATE INDEX IF NOT EXISTS idx_block_rejection_signer_addrs_by_sighash ON block_rejection_signer_addrs(signer_signature_hash);
694
+ "# ;
695
+
674
696
static SCHEMA_1 : & [ & str ] = & [
675
697
DROP_SCHEMA_0 ,
676
698
CREATE_DB_CONFIG ,
@@ -785,6 +807,9 @@ static SCHEMA_17: &[&str] = &[
785
807
DROP_BLOCK_SIGNATURES_TABLE ,
786
808
CREATE_BLOCK_SIGNATURES_TABLE_V17 ,
787
809
CREATE_BLOCK_SIGNATURES_INDEX ,
810
+ DROP_BLOCK_REJECTION_SIGNER_ADDRS ,
811
+ CREATE_BLOCK_REJECTION_SIGNER_ADDRS_V17 ,
812
+ CREATE_BLOCK_REJECTION_SIGNER_ADDRS_INDEX ,
788
813
"INSERT INTO db_config (version) VALUES (17);" ,
789
814
] ;
790
815
0 commit comments