chopsticks
chopsticks copied to clipboard
Mock grandpa and beefy rpc to allow P<>K bridge-init calls using chopsticks
Context: https://github.com/paritytech/polkadot-sdk/issues/3522
I think it is doable. However, Chopsticks is only a mocking client that doesn't actually finalize blocks using grandpa/beefy protocol so that it cannot provide real justifications.
There are two possible solutions:
1. Add a new feature to specify signing keys to Chopsticks so it can generate valid justifications. 2. Modify relayer to accept mock justifications. This will be useful to fork mainnet and run tests with it. As it is not possible to get real justifications from mainnet fork.
Let me know what do you think.
Also opened a tracking issue at Chopsticks AcalaNetwork/chopsticks#681
Thank you for opening this issue ! Moving the discussion here.
In the short term, mock or even empty finality proofs would help. We could probably modify the relayer and update the bridge hubs code to skip proof verification and run a basic test like this just to make sure that the rest of the functionality works. But it would be a complicated manual setup, and also it wouldn't cover everything.
So, in the long run, it would be great to have valid finality proofs though.
@serban300 can you give this a look and give it a try? https://github.com/AcalaNetwork/chopsticks/pull/695
it is currently just return mock data (0x7777...
). Let us know if that works or if anything adjustments are needed
@xlc Thank you ! Will give it a try next week.