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: ledger #392

Merged
merged 36 commits into from
Jul 17, 2024
Merged

feat: ledger #392

merged 36 commits into from
Jul 17, 2024

Conversation

jdutchak
Copy link
Contributor

@jdutchak jdutchak commented Jul 2, 2024

As part of #345 we have decided to go with our on-chain ledger rather then using another third party ledger.

The key takeaways are:

our own ledger that can store a limited set of data in the on-chain ledger. The ledger is implemented similarly to what EdgeVPN uses.
The ledger can be used to store a CID (content addressable ID) to reference a data that is carried over with the ledger. that for instance can be used to store big files or content that doesn't fit the ledger (see also #345 (comment) )
The ledger can be written only by trusted nodes, but can be read by all nodes of the network
For development, we can also point to an IPFS CID that is then pinned by the oracle nodes. That would allow us to quickly iterate in the short term while we develop a CID system inside our own protocol.
This card is about wrapping up the esperimental PR work in #350 and have it merged in the repository.

Describe alternatives you've considered
Using an external blockchain as a ledger (see discussions in #345)

Acceptance criteria
#350 is wrapped up and merged in the codebase

@jdutchak jdutchak changed the title Feature/380 On chain ledger Ticket #380 Jul 2, 2024
@jdutchak jdutchak linked an issue Jul 2, 2024 that may be closed by this pull request
1 task
@mudler mudler changed the title On chain ledger Ticket #380 feat(ledger): subscribe node to receiving blocks Jul 2, 2024
@mudler mudler added the enhancement New feature or request label Jul 2, 2024
@jdutchak jdutchak changed the title feat(ledger): subscribe node to receiving blocks feat: On chain ledger #380 Jul 2, 2024
@mudler
Copy link
Contributor

mudler commented Jul 2, 2024

@jdutchak can you add a description to the PR and have the title reflect what's the changeset? thank you!

It's just because #384 or even #350 have similar title and it's hard to track down when a change went into the code (for release notes, etc).

cmd/masa-node/main.go Outdated Show resolved Hide resolved
pkg/chain/block.go Outdated Show resolved Hide resolved
.github/workflows/e2e.yaml Outdated Show resolved Hide resolved
.github/workflows/e2e.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

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

Changes overall looks good, however:

RELEASE_NOTES.md Outdated Show resolved Hide resolved
Copy link
Contributor

@restevens402 restevens402 left a comment

Choose a reason for hiding this comment

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

Looks good. Blocks are clean and straightforward. Let's go!

.github/workflows/e2e.yaml Outdated Show resolved Hide resolved
pkg/api/handlers_node.go Outdated Show resolved Hide resolved
pkg/workers/workers.go Outdated Show resolved Hide resolved
pkg/workers/workers.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

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

Few changes requested but ignored - some of them are nitpicks, but I think some of these needs to be addressed before merging:

  • please split the release note changes to a separate PR
  • update the PR title/description to match the changeset
  • brittle pointer dereference

Otherwise looks good - nice job!

@mudler
Copy link
Contributor

mudler commented Jul 12, 2024

re: commitlint, if you rebase on top of test now that error should be gone, the CI checks now PR title/description rather then single commits

@jdutchak jdutchak changed the title feat: On chain ledger #380 feature/ledger Jul 12, 2024
@jdutchak jdutchak changed the title feature/ledger feature:ledger Jul 12, 2024
@jdutchak jdutchak changed the title feature:ledger feat:ledger Jul 12, 2024
@jdutchak jdutchak changed the title feat:ledger feat: ledger Jul 12, 2024
Copy link
Contributor Author

@jdutchak jdutchak left a comment

Choose a reason for hiding this comment

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

done

pkg/workers/workers.go Outdated Show resolved Hide resolved
mudler
mudler previously approved these changes Jul 17, 2024
Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

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

Looking good! great job 🥳

Signed-off-by: mudler <mudler@localai.io>
@jdutchak jdutchak merged commit b075a62 into test Jul 17, 2024
9 checks passed
@jdutchak jdutchak deleted the feature/380 branch July 17, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: On chain ledger
4 participants