Skip to content

Commit

Permalink
consensus: remove Chain type
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Oct 31, 2023
1 parent 3740983 commit c9fef4f
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 152 deletions.
2 changes: 1 addition & 1 deletion consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub use timelocks::{
pub use tx::{
Outpoint, OutpointParseError, Sats, Tx, TxIn, TxOut, TxParseError, TxVer, Txid, Vout,
};
pub use util::{Chain, ChainParseError, NonStandardValue};
pub use util::NonStandardValue;
pub use weights::{VBytes, Weight, WeightUnits};

pub const LIB_NAME_BITCOIN: &str = "Bitcoin";
5 changes: 2 additions & 3 deletions consensus/src/stl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use strict_types::{CompileError, LibBuilder, TypeLib};

use crate::timelocks::TimeLockInterval;
use crate::{
Bip340Sig, BlockHeader, ByteStr, Chain, CompressedPk, ControlBlock, FutureLeafVer, InternalPk,
Bip340Sig, BlockHeader, ByteStr, CompressedPk, ControlBlock, FutureLeafVer, InternalPk,
LeafScript, LegacyPk, LegacySig, LockHeight, LockTimestamp, OpCode, OutputPk, PubkeyHash,
RedeemScript, ScriptHash, TapCode, TapLeafHash, TapNodeHash, TapScript, Tx, UncompressedPk,
VBytes, VarInt, WPubkeyHash, WScriptHash, WeightUnits, WitnessProgram, WitnessScript,
Expand All @@ -37,7 +37,7 @@ pub const LIB_ID_BITCOIN: &str =
pub const LIB_ID_BP_TX: &str =
"urn:ubideco:stl:6GgF7biXPVNcus2FfQj2pQuRzau11rXApMQLfCZhojgi#money-pardon-parody";
pub const LIB_ID_BP_CONSENSUS: &str =
"urn:ubideco:stl:GNfiA2ituWYdFjPE18bQ9daS2454EQ564j45gouM6ktn#shoe-film-vitamin";
"urn:ubideco:stl:2Am7WuApVoqv3Cqh4sqPPLbg4VxpQgDUz2fFgfWC1sTL#athlete-hexagon-puzzle";

#[deprecated(since = "0.10.8", note = "use _bp_tx_stl instead")]
fn _bitcoin_stl() -> Result<TypeLib, CompileError> { _bp_tx_stl() }
Expand Down Expand Up @@ -83,7 +83,6 @@ fn _bp_consensus_stl() -> Result<TypeLib, CompileError> {
.transpile::<Tx>()
.transpile::<VarInt>()
.transpile::<ByteStr>()
.transpile::<Chain>()
.transpile::<WeightUnits>()
.transpile::<VBytes>()
.compile()
Expand Down
86 changes: 0 additions & 86 deletions consensus/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
// limitations under the License.

use std::fmt::{Debug, Display};
use std::str::FromStr;

use crate::LIB_NAME_BITCOIN;

/// the provided value {value} for {matter} is non-standard; while it is
/// accepted by the bitcoin consensus rules, the software prohibits from using
Expand All @@ -37,86 +34,3 @@ pub struct NonStandardValue<T: Debug + Display> {
impl<T: Debug + Display> NonStandardValue<T> {
pub const fn with(value: T, matter: &'static str) -> Self { NonStandardValue { value, matter } }
}

#[derive(Clone, Eq, PartialEq, Debug, Display, Error)]
#[display("invalid blockchain name '{0}'")]
pub struct ChainParseError(String);

#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Display, Default)]
#[derive(StrictType, StrictEncode, StrictDecode)]
#[strict_type(lib = LIB_NAME_BITCOIN, tags = repr, into_u8, try_from_u8)]
#[derive(CommitEncode)]
#[commit_encode(strategy = strict)]
#[repr(u8)]
#[non_exhaustive]
pub enum Chain {
#[default]
#[display("mainnet")]
Bitcoin = 0x00,

#[display("testnet")]
Testnet3 = 0x83,

#[display("regtest")]
Regtest = 0x80,

#[display("signet")]
Signet = 0x84,
}

impl Chain {
#[inline]
pub fn is_test_chain(self) -> bool {
match self {
Chain::Bitcoin => false,
Chain::Testnet3 | Chain::Regtest | Chain::Signet => true,
}
}
}

impl FromStr for Chain {
type Err = ChainParseError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
let chain = s.to_lowercase();
Ok(match chain.as_str() {
"mainnet" | "bitcoin" => Chain::Bitcoin,
"testnet" | "testnet3" => Chain::Testnet3,
"regtest" => Chain::Regtest,
"signet" => Chain::Signet,
_ => return Err(ChainParseError(chain)),
})
}
}

#[cfg(feature = "serde")]
mod _serde {
use serde::de::Error;
use serde::{Deserialize, Deserializer, Serialize, Serializer};

use super::*;

impl Serialize for Chain {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer {
if serializer.is_human_readable() {
self.to_string().serialize(serializer)
} else {
(*self as u8).serialize(serializer)
}
}
}

impl<'de> Deserialize<'de> for Chain {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de> {
if deserializer.is_human_readable() {
let s = String::deserialize(deserializer)?;
Chain::from_str(&s).map_err(D::Error::custom)
} else {
let v = u8::deserialize(deserializer)?;
Chain::try_from(v).map_err(D::Error::custom)
}
}
}
}
115 changes: 57 additions & 58 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,72 +1,71 @@
-----BEGIN STRICT TYPE LIB-----
Id: urn:ubideco:stl:GNfiA2ituWYdFjPE18bQ9daS2454EQ564j45gouM6ktn
Id: urn:ubideco:stl:2Am7WuApVoqv3Cqh4sqPPLbg4VxpQgDUz2fFgfWC1sTL
Name: Bitcoin
Dependencies:
urn:ubideco:stl:9KALDYR8Nyjq4FdMW6kYoL7vdkWnqPqNuFnmE9qHpNjZ

B0JpdGNvaW4Be4SAPJ764hElp3wsObxw0v3o+UOuDf2c9OaC7cdmynADU3RkAQNT
dGQBAGGGItF7rvBmAt/ndcmA4LNrbrroCQ2AdfdRO+xLk/ZNBEJvb2w3AAlCaXAz
dGQBAGGGItF7rvBmAt/ndcmA4LNrbrroCQ2AdfdRO+xLk/ZNBEJvb2w2AAlCaXAz
NDBTaWcGAgNzaWcABwAAQEAADHNpZ2hhc2hfdHlwZQAEAgAEbm9uZQAAAAEEc29t
ZQAFAQHbF2Q+dwkTJ+gEmSSB1dxgFSMIlVM55Yszn9RMT3JIKglCbG9ja0hhc2gF
AQ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QXRrCHNlcXVlbmNlAQEZbYUpyPbaRE0VTo2cjL2eD42JAlo7sJEhxj1SsB6HB3dp
dG5lc3MBc3dDcDaTIEnNKJUIqnF844KdskUuVehO1PwuPM0uAJ0FVHhPdXQGAgV2
YWx1ZQGX9dcGQq4qM5IlO6hOHc7Ek+O/PtNxsYdzhjVOzIiCawxzY3JpcHRQdWJr
ZXkBvvwe/GalGf1kUmo6E4dA5/EQLQu+/zrBRk7z90B2dFwFVHhWZXIFAQAARARU
eGlkBQEABwAAQCAADlVuY29tcHJlc3NlZFBrBQEABwAAQEEABlZCeXRlcwUBAAAE
BlZhckludAUBAAAIBFZvdXQFAQAABAtXUHVia2V5SGFzaAUBAAcAAEAUAAtXU2Ny
aXB0SGFzaAUBAAcAAEAgAAtXZWlnaHRVbml0cwUBAAAEB1dpdG5lc3MFAQAIAAgA
AEAAAAAAAAAAAP////8AAAAAAAAAAAAAAAD/////AAAAAA5XaXRuZXNzUHJvZ3Jh
bQYCB3ZlcnNpb24B0ezadmfkQu1NEmmmZwM25f70N69ezitprroMRlbE+q0HcHJv
Z3JhbQAIAABAAgAAAAAAAAAoAAAAAAAAAA1XaXRuZXNzU2NyaXB0BQEBJav1uRIU
F7qjOdRfexV1p3FL4Xp1GF3QMTV61Mkt6YYKV2l0bmVzc1ZlcgMRAnYwAAJ2MVEC
djJSAnYzUwJ2NFQCdjVVAnY2VgJ2N1cCdjhYAnY5WQN2MTBaA3YxMVsDdjEyXAN2
MTNdA3YxNF4DdjE1XwN2MTZgBVd0eGlkBQEABwAAQCAAB1hPbmx5UGsFAQAHAABA
IAA=

-----END STRICT TYPE LIB-----

Binary file modified stl/[email protected]
Binary file not shown.
5 changes: 1 addition & 4 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-
Id: urn:ubideco:stl:GNfiA2ituWYdFjPE18bQ9daS2454EQ564j45gouM6ktn#shoe-film-vitamin
Id: urn:ubideco:stl:2Am7WuApVoqv3Cqh4sqPPLbg4VxpQgDUz2fFgfWC1sTL#athlete-hexagon-puzzle
Name: Bitcoin
Version: 0.1.0
Description: Consensus library for bitcoin protocol
Expand Down Expand Up @@ -29,9 +29,6 @@ data BlockHeader :: version I32
, nonce U32
-- urn:ubideco:semid:EDr6wurh4X1tMNGqA7mRkyrAY6ngPGyRSEufTGSUtySJ#kinetic-avenue-escort
data ByteStr :: [Byte ^ ..0xffffffff]
-- urn:ubideco:semid:6aRP3odHaTGySvSWHjreC8HsbX5ss9LxkQqwcjaoxhpv#aspirin-brown-alpine
data Chain :: bitcoin:0 | regtest:128 | testnet3:131 | signet:132

-- urn:ubideco:semid:EoHBsHBYQiRvuKFEJvqwp8FiBPrpoFhkhQ9peLsFxrai#aspect-citrus-nerve
data CompressedPk :: [Byte ^ 33]
-- urn:ubideco:semid:BPzqzv3DN65MTwzbTXJbHFyiKeYvmX1VExcqvk5FUb5c#nuclear-coral-gilbert
Expand Down

0 comments on commit c9fef4f

Please sign in to comment.