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

Add chain_head_gasprice gauge metric. Fix e2e tests #2208

Merged
merged 7 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions .github/workflows/blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ env:
# Location where compiled system contracts are stored under the root of this
# repo.
SYSTEM_CONTRACTS_PATH: "compiled-system-contracts"
# Used for celo-monorepo
NODE_VERSION: 18.18

defaults:
run:
Expand All @@ -39,7 +41,6 @@ jobs:
# options: --user root
runs-on: ["8-cpu","self-hosted","blockchain"]
env:
NODE_VERSION: 18
CONTRACTS_BUILD_PATH: packages/protocol/build

steps:
Expand Down Expand Up @@ -391,8 +392,6 @@ jobs:
name: End-to-end blockchain parameters test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down Expand Up @@ -431,6 +430,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache-dependency-path: celo-monorepo/yarn.lock

- name: Run e2e test
run: |
export E2E_TESTS_FORCE_USE_MYCELO=true
Expand All @@ -441,8 +441,6 @@ jobs:
name: End-to-end governance test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down Expand Up @@ -492,8 +490,6 @@ jobs:
name: End-to-end sync test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down Expand Up @@ -542,8 +538,6 @@ jobs:
name: End-to-end slashing test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down Expand Up @@ -592,8 +586,6 @@ jobs:
name: End-to-end transfers test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down Expand Up @@ -642,8 +634,6 @@ jobs:
name: End-to-end validator order test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down Expand Up @@ -692,8 +682,6 @@ jobs:
name: End-to-end CIP35-eth compatibility test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down Expand Up @@ -742,8 +730,6 @@ jobs:
name: End-to-end replica test
runs-on: ["8-cpu","self-hosted","blockchain"]
timeout-minutes: 30
env:
NODE_VERSION: 18

needs:
- go-modules
Expand Down
11 changes: 8 additions & 3 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ import (
)

var (
headBlockGauge = metrics.NewRegisteredGauge("chain/head/block", nil)
headHeaderGauge = metrics.NewRegisteredGauge("chain/head/header", nil)
headFastBlockGauge = metrics.NewRegisteredGauge("chain/head/receipt", nil)
headBlockGauge = metrics.NewRegisteredGauge("chain/head/block", nil)
headHeaderGauge = metrics.NewRegisteredGauge("chain/head/header", nil)
headFastBlockGauge = metrics.NewRegisteredGauge("chain/head/receipt", nil)
headBlockGasPriceMin = metrics.NewRegisteredGauge("chain/head/gasprice", nil)
jcortejoso marked this conversation as resolved.
Show resolved Hide resolved

accountReadTimer = metrics.NewRegisteredTimer("chain/account/reads", nil)
accountHashTimer = metrics.NewRegisteredTimer("chain/account/hashes", nil)
Expand Down Expand Up @@ -476,6 +477,10 @@ func (bc *BlockChain) loadLastState() error {
}
log.Debug(fmt.Sprintf("Loading Last State: %v", currentHeader.Number))
bc.hc.SetCurrentHeader(currentHeader)
// Update the head block gas price minimum (after EIP-1559)
if currentHeader.BaseFee != nil {
headBlockGasPriceMin.Update(currentHeader.BaseFee.Int64())
}

// Restore the last known head fast block
bc.currentFastBlock.Store(currentBlock)
Expand Down
Loading