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

feat(parachain/availabilitystore): implement database access functions for availability store subsystem #3640

Merged
merged 25 commits into from
Jan 23, 2024

Conversation

edwardmack
Copy link
Contributor

Changes

This PR introduces code for handle database access for the availability store subsystem to enable write, read and delete of data to persistent storage.

Tests

go test github.com/ChainSafe/gossamer/dot/parachain/availability-store

Issues

closes: #3628

Primary Reviewer

@kishansagathiya @axaysagathiya

@kishansagathiya
Copy link
Contributor

Right now, if you try to build this directly it won't

kishan@kishan-Inspiron-14-7425-2-in-1:~/code/gossamer$ make gossamer 
rm -fr ./bin
  >  Building binary... 
go build -trimpath -o ./bin/gossamer -ldflags="-s -w" ./cmd/gossamer
# github.com/ChainSafe/gossamer/cmd/gossamer
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lerasure: No such file or directory
collect2: error: ld returned 1 exit status

make: *** [Makefile:80: build] Error 1

You will have to build the erasure lib first

cargo build --release --manifest-path=lib/erasure/rustlib/Cargo.toml

and then call make gossamer, which would work.

Let's add this into our ci workflows so that CI dont fail. Right now, this is what is causing CI fails in this PR.

Copy link
Contributor

@kishansagathiya kishansagathiya left a comment

Choose a reason for hiding this comment

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

Most of structs, methods in this package will likely not get used outside. Unless we have to scale encode or decode them, let's unexport them. I have pointed only at a few places, but there are many other places as well.

@edwardmack edwardmack force-pushed the ed/availabilityStoreDBAccess branch from d12bc14 to 4f69f58 Compare January 10, 2024 19:40
dot/parachain/availability-store/messages.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/messages.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
dot/parachain/availability-store/availability_store.go Outdated Show resolved Hide resolved
@P1sar P1sar added the S-subsystems-availability issues related to polkadot host availability subsystem functionality. label Jan 16, 2024
Copy link
Contributor

@kishansagathiya kishansagathiya left a comment

Choose a reason for hiding this comment

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

There are files that are being autogenerated inside lib/erasure/rustlib. Put them in .gitignore.

@kishansagathiya
Copy link
Contributor

There are files that are being autogenerated inside lib/erasure/rustlib. Put them in .gitignore.

My bad. lib/erasure/rustlib/target is the only part that is auto-generated. I was mistaken because I was checking out into developement which doesn't have lib/erasure/rustlib/target in gitignore, so It was showing them under untracked files. All good.

.gitignore Outdated Show resolved Hide resolved
Copy link
Member

@EclesioMeloJunior EclesioMeloJunior left a comment

Choose a reason for hiding this comment

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

LGTM

@edwardmack edwardmack enabled auto-merge (squash) January 23, 2024 18:04
@edwardmack edwardmack disabled auto-merge January 23, 2024 18:12
@edwardmack edwardmack enabled auto-merge (squash) January 23, 2024 18:12
@edwardmack edwardmack merged commit 7c94a6f into feat/parachain Jan 23, 2024
21 checks passed
@edwardmack edwardmack deleted the ed/availabilityStoreDBAccess branch January 23, 2024 19:17
kishansagathiya added a commit that referenced this pull request Jan 24, 2024
…s for availability store subsystem (#3640)

Co-authored-by: Kishan Sagathiya <[email protected]>
timwu20 pushed a commit that referenced this pull request Jun 15, 2024
…s for availability store subsystem (#3640)

Co-authored-by: Kishan Sagathiya <[email protected]>
timwu20 pushed a commit that referenced this pull request Jun 17, 2024
…s for availability store subsystem (#3640)

Co-authored-by: Kishan Sagathiya <[email protected]>
timwu20 pushed a commit that referenced this pull request Jun 20, 2024
…s for availability store subsystem (#3640)

Co-authored-by: Kishan Sagathiya <[email protected]>
kishansagathiya added a commit that referenced this pull request Jul 15, 2024
…s for availability store subsystem (#3640)

Co-authored-by: Kishan Sagathiya <[email protected]>
kishansagathiya added a commit that referenced this pull request Jul 15, 2024
…s for availability store subsystem (#3640)

Co-authored-by: Kishan Sagathiya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-subsystems-availability issues related to polkadot host availability subsystem functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants