-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: constructed persistent account keys from instruction #191
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactoring code to resolve `too_many_lines` clippy error will take too much time, so I decided to silence the error for now. All other issues were fixed
frolvanya
force-pushed
the
feat/persistent-account-keys
branch
from
January 15, 2025 06:50
34bf4cc
to
6eb9c79
Compare
olga24912
approved these changes
Jan 15, 2025
frolvanya
added a commit
that referenced
this pull request
Jan 17, 2025
* feat: added native fee in structures (#69) * chore: added `nativeFee` field closes #47 * chore: renamed `eth` to `evm` In general all methods that we're using for eth are also appliable for evm * feat: handled scenario with insufficient fees * chore: reordered events * feat: get `wormhole_chain_id` based on recipient * chore: renamed `withdraw_log` to `init_log` Changed due to the new name in bridge token factory structure * feat: updated to the latest version of omni-types * feat: removed `check_bad_fees` logic * chore: renamed `BAD_FEE_EVENTS` to `BAD_FEES` * feat: removed whole bad fees logic * feat: provided proper fee structure into signing method * feat: updated accordingly to new version of bridge-sdk * feat: claim native fee (#70) * feat: added `fin_transfer` event to redis db * feat: signing claiming native fee * fix: sign_claim_native_fee call * feat: added `claim_native_fee` call * feat: handled `ClaimFeeEvent` * fix: issues after merging * chore: renamed `relayer` -> `relayer_address_on_evm` * chore: use relayer from config * fix: typo in redis key * fix: expected different event * chore: recipient should be our relayer * fix: bunch of naming mistakes * chore: renamed `fin_transfer_events` redis key * feat: handled `FinTransferEvent` with some nonce * chore: improved readability * refactor: changed logging style * feat: derive eth address from private key (#76) * feat: derived eth pk from sk * refactor: removed optional typing * refactor: shortened code * feat: used existing crate to derive pk * refactor: moved `relayer_address` under `evm` struct * chore: some renamings * chore: updated omni-types (#92) * feat: wait for eth light client (#71) * feat: wait until light client receives info about block closes #63 * chore: added config.toml to .gitignore * chore: renamed method in evm worker * chore: made clippy happy * fix: issues after merging * chore: fixed style * chore: added example config * chore: moved `eth_light_client` under `evm` config * feat: check block number before claiming fee * feat: added sleep for light client waiting time * fix: don't wait for light client if we have vaa * fix: constructed proper `FinTransferArgs` * feat: added wormhole support for `claim_fee` worker * feat: expect either fintransfer or claimfee event * fix: provided correct args for claiming fee * chore: provided proper name for prover args constructor * feat: scratch implementation of fee estimation (#81) * feat: scratch implementation of fee estimation * refactor: few tweaks * chore: better way to handle `UpdateFee` event * Squashed commit of the following: commit 3d2e905 Author: Ivan Frolov <[email protected]> Date: Fri Oct 25 16:39:22 2024 +0200 chore: provided proper name for prover args constructor commit 8857140 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 22:48:15 2024 +0200 fix: provided correct args for claiming fee commit 160e0e3 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 22:14:02 2024 +0200 feat: expect either fintransfer or claimfee event commit 1a8def1 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 21:07:14 2024 +0200 feat: added wormhole support for `claim_fee` worker commit 1a3c711 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 20:49:32 2024 +0200 fix: constructed proper `FinTransferArgs` commit ad16b81 Merge: 8b469bc 4786123 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 15:35:10 2024 +0200 Merge branch 'relayer' into feat/wait-for-light-client commit 8b469bc Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 15:26:28 2024 +0200 fix: don't wait for light client if we have vaa commit 68821cd Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 15:23:01 2024 +0200 feat: added sleep for light client waiting time commit 998b21e Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 15:21:32 2024 +0200 feat: check block number before claiming fee commit ad692b6 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 15:18:27 2024 +0200 chore: moved `eth_light_client` under `evm` config commit 4786123 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 01:00:24 2024 +0200 chore: updated omni-types (#92) commit 96954ae Author: Ivan Frolov <[email protected]> Date: Thu Oct 17 11:16:32 2024 +0100 chore: added example config commit ad35e56 Author: Ivan Frolov <[email protected]> Date: Thu Oct 17 11:09:49 2024 +0100 chore: fixed style commit 7473caa Author: Ivan Frolov <[email protected]> Date: Thu Oct 17 11:07:26 2024 +0100 fix: issues after merging commit 316a90f Author: Ivan Frolov <[email protected]> Date: Wed Oct 9 14:42:46 2024 +0100 chore: made clippy happy commit 8d44254 Author: Ivan Frolov <[email protected]> Date: Wed Oct 9 14:07:31 2024 +0100 chore: renamed method in evm worker commit b3118d9 Author: Ivan Frolov <[email protected]> Date: Wed Oct 9 13:56:14 2024 +0100 chore: added config.toml to .gitignore commit f0677a8 Author: Ivan Frolov <[email protected]> Date: Wed Oct 9 13:42:03 2024 +0100 feat: wait until light client receives info about block closes #63 * Squashed commit of the following: commit 4786123 Author: Ivan Frolov <[email protected]> Date: Thu Oct 24 01:00:24 2024 +0200 chore: updated omni-types (#92) * fix: read estimated gas as u64 * chore: updated bridge-sdk * fix: removed unnecessary things from fee estimation * feat: added retry logic while estimating fee (#105) * feat: added retry logic and changed location for checking fee * refactor: swapped if blocks * feat: changed retry logic * fix: addressed issues * feat: support of multiple chains (#146) * feat: scratch implementation of supporting multiple chains * chore: removed claiming native fee on EVM chain * chore: updated example configuration * fix: getting vaa * feat: working version of relayer with multiple chains support * feat: call proper `fin_transfer` based on recipient chain * refactor: reduced code duplication by abstracting evm indexer * feat: removed `sign_claim_native_fee` logic * chore: removed few newlines * refactor: reduced code duplication in config structs * feat: getting native token id by calling a method * chore: added a disclaimer that `get_native_token_id` is not working for now * feat: made evm chains optional * feat: refactor evm bridge clients initialization * feat: solana support (#153) * feat: added solana indexer * feat: added finalization from solana * feat: finished solana init&finalize transfer * feat: added solana live logs support * feat: added support for `..._transfer_sol` methods * chore: updated bridge token addresses * fix: bug with provided chain_kind * fix: storage deposit amount calculation * chore: few log modifications * fix: few tweaks to make solana transfers work * feat: added native_fee support for storage_deposit args from solana * chore: add a todo mentioning that `get_storage_deposit_actions` method is redundant * chore: added comment about aws usage * refactor: reduced code duplication for creating storage deposit actions * fix: h160 address parsing * feat: solana transfer native tokens * fix: near -> sol native token transfer * fix: solana indexer logic * feat: support non-near to non-near transfers * feat: replaced anchor deserialization with borsh * chore: start from block + 1 Since this block was already processed, there's no need to check it one more time * fix: near sign transfer * fix: prevented issues that could result in panic * chore: updated bridge token address * fix: use eth light client only for eth chain * refactor: moved timestamps checks to the bottom This ensures at least one execution * chore: added some comments for solana network configuation * fix: use eth light client only for eth chain and when vaa is none * feat: made solana-indexer less complicated * feat: implemented fee check (#172) * chore: synced changes with main * chore: fmt * chore: added relayer to clippy makefile * feat: constructed persistent account keys from instruction (#191) * chore: updated mainnet example config * chore: removed `eth.rs` that was pulled from main during merge * refactor: simplify extraction of evm config * feat: added an option to provide solana credentials using path * chore: updated testnet `api_key` replacement * chore: renamed `RPC_API_KEY` to more specific `INFURA_API_KEY` * feat: improved the process of getting private keys from file * chore: removed unnecessary `Result` * chore: updated omni-types version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just to add some clarity, I want to provide a small explanation why do we need this logic
These are account keys that we can get from
raw_message.account_keys
:They are sorted based on few rules. Firstly, accounts are splitted into the groups and the priority is like this:
Then accounts in each group are sorted in lexicographical order, which means that this is way too impersistent for our use case. In order to get a strong order that will be based on our instructions we can look into
instruction.accounts
which is a simple&[u8]
with the correct strict position of each account key: