Skip to content

Extend DA layer client interface - #83

Merged
tzdybal merged 6 commits into
mainfrom
tzdybal/extend_dalc
Jul 20, 2021
Merged

Extend DA layer client interface#83
tzdybal merged 6 commits into
mainfrom
tzdybal/extend_dalc

Conversation

@tzdybal

@tzdybaltzdybal commented Jul 8, 2021

Copy link
Copy Markdown
Contributor

@tzdybaltzdybal self-assigned this Jul 8, 2021
@tzdybal
tzdybalforce-pushed the tzdybal/extend_dalc branch from 5e21c81 to f31c97fCompareJuly 9, 2021 09:57
@tzdybal
tzdybalforce-pushed the tzdybal/extend_dalc branch from f31c97f to 8367940CompareJuly 9, 2021 10:44
@tzdybal
tzdybal marked this pull request as ready for review July 9, 2021 21:12
@tzdybal
tzdybal requested review from evan-forbes and liamsi and removed request for liamsiJuly 9, 2021 21:12
@codecov-commenter

codecov-commenter commented Jul 9, 2021

Copy link
Copy Markdown

Codecov Report

Merging #83 (e37f945) into main (2e8849e) will increase coverage by 0.67%.
The diff coverage is 64.28%.

Impacted file tree graph

@@ Coverage Diff @@## main #83 +/- ##
==========================================
+ Coverage 57.15% 57.82% +0.67% 
==========================================
Files 19 21 +2 Lines 1230 1252 +22 ==========================================
+ Hits 703 724 +21 - Misses 428 432 +4 + Partials 99 96 -3 
Impacted FilesCoverage Δ
types/hashing.go0.00% <0.00%> (ø)
da/lazyledger/lazyledger.go10.00% <20.00%> (+1.37%)⬆️
da/mock/mock.go100.00% <100.00%> (ø)
state/executor.go72.59% <100.00%> (+2.08%)⬆️
store/store.go66.66% <100.00%> (+2.38%)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e8849e...e37f945. Read the comment docs.

Comment threadtypes/hashing.go
Comment on lines +9 to +13
func (h *Header) Hash() [32]byte {
return hash(h)
}

func (b *Block) Hash() [32]byte {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question: What's the rationale to use an array and not slice?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

  • crypto/sha3 returns array
  • we used arrays in structs, because hash is fixed size (logically)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we used arrays in structs, because hash is fixed size (logically)
Totally, but in practice, we don't use fixed-size arrays and kinda forcing users to always slice it themselves, but that is ok as long you ok with that.

Comment threadda/mock/mock_test.go
Comment threadda/da.go
@tzdybal
tzdybal requested a review from WondertanJuly 20, 2021 09:18
@tzdybal
tzdybal merged commit 9d4a9d3 into mainJul 20, 2021
@tzdybal
tzdybal deleted the tzdybal/extend_dalc branch May 2, 2023 19:40
Sign up for freeto 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.

Implement Mock Data Availability client Define universal Data Availability Retrieval API Define Universal Data Availability Check API

3 participants

@tzdybal@codecov-commenter@Wondertan