-
Notifications
You must be signed in to change notification settings - Fork 314
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
Adding a key to Hermes creates the wrong address #3985
Comments
Can confirm, having the same issue. Hermes creates completely different Injective address - as compared to |
Thanks for reporting this! You mean the problem appears when you skip specifying |
I mean injective uses "m/44'/60'/0'/0/0". I would have expected Hermes to
create the same key as the injetived would create but in either case - with
or without the hd-path parameter - I do not get the the expected key.
On Thu, 9 May 2024, 00:19 Adi Seredinschi, ***@***.***> wrote:
Thanks for reporting this!
You mean the problem appears when you skip specifying --hd-path
"m/44'/60'/0'/0/0" as parameter to keys add command ?
—
… Reply to this email directly, view it on GitHub
<#3985 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY4WK5CVPP2ALCMCAU3NS4LZBJGBPAVCNFSM6AAAAABHLLCJOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQHE2DCMZVHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Any updates here? Bug can be reproduce and Injective addresses arent properly created - even with hd path |
According to the Injective documentation:
If I configure
I then get the expected address:
|
@tot-truong What do you think we could document better on the Hermes side to prevent such issues? The |
@romac we have tested with Have u tried restoring key using |
Is the address I got not the very same address output by I will try with |
Even when adding the address type to the hermes config [[chain]]
id = 'injective-1'
# ...
address_type = { derivation = 'ethermint', proto_type = { pk_type = '/ethermint.crypto.v1.ethsecp256k1.PubKey' } } I still get the wrong address $ echo "that upper concert rice water duck body deny mom bulb crop warfare ugly focus worry expand ribbon gift exist knee pave zoo simple hazard" > mnemonic.txt;hermes --config main.toml keys add --overwrite --chain injective-1 --key-name test --hd-path "m/44'/60'/0'/0/0" --mnemonic-file mnemonic.txt
2024-06-03T01:52:39.199791Z INFO ThreadId(01) running Hermes v1.8.2
2024-06-03T01:52:39.200152Z WARN ThreadId(01) key test will be overwritten
SUCCESS Restored key 'test' (inj1etzf7nsxsqs8xhtnw0qu0kzateqj9qcgwm3l66) on chain injective-1 |
I wonder if the reason is that your on a different version than me on Hermes? Hermes v1.8.2 vs v1.8.2+25f547595 Here is the full main.toml [global]
log_level = "info"
[mode.clients]
enabled = true
refresh = true
misbehaviour = true
[mode.connections]
enabled = false
[mode.channels]
enabled = false
[mode.packets]
enabled = true
clear_interval = 100
clear_on_start = true
tx_confirmation = false
auto_register_counterparty_payee = false
[mode.packets.ics20_max_memo_size]
enabled = true
size = 32768
[mode.packets.ics20_max_receiver_size]
enabled = true
size = 2048
[rest]
enabled = false
host = "127.0.0.1"
port = 3000
[telemetry]
enabled = false
host = "127.0.0.1"
port = 3001
[telemetry.buckets.latency_submitted]
start = 500
end = 20000
buckets = 10
[telemetry.buckets.latency_confirmed]
start = 1000
end = 30000
buckets = 10
[[chains]]
type = "CosmosSdk"
id = "injective-1"
rpc_addr = "https://rpc-injective.whispernode.com/"
grpc_addr = "https://injective-grpc.publicnode.com/"
rpc_timeout = "10s"
# trusted_node = false
account_prefix = "inj"
key_name = 'injective_relayer'
key_store_type = "Test"
store_prefix = "ibc"
default_gas = 100000
max_gas = 400000
gas_multiplier = 1.1
max_msg_num = 1 # 30 / relay only 1 packet, otherwise max gas is exceeded
max_tx_size = 180000
# max_grpc_decoding_size = 33554432
# query_packets_chunk_size = 50
clock_drift = "5s"
max_block_time = "30s"
client_refresh_rate = "1/3"
ccv_consumer_chain = false
memo_prefix = 'test'
sequential_batch_tx = false
address_type = { derivation = 'ethermint', proto_type = { pk_type = '/ethermint.crypto.v1.ethsecp256k1.PubKey' } }
[chains.event_source]
mode = "push"
url = "wss://rpc-injective.whispernode.com/websocket"
batch_delay = "500ms"
[chains.trust_threshold]
numerator = 2
denominator = 3
[chains.gas_price]
price = 700000000.0
denom = "inj"
[chains.packet_filter]
policy = "allow"
list = [
]
[chains.packet_filter.min_fees]
# [chains.dynamic_gas_price]
# enabled = false
# multiplier = 1.1
# max = 0.6
[chains.address_type]
derivation = "cosmos"
[chains.excluded_sequences]
# [tracing_server]
# enabled = false
# port = 5555 |
You are specifying Try removing the second one
and only keep
|
Thanks 100x, that worked! The proper address is now created! |
Summary of Bug
When adding a key to Hermes it creates the wrong address for the injective-1 mainnet (compared using injectived).
Version
hermes 1.8.2
Steps to Reproduce
Using injectived => inj1mzy2fz8wzq069r8z20m2fcvsdye3pr7qrwfvx7
hd-path "m/44'/60'/0'/0/0" => inj1etzf7nsxsqs8xhtnw0qu0kzateqj9qcgwm3l66 => EXPECTED inj1mzy2fz8wzq069r8z20m2fcvsdye3pr7qrwfvx7
No hd path set => inj1yvvuw3nm4fphmxjeuwhjek6wqmvepnze94kjxv
Hermes config main.toml
Acceptance Criteria
For Admin Use
The text was updated successfully, but these errors were encountered: