diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4c7de8e..dd3e948 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,8 @@ updates: - package-ecosystem: "cargo" directory: "/" schedule: - interval: "weekly" + interval: "monthly" + open-pull-requests-limit: 3 ignore: # These are peer deps of Cargo and should not be automatically bumped - dependency-name: "semver" @@ -14,7 +15,8 @@ updates: - package-ecosystem: 'github-actions' directory: '/' schedule: - interval: 'weekly' + interval: "monthly" + open-pull-requests-limit: 3 commit-message: prefix: chore include: scope diff --git a/CHANGELOG.md b/CHANGELOG.md index 5036e2a..db7513c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,183 +2,87 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - -## [vVERSION](https://github.com/graphops/poi-radio/compare/v0.1.0...vVERSION) - -### Commits - -- feat: move integration tests to main repo [`641495f`](https://github.com/graphops/poi-radio/commit/641495f9c54f38dc8d28fdc2d11bb002382ecaf1) -- feat: add Grafana dashboard config [`bd52e86`](https://github.com/graphops/poi-radio/commit/bd52e86c58005d0b4bfe458bcba47cf9dc41f38a) -- feat: new release process and changelog script [`705501d`](https://github.com/graphops/poi-radio/commit/705501dbdeeea2e2b142bdd11f511a1b982b1615) -- chore: release v0.1.1 [`1409293`](https://github.com/graphops/poi-radio/commit/1409293732b390e820e67615fffcb0d8db12aaeb) -- fix: remove api metrics path [`3303c64`](https://github.com/graphops/poi-radio/commit/3303c64de20be7ffc5b90625f278cb6480e51b37) -- refactor: add upx stage to Dockerfile [`a5c6c3d`](https://github.com/graphops/poi-radio/commit/a5c6c3d586b8cb8b9013a6b0033393a23f22fc85) - -## [v0.1.0](https://github.com/graphops/poi-radio/compare/0.0.13...v0.1.0) - 2023-04-21 - -### Commits - -- chore: release v0.1.0 [`d4a5d34`](https://github.com/graphops/poi-radio/commit/d4a5d346eac9ee04c2e2529be5ee26ad75f1b5ce) -- feat: add (auto)metrics & logs; fix: msg id & comparison and clean logic [`526e8a8`](https://github.com/graphops/poi-radio/commit/526e8a87142e8d3eeacdbc61bbfd64eac5c61073) -- refactor: parallel messaging [`9c63196`](https://github.com/graphops/poi-radio/commit/9c6319613a4187b92dba26201c7921c27e499983) -- feat: basic http service for health/metrics/graphQL queries [`10797b0`](https://github.com/graphops/poi-radio/commit/10797b01cfebd53ed47e9e70eed8852ead0d3bb7) -- refactor: update for attestation stake f32 [`06d93aa`](https://github.com/graphops/poi-radio/commit/06d93aab316f5f64797bd22eefc16be766b693ed) -- feat: add basic Prometheus support [`b440dfe`](https://github.com/graphops/poi-radio/commit/b440dfe834dc205fdb4c25742e76a2542ed41662) -- fix: check for null node [`5ac337d`](https://github.com/graphops/poi-radio/commit/5ac337da04b5cfc86a1bd5f078707a3e79326c25) -- chore: tweak crates badge [`fffed01`](https://github.com/graphops/poi-radio/commit/fffed01d5bffa2571fa5bcb90301af44d49dd54a) - -## [0.0.13](https://github.com/graphops/poi-radio/compare/0.0.12...0.0.13) - 2023-03-28 - -### Commits - -- fix: more checks for message uniqueness [`c2c1988`](https://github.com/graphops/poi-radio/commit/c2c1988f9155d7697f0de0abbbaabff49a77e1c8) -- chore: bump SDK dep [`41a5a6d`](https://github.com/graphops/poi-radio/commit/41a5a6d0c5978fe0b6aeee7b5765f3675255016a) -- chore: rollback version number [`2868d2e`](https://github.com/graphops/poi-radio/commit/2868d2e32f8331759a50e555e2ac3aafd69818f3) - -## [0.0.12](https://github.com/graphops/poi-radio/compare/0.0.11...0.0.12) - 2023-03-27 - -### Commits - -- feat: attestation indexer sender group sort and hash [`d63d8b9`](https://github.com/graphops/poi-radio/commit/d63d8b9fdb0b1ed30ac3d18ef95aa616b4af8401) -- refactor: logging improvement [`d5f1781`](https://github.com/graphops/poi-radio/commit/d5f1781fe95ede74801973ac6dcebcfd3d086ce2) -- feat: pruning local+remote after expiry, update collect window to local [`e46bd93`](https://github.com/graphops/poi-radio/commit/e46bd93a1f5d1f0e678a79e041dfa0d9a62640b0) -- refactor: improve compare attestations logs [`e7d3bf0`](https://github.com/graphops/poi-radio/commit/e7d3bf0f90668ca42aa23064df4516269143371c) -- feat: sdk version update + use Config, add logs [`2c425cd`](https://github.com/graphops/poi-radio/commit/2c425cd6e85f03a1320af80a127718e02d8febb5) -- fix: compare attestations check all local entries [`772fc07`](https://github.com/graphops/poi-radio/commit/772fc07336a9035f763f9845b36f6a2c4b88b0ec) -- feat: topic levels, stake by alloc status, logs calc [`94f70fe`](https://github.com/graphops/poi-radio/commit/94f70fecc44a9f24a1c3ceb8954aa55b58608745) -- feat: release note auto-gen and docker semvar tagging [`21714b9`](https://github.com/graphops/poi-radio/commit/21714b9e1a6fb783eccf1f5cb60766fe30dd4374) -- feat: add notifications [`3464f4b`](https://github.com/graphops/poi-radio/commit/3464f4b090c88924da82638eafa41b2c832b0084) -- chore: slim down Dockerfile [`a172672`](https://github.com/graphops/poi-radio/commit/a172672cd2067233f43fea5559d0988a299998dc) -- chore: add ca-certificates to Dockerfile [`ee454b9`](https://github.com/graphops/poi-radio/commit/ee454b94c9c7a217ef6cae39cc061e37790eb611) -- docs: Updated pull request template (#77) [`f565301`](https://github.com/graphops/poi-radio/commit/f5653013bc8f0fb79c39b4c6f6ed736355f1fe57) -- chore: bump version [`2e0ebfc`](https://github.com/graphops/poi-radio/commit/2e0ebfc3725b5551bb764aebfb9ae166111af70e) -- chore: publish to crates.io [`1cd0b51`](https://github.com/graphops/poi-radio/commit/1cd0b51a284e0fee7fcc85a7a318d107e1818080) - -## [0.0.11](https://github.com/graphops/poi-radio/compare/0.0.10...0.0.11) - 2023-03-16 - -### Commits - -- Merge pull request #65 from graphops/petko/add-notifications [`009070d`](https://github.com/graphops/poi-radio/commit/009070de9600187cf7e7a3352f8a47bd7c926283) -- feat: add notifications [`5f9d64e`](https://github.com/graphops/poi-radio/commit/5f9d64e267b9c4c4732d434a5e9eef85c66d1cbc) -- refactor: logging improvement #63 [`1e2809c`](https://github.com/graphops/poi-radio/commit/1e2809ccb8f1e769cd688a9f90bedc94e5ba1810) -- refactor: logging improvement [`de88de6`](https://github.com/graphops/poi-radio/commit/de88de6d7538f43677b716502028b9dd99e0ed25) -- feat: sdk version update + use Config, add logs #51 [`13890c3`](https://github.com/graphops/poi-radio/commit/13890c34cfce5b01048c2b2c60b48d6055d65a11) -- feat: sdk version update + use Config, add logs [`41783e4`](https://github.com/graphops/poi-radio/commit/41783e4321d34f5a33754d3eabe274b1301bc6d7) - -## [0.0.10](https://github.com/graphops/poi-radio/compare/0.0.9...0.0.10) - 2023-03-14 - -chore: add ca-certificates to Dockerfile - -### Merged - -- chore: add ca-certificates to Dockerfile [`#54`](https://github.com/graphops/poi-radio/pull/54) - -## [0.0.9](https://github.com/graphops/poi-radio/compare/0.0.8...0.0.9) - 2023-03-13 - -chore: slim down Dockerfile - -### Merged - -- chore: slim down Dockerfile [`#50`](https://github.com/graphops/poi-radio/pull/50) - -## [0.0.8](https://github.com/graphops/poi-radio/compare/0.0.7...0.0.8) - 2023-03-10 - -### Merged - -- refactor: improve compare attestations logs [`#48`](https://github.com/graphops/poi-radio/pull/48) -- chore: add tag to Docker image [`#43`](https://github.com/graphops/poi-radio/pull/43) - -### Commits - -- Merge pull request #49 from graphops/petko/publish [`d0e7839`](https://github.com/graphops/poi-radio/commit/d0e7839b36f02bfe2e7e88562b4dc8760da90f97) -- chore: publish to crates.io [`6765ce7`](https://github.com/graphops/poi-radio/commit/6765ce7b1f7cd07e58093c63970f7c799bde5965) - -## [0.0.7](https://github.com/graphops/poi-radio/compare/0.0.4...0.0.7) - 2023-02-28 - -chore: bump version, publish to crates.io - -### Merged - -- chore: bump version, publish to crates.io [`#42`](https://github.com/graphops/poi-radio/pull/42) - -### Commits - -- feat: env config block duration #41 [`f6f0e50`](https://github.com/graphops/poi-radio/commit/f6f0e50dd9cbbd6f848d23c17c2964cbf1d5a4b5) -- feat: indexing network specific poi query [`090ef3b`](https://github.com/graphops/poi-radio/commit/090ef3b191f7f3af2608a4e47a3b23876f98ec87) -- refactor: remove provider for graph node query blocks [`0171acb`](https://github.com/graphops/poi-radio/commit/0171acb6719d6961a52a1c3ade2a13782986c9da) -- feat: use indexing status to query block info [`e85f6d4`](https://github.com/graphops/poi-radio/commit/e85f6d4651fc6f67888b405ac79bfe2901dc6afd) -- feat: tweak check for comparison trigger [`ca3578a`](https://github.com/graphops/poi-radio/commit/ca3578a777fbefe256d8405b0461ffe926e8646e) -- feat: env config block duration [`3727b58`](https://github.com/graphops/poi-radio/commit/3727b5852ca0c47c0baa05f139df2af29ce1192d) -- refactor: time based comparision [`7a6d065`](https://github.com/graphops/poi-radio/commit/7a6d065d71b0e2e72120f056969e1569f3ed9bf5) -- periodic topic updates #37 [`387cb7e`](https://github.com/graphops/poi-radio/commit/387cb7e6d5c6e0ebe57eb54e243a736233f7a0b6) -- feat: use indexing status to query block info #35 [`7110e14`](https://github.com/graphops/poi-radio/commit/7110e146941f684f3935080903dae3a763431b17) -- feat: waku specific node key and log level [`dedc77d`](https://github.com/graphops/poi-radio/commit/dedc77d896b81cd15d5def4c69e6d329d6747b0e) -- refactor: new graphcast registry link, rename graphcast vars [`75377d7`](https://github.com/graphops/poi-radio/commit/75377d748741f813200d1a119bd7fe7ee49200f5) -- feat: add update to allocation topics [`a6ff152`](https://github.com/graphops/poi-radio/commit/a6ff152f61ee554b4ed3955b18d592ae589b97b9) -- feat: use environmental variable for pubsub #36 [`e633192`](https://github.com/graphops/poi-radio/commit/e633192bb31fbc0a3dc13caacc5618658bbb30c3) -- feat: use environmental variable for pubsub [`e7a6f54`](https://github.com/graphops/poi-radio/commit/e7a6f54db5375d25eadfbd85e646c1142d92d2f5) -- Merge pull request #34 from graphops/petko/bump-graphcast-sdk [`b071070`](https://github.com/graphops/poi-radio/commit/b071070667f646d83b305730f865e30d45b9112a) -- chore: bump graphcast-sdk version [`66dad77`](https://github.com/graphops/poi-radio/commit/66dad7717c3f37ca41312a61f248bc8f688e59c1) -- POI query uses subgraph indexing network specific block #22 [`43ebdc4`](https://github.com/graphops/poi-radio/commit/43ebdc46b278d80a901a952757a2b68d28c49cbd) -- feat: add multichain block clock [`f50948c`](https://github.com/graphops/poi-radio/commit/f50948c5cf4dfdadb326084ce57e8abad980f224) -- chore(deps): remove waku dep, use specific commit of sdk [`843f7ea`](https://github.com/graphops/poi-radio/commit/843f7ea7bcc595381c85559997598f199e00af29) -- refactor: new graphcast registry link, rename graphcast vars #31 [`cdb586c`](https://github.com/graphops/poi-radio/commit/cdb586c4d59651e38b249f1ee30050d8d4578ca4) -- feat: waku specific node key and log level #21 [`b2623e1`](https://github.com/graphops/poi-radio/commit/b2623e1c6c93ead36cb2daced942bba7cb3b7ca4) -- refactor: update to new sdk error handling [`a3cb502`](https://github.com/graphops/poi-radio/commit/a3cb50272aeca3f57b0f5d0a9c687ac5c3eaeb48) - -## [0.0.4](https://github.com/graphops/poi-radio/compare/0.0.3...0.0.4) - 2023-02-07 - -bugfix: remove boot flag from Dockerfile - -### Merged - -- bugfix: remove boot flag from Dockerfile [`#20`](https://github.com/graphops/poi-radio/pull/20) - -### Commits - -- fix: remove boot flag from Dockerfile [`ea11e8e`](https://github.com/graphops/poi-radio/commit/ea11e8e3d91b9c077a1b6bf06636925cf062ea8c) - -## [0.0.3](https://github.com/graphops/poi-radio/compare/0.0.2...0.0.3) - 2023-01-31 - -### Commits - -- fix: stake query address #19 [`9fe02d4`](https://github.com/graphops/poi-radio/commit/9fe02d434dc239c8babbf6eb71881502feb2a71b) -- fix: stake query address [`2351429`](https://github.com/graphops/poi-radio/commit/235142958a19a116f5a9508b8e6fecbb6b1f5bf7) - -## [0.0.2](https://github.com/graphops/poi-radio/compare/0.0.1...0.0.2) - 2023-01-31 - -Add workflow to build and upload Docker images - -### Merged - -- Add workflow to build and upload Docker images [`#18`](https://github.com/graphops/poi-radio/pull/18) -- refactor: fix release binaries workflow [`#15`](https://github.com/graphops/poi-radio/pull/15) -- refactor: improve Dockerfile [`#13`](https://github.com/graphops/poi-radio/pull/13) - -### Commits - -- feat: add workflow to build and upload Docker images [`1a245ad`](https://github.com/graphops/poi-radio/commit/1a245adde88fe34b2e4a9829d32873e4426907c9) -- Default topics based on active allocations #17 [`432d0b8`](https://github.com/graphops/poi-radio/commit/432d0b8e090ecc0603d4eb4e2a98aa472cbc2b7b) -- refactor: default topics [`83ed9f5`](https://github.com/graphops/poi-radio/commit/83ed9f5d646a4cd5ba08ae36688246f4383ee62d) -- Merge pull request #14 from graphops/petko/add-tracing [`edb1852`](https://github.com/graphops/poi-radio/commit/edb18522be57b2ed5fc57025b1d774cd609ff61d) -- refactor: Improve Dockerfile [`d146688`](https://github.com/graphops/poi-radio/commit/d146688131f4fb51796c8c309d079daf6fed82dc) -- refactor: add tracing [`da29801`](https://github.com/graphops/poi-radio/commit/da29801589d0a920629d41d76bcb54f6c6892dcd) - -## 0.0.1 - 2023-01-19 - -### Merged - -- Setup for integration tests [`#2`](https://github.com/graphops/poi-radio/pull/2) - -### Commits - -- feat: self-defined radio definition #12 [`363eb5b`](https://github.com/graphops/poi-radio/commit/363eb5bd2305f83619cd37b9cd1934d89a1084cd) -- Merge pull request #8 from graphops/petko/build-binaries-and-images [`46c233f`](https://github.com/graphops/poi-radio/commit/46c233fbe7ddf8670c91e9f9e4bb5dd59fb96f15) -- initial commit [`ae91066`](https://github.com/graphops/poi-radio/commit/ae9106634f3c1cc94483b88011c21af575bd08da) -- feat: setup integration tests [`5ee1fbc`](https://github.com/graphops/poi-radio/commit/5ee1fbc1d724a87fb39bfcbe76ac51e0c319baaa) -- feat: build binaries and images [`bb983cb`](https://github.com/graphops/poi-radio/commit/bb983cb23ff04352a6e7734fe09c4aee80e42344) -- feat: self-defined radio definition [`9301fc5`](https://github.com/graphops/poi-radio/commit/9301fc5f80de50ed7c720d7b930d0cf4bddf260b) +## [unreleased] + +### Bug Fixes + +- Stake query address +- Stake query address #19 +- Remove boot flag from Dockerfile +- Compare attestations check all local entries +- More checks for message uniqueness +- Check for null node +- Remove api metrics path +- Return empty vec if indexer_allocations function fails + +### Documentation + +- Updated pull request template (#77) + +### Features + +- Setup integration tests +- Build binaries and images +- Self-defined radio definition +- Self-defined radio definition #12 +- Add workflow to build and upload Docker images +- Waku specific node key and log level +- Waku specific node key and log level #21 +- Indexing network specific poi query +- Add multichain block clock +- Use environmental variable for pubsub +- Use environmental variable for pubsub #36 +- Use indexing status to query block info +- Add update to allocation topics +- Use indexing status to query block info #35 +- Tweak check for comparison trigger +- Env config block duration +- Env config block duration #41 +- Sdk version update + use Config, add logs +- Add notifications +- Release note auto-gen and docker semvar tagging +- Pruning local+remote after expiry, update collect window to local +- Topic levels, stake by alloc status, logs calc +- Attestation indexer sender group sort and hash +- Add basic Prometheus support +- Add (auto)metrics & logs; fix: msg id & comparison and clean logic +- Basic http service for health/metrics/graphQL queries +- Add Grafana dashboard config +- Move integration tests to main repo +- New release process and changelog script +- GraphQL for comparison results and query arg options +- Add dumb-init to Docker image + +### Miscellaneous Tasks + +- Remove waku dep, use specific commit of sdk +- Bump graphcast-sdk version +- Bump version, publish to crates.io +- Add tag to Docker image +- Publish to crates.io +- Slim down Dockerfile +- Add ca-certificates to Dockerfile +- Bump version +- Bump SDK dep +- Rollback version number +- Tweak crates badge +- Release v0.1.1 + +### Refactor + +- Improve Dockerfile +- Add tracing +- Fix release binaries workflow +- Default topics +- Update to new sdk error handling +- New graphcast registry link, rename graphcast vars +- New graphcast registry link, rename graphcast vars #31 +- Remove provider for graph node query blocks +- Time based comparision +- Improve compare attestations logs +- Logging improvement +- Parallel messaging +- Update for attestation stake f32 +- Add upx stage to Dockerfile + + diff --git a/Cargo.toml b/Cargo.toml index 53c1f76..ffb15fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,10 +42,7 @@ tracing-subscriber = "0.3" autometrics = { version = "0.3.2", features = ["prometheus-exporter"] } axum = "0.5" prometheus = "0.13.3" -# async-graphql = { version = "5.0", features = ["chrono", "dataloader"] } tower-http = { version = "0.4.0", features = ["trace", "cors"] } -# async-graphql-axum = "5.0.7" -# axum-macros = "0.3.7" async-graphql = "4.0.16" async-graphql-axum = "4.0.16" metrics = "0.20.1" diff --git a/contributing.md b/contributing.md index c41022a..b703d1a 100644 --- a/contributing.md +++ b/contributing.md @@ -11,39 +11,49 @@ Please follow the [Code of Conduct](https://github.com/graphops/graphcast-sdk/bl ## Commit messages and pull requests -We use the following format for commit messages: -`{Brief description of changes}`, for example: `My great new change`. - -The body of the message can be terse, with just enough information to -explain what the commit does overall. In a lot of cases, more extensive -explanations of _how_ the commit achieves its goal are better as comments -in the code. - -Commits in a pull request should be structured in such a way that each -commit consists of a small logical step towards the overall goal of the -pull request. Your pull request should make it as easy as possible for the -reviewer to follow each change you are making. For example, it is a good -idea to separate simple mechanical changes like renaming a method that -touches many files from logic changes. Your pull request should not be -structured into commits according to how you implemented your feature, -often indicated by commit messages like 'Fix problem' or 'Cleanup'. Flex a -bit, and make the world think that you implemented your feature perfectly, -in small logical steps, in one sitting without ever having to touch up -something you did earlier in the pull request. (In reality, that means -you'll use `git rebase -i` a lot). - -Please do not merge main into your branch as you develop your pull -request; instead, rebase your branch on top of the latest dev branch if your -pull request branch is long-lived. - -We try to keep the hostory of the `main` and `dev` branch linear, and avoid merge -commits. Once your pull request is approved, merge it following these -steps: +We follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). + +In brief, each commit message consists of a header, with optional body and footer: + +``` +[optional scope]: + +[optional body] + +[optional footer(s)] +``` + +`` must be one of the following: +- feat: A new feature +- fix: A bug fix +- docs: Documentation only changes +- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) +- refactor: A code change that neither fixes a bug nor adds a feature +- perf: A code change that improves performance +- test: Adding missing tests +- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation +- revert: If the commit reverts a previous commit, contains the header of the reverted commit. + +Make sure to include an exclamation mark after the commit type and scope if there is a breaking change. + +`` optional and could be anything that specifies the place of the commit change, e.g. solver, [filename], tests, lib, ... we are not very restrictive on the scope. The scope should just be lowercase and if possible contain of a single word. + +`` contains succinct description of the change with imperative, present tense. don't capitalize first letter, and no dot (.) at the end. + +`` include the motivation for the change, use the imperative, present tense + +`