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: migrate the libtm repo to tm2/pkg/libtm #2424

Merged
merged 31 commits into from
Jun 24, 2024
Merged

Conversation

zivkovicmilos
Copy link
Member

@zivkovicmilos zivkovicmilos commented Jun 24, 2024

Description

After thorough discussions with @moul, this PR migrates the repo contents of libtm (currently private) to the gno monorepo, under tm2/pkg/libtm, while preserving the original git history.

We envision this library being used outside the gno repo, and have thus migrated its original go.mod.
Please reference the README.md for additional details

Related:

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

petar-dambovaliev and others added 29 commits February 20, 2024 12:47
* Setup repo

* Create LICENSE

* Bump golangci/golangci-lint-action from 3 to 4 (#1)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3...v4)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Initial foundation pseudocode

* Bump go version

* Add message proto definitions

* Add initial collector logic

* Add temporary fetch messages to the collector

* Significantly simplify the message storage

* Add unit tests for the collector

* Remove dupl lint

* Split up the subscribe unit test

* Simplify remove case

* Drop old message queue

* Change AddMessage sig

* Tidy go mod

* Remove leftover pb.go

* Tidy go mod

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update proto location

* Add initial consensus flow

* Detail consensus flow

* Add unit tests for the propose timeout
* Add comments relating to the whitepaper

* Add missing continue
* Simplify message passing

* Add unit tests for message marshalling, payload manipulation
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* save

* save

* save

* save

* save

* save

* save
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add runPropose verification

* Add runPrevote verification

* Add prevote step timeout

* Add runPrecommit verification

* Update watchForRoundJumps

* Add missing cleanup, broadcast

* Clean up the consensus state

* Remove leftover comment

* Simplify the final timer expiring

* Add additional comments to the types

* Add support for options

* Swap out the useless bloom
* Add proposer test case

* Add proposer test case for utilizing old proposal

* Simplify view comparison in tests

* Add runPropose verification

* Add runPrevote verification

* Add prevote step timeout

* Add runPrecommit verification

* Update watchForRoundJumps

* Add missing cleanup, broadcast

* Clean up the consensus state

* Remove leftover comment

* Simplify the final timer expiring

* Add additional comments to the types

* Add support for options

* Fix uninitialized logger in tests

* Add unit test for non-proposer receiving a fresh proposal

* Swap out the useless bloom

* Add unit tests for non-proposer receiving invalid proposals

* Add unit tests for runPrevote

* Add unit tests for runPrecommit

* Add unit tests for the cache, options, quorum

* Simplify state timeouts

* Add unit tests for future round jumps

* Add unit tests for dropping messages

* Add unit tests for dropping messages
* Add proposer test case

* Add proposer test case for utilizing old proposal

* Simplify view comparison in tests

* Add runPropose verification

* Add runPrevote verification

* Add prevote step timeout

* Add runPrecommit verification

* Update watchForRoundJumps

* Add missing cleanup, broadcast

* Clean up the consensus state

* Remove leftover comment

* Simplify the final timer expiring

* Add additional comments to the types

* Add support for options

* Fix uninitialized logger in tests

* Add unit test for non-proposer receiving a fresh proposal

* Swap out the useless bloom

* Add unit tests for non-proposer receiving invalid proposals

* Add unit tests for runPrevote

* Add unit tests for runPrecommit

* Add unit tests for the cache, options, quorum

* Simplify state timeouts

* Add unit tests for future round jumps

* Add unit tests for dropping messages

* Add unit tests for dropping messages

* Add initial cluster tests, simplify state

* Add coverage for message equals

* Fix race conditions
* Add codecov upload

* Add codecov token

* Add more options for codecov upload

* Change codecov setup
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…d proposal (#19)

* Add additional check in precommit filter

* Remove log param

* Make codecov version be major
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v4...v6)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps google.golang.org/protobuf from 1.33.0 to 1.34.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps google.golang.org/protobuf from 1.34.0 to 1.34.1.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps google.golang.org/protobuf from 1.34.1 to 1.34.2.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@zivkovicmilos zivkovicmilos added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Jun 24, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.65%. Comparing base (bedd0f9) to head (a51432a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2424   +/-   ##
=======================================
  Coverage   54.65%   54.65%           
=======================================
  Files         583      583           
  Lines       78508    78508           
=======================================
+ Hits        42909    42912    +3     
+ Misses      32385    32383    -2     
+ Partials     3214     3213    -1     
Flag Coverage Δ
contribs/gnodev 23.81% <ø> (ø)
contribs/gnofaucet 15.31% <ø> (+0.85%) ⬆️
contribs/gnokeykc 0.00% <ø> (ø)
contribs/gnomd 0.00% <ø> (ø)
gno.land 62.13% <ø> (ø)
tm2 54.35% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@moul moul left a comment

Choose a reason for hiding this comment

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

LGTM. We can even state in the README that we plan to make libtm independent (repo, governance) once we've successfully integrated with tm2, proving that the codebase and its API are stable enough.

@zivkovicmilos
Copy link
Member Author

ac67bcf

@moul

I've added a disclaimer in the README as part of:
ac67bcf

@zivkovicmilos zivkovicmilos merged commit 072aef3 into master Jun 24, 2024
84 checks passed
@zivkovicmilos zivkovicmilos deleted the migrate-libtm branch June 24, 2024 17:34
gfanton pushed a commit to gfanton/gno that referenced this pull request Jul 23, 2024
## Description

After thorough discussions with @moul, this PR migrates the repo
contents of [libtm](https://github.com/gnolang/libtm) (currently
private) to the gno monorepo, under `tm2/pkg/libtm`, while preserving
the original git history.

We envision this library being used outside the `gno` repo, and have
thus migrated its original `go.mod`.
Please reference the `README.md` for additional details

Related:
- gnolang#2337 

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Petar Dambovaliev <petar.atanasov.1987@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants