Skip to content

Commit 9cd4344

Browse files
committed
Various
1 parent f560d0b commit 9cd4344

4 files changed

Lines changed: 18 additions & 3 deletions

File tree

docker-compose/docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ services:
2828
L1_RPC_URL: ${L1_RPC_URL}
2929
L1_GENESIS_BLOCK: ${L1_GENESIS_BLOCK}
3030
BLOCK_IMPORT_BATCH_SIZE: ${BLOCK_IMPORT_BATCH_SIZE:-5}
31+
L1_PREFETCH_FORWARD: ${L1_PREFETCH_FORWARD:-200}
32+
L1_PREFETCH_THREADS: ${L1_PREFETCH_THREADS:-10}
33+
VALIDATE_IMPORT: ${VALIDATE_IMPORT:-false}
34+
VALIDATION_THREADS: ${VALIDATION_THREADS:-10}
35+
STORAGE_VERIFICATION_THREADS: ${STORAGE_VERIFICATION_THREADS:-10}
36+
PROFILE_IMPORT: ${PROFILE_IMPORT:-false}
37+
ETHSCRIPTIONS_API_BASE_URL: ${ETHSCRIPTIONS_API_BASE_URL-''}
3138
depends_on:
3239
geth:
3340
condition: service_healthy

lib/eth_rpc_client.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ class MethodRequiredError < StandardError; end
1515

1616
def initialize(base_url = ENV['L1_RPC_URL'])
1717
self.base_url = base_url
18-
@http = Net::HTTP::Persistent.new(name: "eth_rpc_#{base_url.hash}")
18+
@uri = URI(base_url)
19+
@http = Net::HTTP::Persistent.new(
20+
name: "eth_rpc_#{@uri.host}:#{@uri.port}",
21+
pool_size: 100 # Increase pool size from default 64
22+
)
23+
@http.open_timeout = 10 # 10 seconds to establish connection
24+
@http.read_timeout = 30 # 30 seconds for slow eth_call operations
25+
@http.idle_timeout = 30 # Keep connections alive for 30 seconds
1926
end
2027

2128
def self.l1

lib/ethscriptions_api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class EthscriptionsApiClient
2-
BASE_URL = ENV.fetch('ETHSCRIPTIONS_API_BASE_URL', 'http://127.0.0.1:3000')
2+
BASE_URL = ENV['ETHSCRIPTIONS_API_BASE_URL'].to_s
33

44
class << self
55
def fetch_block_data(block_number)

lib/storage_reader.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ def get_ethscription_content(tx_hash, block_tag: 'latest')
170170
rescue => e
171171
Rails.logger.error "Failed to get ethscription content #{tx_hash}: #{e.message}"
172172
Rails.logger.error e.backtrace.join("\n") if Rails.env.development?
173-
nil
173+
binding.irb if ENV['DEBUG'] == '1'
174+
raise e
174175
end
175176

176177
def get_owner(token_id, block_tag: 'latest')

0 commit comments

Comments
 (0)