Skip to content

Commit

Permalink
neon core rpc (#215)
Browse files Browse the repository at this point in the history
* neon core rpc

* add param to CI

* emulate response has been fixed

* fix fmt
  • Loading branch information
BoogVAr authored and anton-lisanin committed Mar 14, 2024
1 parent d517524 commit 66660fd
Show file tree
Hide file tree
Showing 53 changed files with 1,913 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
target
.env
.vscode
.trunk
bin
config.json
node_modules
Expand All @@ -14,4 +15,4 @@ hfuzz_workspace
*.code-workspace
evm_loader/solidity/artifacts
evm_loader/solidity/cache
test-ledger
test-ledger
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ ENV NEON_REVISION=${REVISION}
RUN cargo fmt --check && \
cargo clippy --release && \
cargo build --release && \
cargo build-bpf --features devnet && cp target/deploy/evm_loader.so target/deploy/evm_loader-devnet.so && \
cargo build-bpf --features testnet && cp target/deploy/evm_loader.so target/deploy/evm_loader-testnet.so && \
cargo build-bpf --features govertest && cp target/deploy/evm_loader.so target/deploy/evm_loader-govertest.so && \
cargo build-bpf --features govertest,emergency && cp target/deploy/evm_loader.so target/deploy/evm_loader-govertest-emergency.so && \
cargo build-bpf --features mainnet && cp target/deploy/evm_loader.so target/deploy/evm_loader-mainnet.so && \
cargo build-bpf --features mainnet,emergency && cp target/deploy/evm_loader.so target/deploy/evm_loader-mainnet-emergency.so && \
cargo build-bpf --features ci --dump
cargo build-bpf --manifest-path program/Cargo.toml --features devnet && cp target/deploy/evm_loader.so target/deploy/evm_loader-devnet.so && \
cargo build-bpf --manifest-path program/Cargo.toml --features testnet && cp target/deploy/evm_loader.so target/deploy/evm_loader-testnet.so && \
cargo build-bpf --manifest-path program/Cargo.toml --features govertest && cp target/deploy/evm_loader.so target/deploy/evm_loader-govertest.so && \
cargo build-bpf --manifest-path program/Cargo.toml --features govertest,emergency && cp target/deploy/evm_loader.so target/deploy/evm_loader-govertest-emergency.so && \
cargo build-bpf --manifest-path program/Cargo.toml --features mainnet && cp target/deploy/evm_loader.so target/deploy/evm_loader-mainnet.so && \
cargo build-bpf --manifest-path program/Cargo.toml --features mainnet,emergency && cp target/deploy/evm_loader.so target/deploy/evm_loader-mainnet-emergency.so && \
cargo build-bpf --manifest-path program/Cargo.toml --features ci --dump


# Add neon_test_invoke_program to the genesis
Expand All @@ -42,6 +42,8 @@ COPY --from=evm-loader-builder /opt/neon-evm/evm_loader/target/release/neon-cli
COPY --from=evm-loader-builder /opt/neon-evm/evm_loader/target/release/neon-api /opt/

COPY --from=neon_test_programs /opt/deploy/ /opt/deploy/
COPY --from=evm-loader-builder /opt/neon-evm/evm_loader/target/release/neon-rpc /opt/
COPY --from=evm-loader-builder /opt/neon-evm/evm_loader/target/release/libneon_lib.so /opt/libs/current/

COPY ci/wait-for-solana.sh \
ci/wait-for-neon.sh \
Expand Down
33 changes: 32 additions & 1 deletion ci/docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- CI=true
hostname: solana
ports:
- "8899"
- "8899"
expose:
- "8899"
ulimits:
Expand Down Expand Up @@ -43,11 +43,42 @@ services:
networks:
- net

neon-core-rpc:
restart: unless-stopped
hostname: neon_core_rpc
entrypoint: /opt/neon-rpc /opt/libs/current
environment:
RUST_BACKTRACE: full
RUST_LOG: neon=debug
NEON_API_LISTENER_ADDR: 0.0.0.0:3100
SOLANA_URL: http://solana:8899
EVM_LOADER: 53DfF883gyixYNXnM7s5xhdeyV8mVk9T4i2hGV9vG9io
NEON_TOKEN_MINT: HPsV9Deocecw3GeZv1FkAPNCBRfuVyfw9MMwjwRe1xaU
NEON_CHAIN_ID: 111
COMMITMENT: confirmed
NEON_DB_CLICKHOUSE_URLS: "http://45.250.253.36:8123;http://45.250.253.38:8123"
NEON_DB_INDEXER_HOST: 45.250.253.32
NEON_DB_INDEXER_PORT: 5432
NEON_DB_INDEXER_DATABASE: indexer
NEON_DB_INDEXER_USER: postgres
NEON_DB_INDEXER_PASSWORD: "vUlpDyAP0gA98R5Bu"
KEYPAIR: /opt/operator-keypairs/id.json
FEEPAIR: /opt/operator-keypairs/id.json
SOLANA_KEY_FOR_CONFIG: BMp6gEnveANdvSvspESJUrNczuHz1GF5UQKjVLCkAZih
image: ${EVM_LOADER_IMAGE}
ports:
- "3100"
expose:
- "3100"
networks:
- net

tests:
image: ${NEON_TESTS_IMAGE}
environment:
- SOLANA_URL=http://solana:8899
- NEON_CORE_API_URL=http://neon_api:8085/api
- NEON_CORE_API_RPC_URL=http://neon_core_rpc:3100
hostname: tests
command: sleep infinity
networks:
Expand Down
31 changes: 31 additions & 0 deletions ci/docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,42 @@ services:
- "8085"
networks:
- net

neon-core-rpc:
restart: unless-stopped
container_name: neon-core-rpc
hostname: neon_core_rpc
entrypoint: /opt/neon-rpc /opt/libs/current
environment:
RUST_BACKTRACE: full
RUST_LOG: neon=debug
NEON_API_LISTENER_ADDR: 0.0.0.0:3100
SOLANA_URL: http://solana:8899
EVM_LOADER: 53DfF883gyixYNXnM7s5xhdeyV8mVk9T4i2hGV9vG9io
NEON_TOKEN_MINT: HPsV9Deocecw3GeZv1FkAPNCBRfuVyfw9MMwjwRe1xaU
NEON_CHAIN_ID: 111
COMMITMENT: confirmed
NEON_DB_CLICKHOUSE_URLS: "http://45.250.253.36:8123;http://45.250.253.38:8123"
NEON_DB_INDEXER_HOST: 45.250.253.32
NEON_DB_INDEXER_PORT: 5432
NEON_DB_INDEXER_DATABASE: indexer
NEON_DB_INDEXER_USER: postgres
NEON_DB_INDEXER_PASSWORD: "vUlpDyAP0gA98R5Bu"
KEYPAIR: /opt/operator-keypairs/id.json
FEEPAIR: /opt/operator-keypairs/id.json
image: ${EVM_LOADER_IMAGE}
ports:
- "3100:3100"
expose:
- "3100"
networks:
- net
tests:
image: ${NEON_TESTS_IMAGE}
environment:
- SOLANA_URL=http://solana:8899
- NEON_CORE_API_URL=http://neon_api:8085/api
- NEON_CORE_API_RPC_URL=http://neon_core_rpc:3100
hostname: tests
command: sleep infinity
networks:
Expand Down
Loading

0 comments on commit 66660fd

Please sign in to comment.