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

issue-147: Remove indexer #148

Merged
merged 6 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 9 additions & 51 deletions Cargo.lock

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

14 changes: 0 additions & 14 deletions chains/astar/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,6 @@ mod tests {
rosetta_server::tests::construction(config).await
}

#[tokio::test]
#[ignore]
async fn test_find_transaction() -> Result<()> {
let config = rosetta_config_astar::config("dev")?;
rosetta_server::tests::find_transaction(config).await
}

#[tokio::test]
#[ignore]
async fn test_list_transactions() -> Result<()> {
let config = rosetta_config_astar::config("dev")?;
rosetta_server::tests::list_transactions(config).await
}

fn compile_snippet(source: &str) -> Result<Vec<u8>> {
let solc = Solc::default();
let source = format!("contract Contract {{ {source} }}");
Expand Down
13 changes: 0 additions & 13 deletions chains/ethereum/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,19 +383,6 @@ mod tests {
rosetta_server::tests::construction(config).await
}

#[tokio::test]
#[ignore]
async fn test_find_transaction() -> Result<()> {
let config = rosetta_config_ethereum::config("dev")?;
rosetta_server::tests::find_transaction(config).await
}

#[tokio::test]
async fn test_list_transactions() -> Result<()> {
let config = rosetta_config_ethereum::config("dev")?;
rosetta_server::tests::list_transactions(config).await
}

fn compile_snippet(source: &str) -> Result<Vec<u8>> {
let solc = Solc::default();
let source = format!("contract Contract {{ {source} }}");
Expand Down
12 changes: 0 additions & 12 deletions chains/polkadot/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,4 @@ mod tests {
let config = rosetta_config_polkadot::config("dev")?;
rosetta_server::tests::construction(config).await
}

#[tokio::test]
async fn test_find_transaction() -> Result<()> {
let config = rosetta_config_polkadot::config("dev")?;
rosetta_server::tests::find_transaction(config).await
}

#[tokio::test]
async fn test_list_transactions() -> Result<()> {
let config = rosetta_config_polkadot::config("dev")?;
rosetta_server::tests::list_transactions(config).await
}
}
35 changes: 5 additions & 30 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ volumes:
ethereum-volume:
polkadot-volume:
astar-volume:
bitcoin-connector-volume:
ethereum-connector-volume:
polkadot-connector-volume:
astar-connector-volume:

services:
bitcoin:
Expand Down Expand Up @@ -62,10 +58,9 @@ services:

astar:
image: "staketechnologies/astar-collator:v5.15.0"
command: "astar-collator --chain dev --ws-port 9994 --rpc-port 9995 --rpc-cors all --ws-external --alice --blocks-pruning archive --state-pruning archive --base-path /polkadot"
command: "astar-collator --chain dev --rpc-port=9994 --rpc-cors=all --rpc-external --alice --tmp --enable-evm-rpc --base-path /astar"
expose:
- "9994"
- "9995"
user: root
ulimits:
nofile:
Expand All @@ -81,55 +76,35 @@ services:

connector-bitcoin:
image: "analoglabs/connector-bitcoin"
command: "--network regtest --addr 0.0.0.0:8080 --node-addr bitcoin:18443 --path /data"
command: "--network regtest --addr 0.0.0.0:8080 --node-addr http://bitcoin:18443"
ports:
- "8080:8080"
depends_on:
- bitcoin
volumes:
- "bitcoin-connector-volume:/data"

connector-ethereum:
image: "analoglabs/connector-ethereum"
command: "--network dev --addr 0.0.0.0:8081 --node-addr ethereum:8545 --path /data"
command: "--network dev --addr 0.0.0.0:8081 --node-addr http://ethereum:8545"
ports:
- "8081:8081"
depends_on:
- ethereum
volumes:
- "ethereum-connector-volume:/data"

connector-polkadot:
image: "analoglabs/connector-polkadot"
command: "--network dev --addr 0.0.0.0:8082 --node-addr polkadot:9944 --path /data"
command: "--network dev --addr 0.0.0.0:8082 --node-addr ws://polkadot:9944"
ports:
- "8082:8082"
depends_on:
- polkadot
volumes:
- "polkadot-connector-volume:/data"
# TODO: need to do a proper health check
restart: always

connector-astar:
image: "analoglabs/connector-astar"
command: "--network dev --addr 0.0.0.0:8083 --node-addr astar:9994 --path /data"
command: "--network dev --addr 0.0.0.0:8083 --node-addr ws://astar:9994"
ports:
- "8083:8083"
depends_on:
- astar
volumes:
- "astar-connector-volume:/data"
# TODO: need to do a proper health check
restart: always


explorer:
image: "analoglabs/rosetta-explorer"
ports:
- "3000:3000"
depends_on:
- connector-bitcoin
- connector-ethereum
- connector-polkadot
- connector-astar
2 changes: 0 additions & 2 deletions rosetta-crypto/src/address/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ mod ss58;

pub use ss58::{Ss58AddressFormat, Ss58AddressFormatRegistry};

/// Error format

/// Address format.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AddressFormat {
Expand Down
1 change: 0 additions & 1 deletion rosetta-docker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ impl<'a> EnvBuilder<'a> {
format!("--network={}", config.network),
format!("--addr=0.0.0.0:{}", config.connector_port),
format!("--node-addr={}", config.node_uri.with_host(link.as_str())),
"--path=/data".into(),
])
.auto_remove(true)
.attach_stdout(true)
Expand Down
5 changes: 2 additions & 3 deletions rosetta-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/analog-labs/chain-connectors"
description = "Generic rosetta server implementation."

[features]
tests = ["futures", "rosetta-docker"]
tests = ["futures", "rosetta-docker", "nanoid"]

[dependencies]
anyhow = "1.0.69"
Expand All @@ -17,12 +17,11 @@ femme = "2.2.1"
futures = { version = "0.3.26", optional = true }
hex = "0.4.3"
log = "0.4.17"
nanoid = "0.4.0"
nanoid = { version = "0.4.0", optional = true }
rosetta-core = { version = "0.4.0", path = "../rosetta-core" }
rosetta-docker = { version = "0.4.0", path = "../rosetta-docker", optional = true }
serde = "1.0.153"
serde_json = "1.0.94"
sled = "0.34.7"
tide = { version = "0.16.0", default-features = false, features = ["h1-server", "logger"] }
tokio = { version = "1.26.0", features = ["full"] }
tokio-retry = "0.3"
Expand Down
Loading