Skip to content

Commit

Permalink
support brc20 (#2)
Browse files Browse the repository at this point in the history
* support brc20

* parallel read

* table opt

* add logs

* fix bug of cache

* update log

* fix bug of table

* add lru

* update tx out cache

* update log

* use simple lru

* delete simulate

* fix bug of BRC20_TRANSFERABLELOG

* update default lru_size

* fix cache feature

* fix lru

* fix bug of sending channal in parallel

* delete unused code

* bug fix: save new outpoints

* fix bug of receipts order
  • Loading branch information
yann-sjtu authored Jan 5, 2024
1 parent 98e8455 commit 5253168
Show file tree
Hide file tree
Showing 55 changed files with 4,586 additions and 648 deletions.
41 changes: 31 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ axum-server = "0.5.0"
base64 = "0.21.0"
bech32 = "0.9.1"
bigdecimal = "0.4.2"
bincode = "1.3.3"
bip39 = "2.0.0"
bitcoin = { version = "0.30.1", features = ["rand"] }
boilerplate = { version = "1.0.0", features = ["axum"] }
Expand Down Expand Up @@ -72,6 +71,9 @@ tower-http = { version = "0.4.0", features = ["compression-br", "compression-gzi
utoipa = "4.1.0"
thiserror = "1.0.51"
log4rs = { version = "1.2.0", features = ["gzip"] }
once_cell = "1.19.0"
rmp-serde = "1.1.2"
rayon = "1.8.0"

[dev-dependencies]
criterion = "0.5.1"
Expand Down Expand Up @@ -100,3 +102,7 @@ path = "tests/lib.rs"
[build-dependencies]
pulldown-cmark = "0.9.2"
shadow-rs = "0.25.0"

[features]
default = []
cache = []
9 changes: 9 additions & 0 deletions src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ impl Chain {
}
}

pub(crate) fn first_brc20_height(self) -> u32 {
match self {
Self::Mainnet => 779832,
Self::Regtest => 0,
Self::Signet => 0,
Self::Testnet => 0,
}
}

pub(crate) fn first_rune_height(self) -> u32 {
SUBSIDY_HALVING_INTERVAL
* match self {
Expand Down
Loading

0 comments on commit 5253168

Please sign in to comment.