Skip to content
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

AutoRelayer: VaaKey -> MessageKey #3297

Merged
merged 11 commits into from
Aug 25, 2023

Conversation

JoeHowarth
Copy link
Contributor

@JoeHowarth JoeHowarth commented Aug 17, 2023

@derpy-duck
Copy link
Contributor

derpy-duck commented Aug 21, 2023

There should likely be a forge test testing message key end-to-end right (maybe just with the key being 'identify token bridge message' or something?) - would likely require updates to the MockGenericRelayer to support that message key type

edit: Oh I think I see - you did the updates to mockgenericrelayer by just having it be true always

but still, maybe at least one forge test that uses MessageKeys end to end would be ideal!

@JoeHowarth JoeHowarth changed the base branch from auto-relayer/cheap-cross-chain-refunds to auto-relayer/rm-forwards August 21, 2023 16:50
@JoeHowarth JoeHowarth marked this pull request as ready for review August 21, 2023 16:53
Base automatically changed from auto-relayer/rm-forwards to auto-relayer/v1.1 August 21, 2023 16:54
@@ -195,7 +225,37 @@ abstract contract WormholeRelayerSend is WormholeRelayerBase, IWormholeRelayerSe
refundChain,
refundAddress,
deliveryProviderAddress,
vaaKeys,
WormholeRelayerSerde.vaaKeyArrayToMessageKeyArray(vaaKeys), // why doesn't this work without the 'WormholeRelayerSerde.' ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'd have to write vaaKeys.vaaKeyArrayToMessageKeyArray() if you wanted to do this. Not certain, but worth a shot

@@ -112,7 +114,7 @@ abstract contract WormholeRelayerDelivery is WormholeRelayerBase, IWormholeRelay
}

// Revert if the VAAs delivered do not match the descriptions specified in the instruction
checkVaaKeysWithVAAs(instruction.vaaKeys, encodedVMs);
checkMessageKeysWithMessagess(instruction.messageKeys, encodedVMs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe fix this typo - 'Messages'

function checkVaaKeysWithVAAs(
VaaKey[] memory vaaKeys,
bytes[] memory signedVaas
function checkMessageKeysWithMessagess(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@derpy-duck
Copy link
Contributor

encodeVaaKeyArray can be removed from WormholeRelayerSerde by the way

@JoeHowarth JoeHowarth merged commit 9a5e606 into auto-relayer/v1.1 Aug 25, 2023
22 checks passed
@JoeHowarth JoeHowarth deleted the auto-relayer/message-key branch August 25, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants