Near-One / rainbow-bridge

🌈🌈🌈 NEAR <> Ethereum Decentralized Bridge
GNU General Public License v3.0
326 stars 99 forks source link

Eth2-to-Near-relay: single shot mode improvements #798

Open sept-en opened 2 years ago

sept-en commented 2 years ago

I think it's quite weird for us to get LightClientUpdate from the file this won't help to synchronize. The idea for a single shot run was to fetch the beacon state from the file and then build the custom light client update as we already built in the code. But in this case, we need to provide a light client update in the file, and it seems as it looks like even if we obtain a beacon state and the relayer is not able to do so (for some reason), then we need somehow to build custom LightClientUpdate without the relayer's code.

_Originally posted by @sept-en in https://github.com/aurora-is-near/rainbow-bridge/pull/787#discussion_r968833958_

olga24912 commented 2 years ago

@sept-en I don't get this issue

I construct light_client_update in that line https://github.com/aurora-is-near/rainbow-bridge/blob/master/eth2near/eth2near-block-relay-rs/src/eth2near_relay.rs#L98

And I construct it from file with BEACON STATE, NOT with light client update https://github.com/aurora-is-near/rainbow-bridge/blob/master/eth2near/eth2near-block-relay-rs/src/eth2near_relay.rs#L247