-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3296 from synapsecns/master
FE Release 2024-10-24
- Loading branch information
Showing
212 changed files
with
9,712 additions
and
1,166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ on: | |
- 'packages/contracts-rfq/**' | ||
- '.github/workflows/solidity.yml' | ||
- 'packages/solidity-devops/**' | ||
branches: | ||
# Solidity workflows are irrelevant for the FE release branch | ||
- '!fe-release' | ||
push: | ||
paths: | ||
- 'packages/contracts-core/**' | ||
|
@@ -121,7 +124,7 @@ jobs: | |
cancel_others: 'true' | ||
slither: | ||
name: Slither | ||
if: ${{ needs.changes.outputs.package_count > 0 }} | ||
if: ${{ needs.changes.outputs.package_count > 0 && needs.changes.outputs.packages != '["solidity-devops"]' }} | ||
# see https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
|
@@ -174,6 +177,7 @@ jobs: | |
with: | ||
node-version: '${{steps.nvmrc.outputs.NVMRC}}' | ||
target: './packages/${{matrix.package}}' | ||
slither-config: './packages/${{matrix.package}}/slither.config.json' | ||
ignore-compile: true | ||
sarif: results.sarif | ||
solc-version: 0.8.17 | ||
|
@@ -204,6 +208,9 @@ jobs: | |
- name: Installing dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Install lcov | ||
run: sudo apt-get update && sudo apt-get install -y lcov | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
|
@@ -222,6 +229,12 @@ jobs: | |
env: | ||
FOUNDRY_FUZZ_RUNS: 10 | ||
|
||
# Some of the packages may want to exclude certain files from the coverage report (legacy code, scripts, tests) | ||
- name: Apply filters to coverage report | ||
if: ${{ matrix.package != 'solidity-devops' }} | ||
working-directory: './packages/${{matrix.package}}' | ||
run: npm run coverage:filter --if-present | ||
|
||
- name: Send Coverage (Codecov) | ||
if: ${{ matrix.package != 'solidity-devops' }} | ||
uses: Wandalen/[email protected] | ||
|
@@ -239,7 +252,7 @@ jobs: | |
gas-diff: | ||
runs-on: ubuntu-latest | ||
name: Foundry Gas Diff | ||
if: ${{ needs.changes.outputs.package_count > 0 }} | ||
if: ${{ needs.changes.outputs.package_count > 0 && needs.changes.outputs.packages != '["solidity-devops"]' }} | ||
needs: changes | ||
strategy: | ||
fail-fast: false | ||
|
@@ -267,7 +280,9 @@ jobs: | |
- name: Run tests and generate gas report | ||
working-directory: './packages/${{matrix.package}}' | ||
# Run separate set of tests (no fuzzing) to get accurate average gas cost estimates | ||
run: forge test --mc GasBenchmark --gas-report > "../../gas-report-${{ matrix.package }}.ansi" | ||
# Note: we use `npm run` with `--if-present` flag, allows not to define a gas:bench script in every package | ||
# This is not natively supported by yarn yet, see: https://github.com/yarnpkg/yarn/pull/7159 | ||
run: npm run gas:bench --if-present > "../../gas-report-${{ matrix.package }}.ansi" | ||
|
||
- name: Compare gas reports | ||
uses: Rubilmax/[email protected] | ||
|
@@ -290,7 +305,7 @@ jobs: | |
size-check: | ||
name: Foundry Size Check | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.changes.outputs.package_count > 0 }} | ||
if: ${{ needs.changes.outputs.package_count > 0 && needs.changes.outputs.packages != '["solidity-devops"]' }} | ||
needs: changes | ||
strategy: | ||
fail-fast: false | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package metrics | ||
|
||
import ( | ||
"context" | ||
"go.opentelemetry.io/otel/metric" | ||
"time" | ||
) | ||
|
||
// standardMetrics records metrics across any service using the metrics handler. | ||
type standardMetrics struct { | ||
metrics Handler | ||
meter metric.Meter | ||
uptimeGauge metric.Float64ObservableGauge | ||
startTime time.Time | ||
} | ||
|
||
const processUptimeSecondsMetric = "process_uptime_seconds" | ||
|
||
func newStandardMetrics(ctx context.Context, handler Handler) { | ||
str := standardMetrics{ | ||
metrics: handler, | ||
meter: handler.Meter("standard_metrics"), | ||
startTime: time.Now(), | ||
} | ||
|
||
var err error | ||
if str.uptimeGauge, err = str.meter.Float64ObservableGauge(processUptimeSecondsMetric, metric.WithDescription("The uptime of the process in seconds"), metric.WithUnit("seconds")); err != nil { | ||
handler.ExperimentalLogger().Errorf(ctx, "failed to create %s gauge: %v", processUptimeSecondsMetric, err) | ||
} | ||
|
||
// Register callback | ||
if _, err = str.meter.RegisterCallback(str.uptimeCallback, str.uptimeGauge); err != nil { | ||
handler.ExperimentalLogger().Warnf(ctx, "failed to register callback: %v", err) | ||
} | ||
} | ||
|
||
func (str *standardMetrics) uptimeCallback(_ context.Context, observer metric.Observer) error { | ||
uptimeDuration := time.Since(str.startTime).Seconds() | ||
observer.ObserveFloat64(str.uptimeGauge, uptimeDuration) | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,84 @@ | |
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [0.4.5](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-21) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
||
|
||
|
||
|
||
|
||
## [0.4.4](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-15) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
||
|
||
|
||
|
||
|
||
## [0.4.3](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-15) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
||
|
||
|
||
|
||
|
||
## [0.4.2](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-12) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **docs:** Fixes gh link ([#3280](https://github.com/synapsecns/sanguine/issues/3280)) ([f1dfc82](https://github.com/synapsecns/sanguine/commit/f1dfc82bc26d60262a92feda671d44a6d54a3ce1)) | ||
|
||
|
||
|
||
|
||
|
||
## [0.4.1](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-12) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
||
|
||
|
||
|
||
|
||
# [0.4.0](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-10) | ||
|
||
|
||
### Features | ||
|
||
* **synapse-constants:** adds preinstall step ([#3269](https://github.com/synapsecns/sanguine/issues/3269)) ([acd61de](https://github.com/synapsecns/sanguine/commit/acd61de4846d9b23d7aa834b8f2eefcaae486c7d)) | ||
|
||
|
||
|
||
|
||
|
||
## [0.3.11](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-10) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
||
|
||
|
||
|
||
|
||
## [0.3.10](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-08) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
||
|
||
|
||
|
||
|
||
## [0.3.9](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-08) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
||
|
||
|
||
|
||
|
||
## [0.3.8](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-10-07) | ||
|
||
**Note:** Version bump only for package @synapsecns/bridge-docs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.