Skip to content

Commit

Permalink
Merge pull request #65 from rajarshimaitra/todo-list
Browse files Browse the repository at this point in the history
TODO Items annotated with referencing Issue number
  • Loading branch information
dr-orlovsky authored Mar 25, 2021
2 parents c181be9 + 6677dfe commit 1e33c09
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 77 deletions.
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ coverage:
precision: 1
round: nearest
range: "0...95"
# TODO: Update codecov default requirements after v0.1 release
# TODO #30: Update codecov default requirements after v0.1 release
status:
project:
default:
Expand Down
6 changes: 3 additions & 3 deletions rgb20/src/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub enum Error {
InflationAssignmentConfidential(NodeId),
}

// TODO: Add support for renominations, burn & replacements
// TODO #31: Add support for renominations, burn & replacements
/// Detailed RGB20 asset information
#[cfg_attr(
feature = "serde",
Expand Down Expand Up @@ -122,8 +122,8 @@ pub struct Asset {
feature = "serde",
serde(with = "As::<BTreeMap<DisplayFromStr, DisplayFromStr>>")
)]
// TODO: Transform into method iterating and collecting this information
// from `known_issues`
// TODO #32: Transform into method iterating and collecting this
// information from `known_issues`
known_inflation: BTreeMap<OutPoint, AtomicValue>,

/// Specifies outpoints controlling certain amounts of assets.
Expand Down
10 changes: 5 additions & 5 deletions rgb20/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl HistoryProofFormat {
pub fn schema() -> Schema {
use Occurences::*;

// TODO: Consider using data containers + state extensions for
// TODO #33: Consider using data containers + state extensions for
// providing issuer-created asset meta-information

Schema {
Expand Down Expand Up @@ -311,7 +311,7 @@ pub fn schema() -> Schema {
// double SHA256 hash and URL should be used instead, pointing to
// the full contract text, where hash must be represented by a
// hexadecimal string, optionally followed by `\n` and text URL
// TODO: Consider using data container instead of the above ^^^
// TODO #33: Consider using data container instead of the above ^^^
FieldType::RicardianContract => DataFormat::String(core::u16::MAX),
FieldType::Precision => DataFormat::Unsigned(Bits::Bit8, 0, 18u128),
// We need this b/c allocated amounts are hidden behind Pedersen
Expand Down Expand Up @@ -368,9 +368,9 @@ pub fn schema() -> Schema {
pub fn subschema() -> Schema {
use Occurences::*;

// TODO: Consider using data containers + state extensions for
// TODO #33: Consider using data containers + state extensions for
// providing issuer-created asset meta-information
// TODO: Consider adding Ricardian contracts to secondary issues and
// TODO #33: Consider adding Ricardian contracts to secondary issues and
// transfers

Schema {
Expand Down Expand Up @@ -515,7 +515,7 @@ pub fn subschema() -> Schema {
// double SHA256 hash and URL should be used instead, pointing to
// the full contract text, where hash must be represented by a
// hexadecimal string, optionally followed by `\n` and text URL
// TODO: Consider using data container instead of the above ^^^
// TODO #33: Consider using data container instead of the above ^^^
FieldType::RicardianContract => DataFormat::String(core::u16::MAX),
FieldType::Precision => DataFormat::Unsigned(Bits::Bit8, 0, 18u128),
// We need this b/c allocated amounts are hidden behind Pedersen
Expand Down
2 changes: 1 addition & 1 deletion rgb20/src/supply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,6 @@ impl BurnReplace {
}
}

// TODO: Define consistency trait with operations like `is_consistent` and
// TODO #34: Define consistency trait with operations like `is_consistent` and
// `make_consistent`, checking internal consistency of the denormalized
// data within each type of the RGB20 structures
12 changes: 6 additions & 6 deletions rgb21/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,16 @@ pub fn schema() -> Schema {
},
field_types: type_map! {
FieldType::Name => DataFormat::String(256),
// TODO: Consider using data container
// TODO #35: Consider using data container
FieldType::RicardianContract => DataFormat::String(core::u16::MAX),
// Data common for all NFTs inside specific state transition or
// genesis.
// TODO: Add DataContainer for common data kept inside external
// TODO #35: Add DataContainer for common data kept inside external
// data container
FieldType::Data => DataFormat::Bytes(core::u16::MAX),
// A set of data formats, corresponding values and user-defined
// type extensibility must be provided by RGB21 specification
// TODO: (LNPBPs) Consider using MIME types
// TODO #36: (LNPBPs) Consider using MIME types
FieldType::DataFormat => DataFormat::Unsigned(Bits::Bit32, 0, core::u32::MAX as u128),
// While UNIX timestamps allow negative numbers; in context of RGB
// Schema, assets can't be issued in the past before RGB or Bitcoin
Expand Down Expand Up @@ -275,7 +275,7 @@ pub fn schema() -> Schema {
OwnedRightsType::EngravedOwnership => StateSchema {
// Engraving data (per-token). Data format is defined by metadata
// and must be same for all tokens
// TODO: Use `DataFormat::Container` once will be available
// TODO #35: Use `DataFormat::Container` once will be available
format: StateFormat::CustomData(DataFormat::Bytes(core::u16::MAX)),
abi: none!()
},
Expand All @@ -288,8 +288,8 @@ pub fn schema() -> Schema {
}
}

// TODO: Define all standard field, rights & transition types which are common
// to different schemata as constants
// TODO #35: Define all standard field, rights & transition types which are
// common to different schemata as constants
impl Deref for FieldType {
type Target = usize;

Expand Down
8 changes: 4 additions & 4 deletions rgb22/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ pub fn schema() -> Schema {
field_types: type_map! {
FieldType::Name => DataFormat::String(256),
// Data format for keeping identity-related information
// TODO: (LNPBPs) Consider using MIME types
// TODO #37: (LNPBPs) Consider using MIME types
FieldType::DataFormat => DataFormat::Unsigned(Bits::Bit16, 0, core::u16::MAX as u128),
// Identity-related information (like SSI)
// TODO: Use data container to keep the actual log record
// TODO #37: Use data container to keep the actual log record
// matching the signature
FieldType::Data => DataFormat::Bytes(core::u16::MAX),
// We allow signatures to be created with different cryptographic
// methods, so keeping three fields to define them, instead of using
// `Signature` data format (which will force all contracts to
// use the same signature and cryptographic algorithm
// TODO: Consider using DER format instead of using three fields
// TODO #37: Consider using DER format instead of using three fields
FieldType::UsedCryptography => DataFormat::Unsigned(Bits::Bit16, 0, core::u16::MAX as u128),
FieldType::PublicKey => DataFormat::Bytes(core::u16::MAX),
// Signature proving ownership over private key, matching the public
Expand All @@ -76,8 +76,8 @@ pub fn schema() -> Schema {
// While UNIX timestamps allow negative numbers; in context of RGB
// Schema, assets can't be issued in the past before RGB or Bitcoin
// even existed; so we prohibit all the dates before RGB release
// TODO: Update lower limit with the first RGB release
// Current lower time limit is 07/04/2020 @ 1:54pm (UTC)
// TODO #37: Update lower limit with the first RGB release
FieldType::ValidFrom => DataFormat::Integer(Bits::Bit64, 1593870844, core::i64::MAX as i128)
},
owned_right_types: type_map! {
Expand Down
10 changes: 5 additions & 5 deletions rgb23/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,26 @@ pub enum TransitionType {
pub fn schema() -> Schema {
use Occurences::*;

// TODO: Link signatures to identity
// TODO #38: Link signatures to identity

Schema {
rgb_features: none!(),
root_id: none!(),
field_types: type_map! {
// Human-readable name for UI
FieldType::Name => DataFormat::String(256),
// TODO: Consider using data container
// TODO #38: Consider using data container
FieldType::RicardianContract => DataFormat::String(core::u16::MAX),
// TODO: (LNPBPs) Consider using MIME types
// TODO: 36: (LNPBPs) Consider using MIME types
FieldType::DataFormat => DataFormat::Unsigned(Bits::Bit16, 0, core::u16::MAX as u128),
// TODO: Use data container to keep the actual log record
// TODO #38: Use data container to keep the actual log record
// matching the signature
FieldType::Data => DataFormat::Bytes(core::u16::MAX),
// While UNIX timestamps allow negative numbers; in context of RGB Schema, assets
// can't be issued in the past before RGB or Bitcoin even existed; so we prohibit
// all the dates before RGB release
// TODO: Update lower limit with the first RGB release
// Current lower time limit is 07/04/2020 @ 1:54pm (UTC)
// TODO #38: Update lower limit with the first RGB release
FieldType::StartsFrom => DataFormat::Integer(Bits::Bit64, 1593870844, core::i64::MAX as i128)
},
owned_right_types: type_map! {
Expand Down
6 changes: 3 additions & 3 deletions rgb24/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ pub enum ExtensionType {
pub fn schema() -> Schema {
use Occurences::*;

// TODO: Link signatures to identity
// TODO #39: Link signatures to identity

Schema {
rgb_features: none!(),
root_id: none!(),
field_types: type_map! {
// Human-readable name registered with this schema
FieldType::Name => DataFormat::String(256),
// TODO: Consider using data container
// TODO #39: Consider using data container
FieldType::RicardianContract => DataFormat::String(core::u16::MAX),
// Data formats for name resolution, like IP addresses, ONIONs etc.
// Formats are registered by LNP/BP Association and maintained as
Expand All @@ -82,7 +82,7 @@ pub fn schema() -> Schema {
// While UNIX timestamps allow negative numbers; in context of RGB Schema, assets
// can't be issued in the past before RGB or Bitcoin even existed; so we prohibit
// all the dates before RGB release
// TODO: Update lower limit with the first RGB release
// TODO #39: Update lower limit with the first RGB release
// Current lower time limit is 07/04/2020 @ 1:54pm (UTC)
FieldType::ValidFrom => DataFormat::Integer(Bits::Bit64, 1593870844, core::i64::MAX as i128)
},
Expand Down
5 changes: 3 additions & 2 deletions src/bech32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ use crate::{
Transition,
};

// TODO: Refactor bech32 into single style after `Consignment` & `ConsignmentId`
// TODO #40: Refactor bech32 into single style after `Consignment` &
// `ConsignmentId`

/// Bech32 representation of generic RGB data, that can be generated from
/// some string basing on Bech32 HRP value.
Expand Down Expand Up @@ -678,7 +679,7 @@ impl FromStr for SchemaId {
}
}

// TODO: Enable after removal of the default `Display` and `FromStr`
// TODO #41: Enable after removal of the default `Display` and `FromStr`
// implementations for hash-derived types
/*
impl FromStr for seal::Confidential {
Expand Down
6 changes: 3 additions & 3 deletions src/contract/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ pub enum Revealed {
U16(u16),
U32(u32),
U64(u64),
// TODO: Add support later once bitcoin library will start supporting
// TODO #46: Add support later once bitcoin library will start supporting
// consensus-encoding of the native rust `u128` type
// U128(u128),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
// TODO: Add support later once bitcoin library will start supporting
// TODO #46: Add support later once bitcoin library will start supporting
// consensus-encoding of the native rust `i128` type
// I128(i128),
F32(f32),
Expand Down Expand Up @@ -109,7 +109,7 @@ pub enum Revealed {
)
)]
Ed25519Signature(ed25519_dalek::Signature),
// TODO: Add support for Schnorr's signatures once they will be
// TODO #46: Add support for Schnorr's signatures once they will be
// implemented in rust-secp256k1
TxOutPoint(OutPoint),
Tx(Transaction),
Expand Down
2 changes: 1 addition & 1 deletion src/contract/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use lnpbp::strict_encoding;
use super::data;
use crate::schema;

// TODO: Use of BTreeSet for metadata values breaks their arbitrary order
// TODO #47: Use of BTreeSet for metadata values breaks their arbitrary order
// which may be used to correlate metadata with indexes of other
// metadata or state. Consider converting into `Vec` type like it was
// accomplished for the state data
Expand Down
2 changes: 1 addition & 1 deletion src/contract/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl sha256t::Tag for NodeIdTag {
}
}

// TODO: Refactor all ids into a single style after `ConsignmentId`
// TODO #48: Refactor all ids into a single style after `ConsignmentId`
/// Unique node (genesis, extensions & state transition) identifier equivalent
/// to the commitment hash
#[cfg_attr(
Expand Down
5 changes: 3 additions & 2 deletions src/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ pub use verify::SchemaVerify;
///
/// These constants are also used by embedded validation procedures representing
/// standard metadata fields, state and transition types analyzed by them
// TODO: (LNPBPs) Make this part of the RGB generic schema LNPBP standard
// TODO #LNPBP(102): (LNPBPs) Make this part of the RGB generic schema LNPBP
// standard
pub mod constants {
/// Ticker of the asset
pub const FIELD_TYPE_TICKER: usize = 0x00;
Expand All @@ -80,7 +81,7 @@ pub mod constants {
pub const FIELD_TYPE_DATA: usize = 0x10;

/// Format of the attached data, schema-specific
// TODO: Use LNPBP-extended MIME types
// TODO #36: Use LNPBP-extended MIME types
pub const FIELD_TYPE_DATA_FORMAT: usize = 0x11;

/// [`FieldType`] that is used by the embedded validation procedure
Expand Down
4 changes: 2 additions & 2 deletions src/schema/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl Schema {
self.clone().consensus_commit()
}

// TODO: Change with the adoption of Simplicity
// TODO #49: Change with the adoption of Simplicity
#[inline]
pub fn scripts(&self) -> SimplicityScript {
vec![]
Expand Down Expand Up @@ -157,7 +157,7 @@ mod strict_encoding {
strategies, Error, Strategy, StrictDecode, StrictEncode,
};

// TODO: Use derive macros and generalized `tagged_hash!` in the future
// TODO #50: Use derive macros and generalized `tagged_hash!` in the future
impl Strategy for SchemaId {
type Strategy = strategies::Wrapped;
}
Expand Down
6 changes: 3 additions & 3 deletions src/schema/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub enum DataFormat {
Digest(DigestAlgorithm),
PublicKey(EllipticCurve, elliptic_curve::PointSerialization),
Signature(elliptic_curve::SignatureAlgorithm),
// TODO: Add externally stored data container id
// TODO #51: Add externally stored data container id
// Container(BlobId, MIME, u64 /* AES encryption key / salt */),
TxOutPoint,
Tx,
Expand Down Expand Up @@ -137,7 +137,7 @@ impl DataFormat {
Self::Unsigned(Bits::Bit64, 0, core::u64::MAX as u128)
}

// TODO: Add support later once bitcoin library will start supporting
// TODO #46: Add support later once bitcoin library will start supporting
// consensus-encoding of the native rust `u128` type
//#[inline]
//pub fn u128() -> Self {
Expand All @@ -164,7 +164,7 @@ impl DataFormat {
Self::Integer(Bits::Bit64, 0, core::i64::MAX as i128)
}

// TODO: Add support later once bitcoin library will start supporting
// TODO #46: Add support later once bitcoin library will start supporting
// consensus-encoding of the native rust `u128` type
//#[inline]
//pub fn i128() -> Self {
Expand Down
8 changes: 4 additions & 4 deletions src/schema/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ pub enum Bits {
Bit16 = 2,
Bit32 = 4,
Bit64 = 8,
/* TODO: Add support later once bitcoin library will start supporting
* consensus-encoding of the native rust `u128` type
*Bit128 = 16,
*Bit256 = 32, */
/* Bit128 = 16,
* Bit256 = 32, */
}
// TODO #46: Add support later once bitcoin library will start supporting
// consensus-encoding of the native rust `u128` type

impl Bits {
pub fn max_value(&self) -> u128 {
Expand Down
Loading

0 comments on commit 1e33c09

Please sign in to comment.