Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

bsc light client #988

Merged
merged 32 commits into from
Jan 8, 2022
Merged

bsc light client #988

merged 32 commits into from
Jan 8, 2022

Conversation

xiaoch05
Copy link
Contributor

@xiaoch05 xiaoch05 commented Dec 8, 2021

  • Storage proof for precompile contract
  • Optimize for storage related to epoch.
  • Unit test & benchmark.

@xiaoch05 xiaoch05 marked this pull request as ready for review December 23, 2021 13:23
@github-actions
Copy link

github-actions bot commented Dec 27, 2021

Commit 23c3956

Pangolin

Check Runtime Version

Check Storage Prefix

Pallet BSC:
+ 	Item: Storage { name: "LatestBscHeader", type: Plain("BSCHeader") }​

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 23c3956

Pangolin

Check Runtime Version

Check Storage Prefix

Pallet BSC:
+ 	Item: Storage { name: "LatestBscHeader", type: Plain("BSCHeader") }​

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 46ff332

Pangolin

Check Runtime Version

Check Storage Prefix

Pallet BSC:
+ 	Item: Storage { name: "LatestBscHeader", type: Plain("BSCHeader") }​

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 9b6c0cc

Pangolin

Check Runtime Version

Check Storage Prefix

Pallet BSC:
+ 	Item: Storage { name: "LatestBscHeader", type: Plain("BSCHeader") }​

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 90d793f

Pangolin

Check Runtime Version

Check Storage Prefix

Pallet BSC:
+ 	Item: Storage { name: "LatestBscHeader", type: Plain("BSCHeader") }​

Pangoro

Check Runtime Version

Check Storage Prefix

Commit c27f9a1

Pangolin

Check Runtime Version

Check Storage Prefix

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 20bdb23

Pangolin

Check Runtime Version

Check Storage Prefix

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 70712d3

Pangolin

Check Runtime Version

Check Storage Prefix

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 965141c

Pangolin

Check Runtime Version

Check Storage Prefix

Pangoro

Check Runtime Version

Check Storage Prefix

Commit 18faa7d

Pangolin

Check Runtime Version

Check Storage Prefix

Pangoro

Check Runtime Version

Check Storage Prefix

@hackfisher
Copy link
Contributor

hackfisher commented Jan 5, 2022

Remove, cause we will not use inherent for update authority

		/// Verify unsigned relayed headers and finalize authority set
		#[pallet::weight(0)]
		pub fn verify_and_update_authority_set_unsigned(
			origin: OriginFor<T>,
			headers: Vec<BSCHeader>,
		) -> DispatchResultWithPostInfo {
			// ensure not signed
			frame_system::ensure_none(origin)?;

			Self::verify_and_update_authority_set(&headers)?;

			Ok(().into())
		}

@hackfisher
Copy link
Contributor

Request to simplify the implementation because BSC's epoch length is 200 and block interval is 3 seconds, relaying epoch block is enough for message verification.

Remove

pub fn submit_header(
			origin: OriginFor<T>,
			header: BSCHeader,
		) -> DispatchResultWithPostInfo {
...

and

pub fn verify_header(header: &BSCHeader) -> DispatchResult {

Copy link
Contributor

@hackfisher hackfisher left a comment

Choose a reason for hiding this comment

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

LGTM, @AurevoirXavier @hujw77 Please help review

@hackfisher hackfisher requested a review from hujw77 January 5, 2022 07:59
Copy link
Contributor

@hujw77 hujw77 left a comment

Choose a reason for hiding this comment

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

LGTM

@hackfisher hackfisher requested a review from aurexav January 7, 2022 11:40
@aurexav
Copy link
Member

aurexav commented Jan 7, 2022

Let me resolve the conflict.

@aurexav aurexav marked this pull request as draft January 7, 2022 17:26
@aurexav aurexav mentioned this pull request Jan 7, 2022
@aurexav aurexav marked this pull request as ready for review January 7, 2022 17:30
@hackfisher hackfisher merged commit 7212cce into main Jan 8, 2022
@hackfisher hackfisher deleted the bsc-light-client branch January 8, 2022 03:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants