Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zero indexer #3

Draft
wants to merge 38 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3e43d79
support brc0 by rpc
BananaLF Dec 30, 2023
851153d
solve brc-20 bug
BananaLF Dec 30, 2023
01a500e
solve transfer bug
BananaLF Dec 30, 2023
c0e11f0
support brc20
yann-sjtu Dec 31, 2023
5d9c899
parallel read
yann-sjtu Dec 31, 2023
38f3e5b
table opt
yann-sjtu Dec 31, 2023
947ed50
rename
BananaLF Dec 31, 2023
c74b801
table opt
yann-sjtu Dec 31, 2023
a3fcd52
Merge remote-tracking branch 'origin/brc20' into sunstrider/zeroindexer
BananaLF Dec 31, 2023
67d677d
table opt
yann-sjtu Dec 31, 2023
687b356
add logs
yann-sjtu Dec 31, 2023
1724d10
support zero indexer
BananaLF Dec 31, 2023
d400bae
complete support zero indexer
BananaLF Dec 31, 2023
6c90ccd
Merge remote-tracking branch 'origin/brc20' into sunstrider/zeroindexer
BananaLF Dec 31, 2023
92e66d4
solve a bug
BananaLF Dec 31, 2023
079c24a
change height
BananaLF Dec 31, 2023
8ec4282
fix bug of cache
yann-sjtu Dec 31, 2023
c1d4ba5
Merge remote-tracking branch 'origin/brc20' into sunstrider/zeroindexer
BananaLF Dec 31, 2023
7f5c065
update log
yann-sjtu Dec 31, 2023
6b56b48
fix bug of table
yann-sjtu Dec 31, 2023
a2f62e6
Merge remote-tracking branch 'origin/brc20' into sunstrider/zeroindexer
BananaLF Jan 1, 2024
62fbfe9
add lru
yann-sjtu Jan 1, 2024
6b74c59
add rpc of crawler height
BananaLF Jan 1, 2024
4c4ad73
update tx out cache
yann-sjtu Jan 1, 2024
b34fed7
update log
yann-sjtu Jan 1, 2024
f365d78
use simple lru
yann-sjtu Jan 1, 2024
26ca3ab
delete simulate
yann-sjtu Jan 1, 2024
012a178
fix bug of BRC20_TRANSFERABLELOG
yann-sjtu Jan 1, 2024
7b4c629
update default lru_size
yann-sjtu Jan 1, 2024
94616c0
update
yann-sjtu Jan 1, 2024
f9934a6
update
yann-sjtu Jan 2, 2024
b7588b5
fix cache feature
yann-sjtu Jan 2, 2024
aaf484e
add rpc of inscriptions_op
BananaLF Jan 2, 2024
01b408b
fix lru
yann-sjtu Jan 2, 2024
c2ea833
update
yann-sjtu Jan 2, 2024
c830e39
fix bug of sending channal in parallel
yann-sjtu Jan 2, 2024
bb1d8b9
Merge remote-tracking branch 'origin/brc20' into sunstrider/zeroindexer
BananaLF Jan 2, 2024
7550f5f
remove warning
BananaLF Jan 2, 2024
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
31 changes: 31 additions & 0 deletions Cargo.lock

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

9 changes: 8 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 All @@ -39,6 +38,7 @@ derive_more = "0.99.17"
dirs = "5.0.0"
env_logger = "0.10.0"
futures = "0.3.21"
bincode = "1.3.3"
hex = "0.4.3"
html-escaper = "0.2.0"
http = "0.2.6"
Expand Down Expand Up @@ -72,6 +72,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]
executable-path = "1.0.0"
Expand All @@ -95,3 +98,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