-
Notifications
You must be signed in to change notification settings - Fork 20
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
Remove EIP 55 check from atomic_bridge_counterparty::lock_bridge_transfer_assets
and use EventHandle
for events
#87
Remove EIP 55 check from atomic_bridge_counterparty::lock_bridge_transfer_assets
and use EventHandle
for events
#87
Conversation
IMHO, this is a big mistake. Either you check compliance of addresses with EIP-55 everywhere or not. As I mentioned before, this is a very dangerous strategy to remove tests because something is supposed to have happened before. I am strongly opposed to this kind of bypassing security devices. |
@franck44 see the issue : We are working toward deploying the new version of the bridge relayer on Thursday, we can follow up with EIP-55 implementations anytime between now and next week. |
Weren't the concerns you previously mentioned focused on the Movement -> Eth direction? Why do you think EIP-55 compliance checks should be everywhere or not? Shouldn't they only be where there's a possibility that a user manually enters an Eth address they didn't intend to use? |
In our case the address will always come from the wallet in the browser, no address would ever be entered manually. It only protects against the case that somewhere the address could be manipulated by some code, our own, or malicious. |
@andygolay Just wanted to confirm, when you set the e2e relayer tests to use this version of the framework, the e2e tests on the relayer for the transfer Eth -> Movement are passing, right? |
It wouldn't even protect against that, as far as I can tell. If an address is manipulated by some code between One thing to consider @franck44 is that in the emitted event, it's taking the value of the intiator Eth address from If someone calls If One point @0xPrimata raised is that in the Eth -> Movement direction, checking the Movement address a user enters is something worth considering. But I don't see the need to check the Eth address in the Move contract after a successful |
No, sent you a message in Slack about those tests. |
Ok I think before this goes in we want to make sure the e2e on relayer is passing, as we may need to modify further here. |
Yeah agreed 100% |
Set to draft until relayer tests pass |
I would agree making assumptions off chain isn't wise and I would also prefer to see validation on chain, in which we trust, where possible. If this is a PR to alleviate an operational requirement or to test then perhaps it should be either feature flagged or even deployed as a branch with this change and avoid merging to our trunk |
Regarding the branching, I'll defer to project management. That seems good, to keep it out of As for validation, it's not an assumption about anything off-chain, that the bridge operator is the only one who can call One note, that I think is more at the crux of the matter: EIP-55 does not validate an Ethereum address's existence or correctness (with respect to having a balance, transactions, or association any contracts). It is only a checksum to avoid typos when humans manually enter an address. It makes sense in the Movement -> Eth direction because there a user, the initiator may manually enter an Ethereum address as the recipient. But in the Eth -> Movement direction, and I'll pose this as a question to @franck44 as well: Can you describe a scenario in which the initiator successfully calls |
Keeping this open just for visibility as we are using this revision elsewhere |
…eip-55-from-counterparty-lock
@0xmovses @franck44 @andygolay Otherwise this is defacto "shipping what we have." |
Description
initiateBridgeTransfer
will already have been successfully called on the Eth initiator side, there is no need to check EIP-55 compliance inatomic_bridge_counterparty::lock_bridge_transfer_assets
.ethereum_address_no_eip55
containing a checkassert_40_char_hex
to check that the address is a nonzero 40-character hex string.How Has This Been Tested?
aptos move test
passes for all tests inaptos-move/framework/aptos-framework/sources
aptos-move/e2e-move-tests
and runcargo test bridge
.aptos move prove
) results in success.Key Areas to Review
Note: I don't think this is an ideal long-term solution. If it's helpful for launching the bridge with consistent event monitoring in the short-term, for the sake of consistency with how event monitoring was done with the first iteration of Move modules.
Type of Change
Which Components or Systems Does This Change Impact?
Checklist