Commit 07eb12a6 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into 08-17-feat_indexer_Use_default_indexer.toml_in_default_Docker_CMD

parents 42a7a2b0 30697911
......@@ -74,9 +74,17 @@ pull_request_rules:
More details can be found on the `Queue: Embarked in merge train`
check-run.
- name: Add A-cannon label
conditions:
- 'files~=^cannon/'
actions:
label:
add:
- A-cannon
- name: Add A-indexer label and ecopod reviewers
conditions:
- 'files~=^indexer/'
- '#label<5'
actions:
label:
add:
......@@ -84,47 +92,81 @@ pull_request_rules:
request_reviews:
users:
- roninjin10
- name: Add A-pkg-sdk label and ecopod reviewers
- name: Add A-op-batcher label
conditions:
- 'files~=^packages/sdk/'
- 'files~=^op-batcher/'
actions:
label:
add:
- A-pkg-sdk
request_reviews:
users:
- roninjin10
- name: Add A-pkg-common-ts label and ecopod reviewers
- A-op-batcher
- name: Add A-op-bindings label
conditions:
- 'files~=^packages/common-ts/'
- 'files~=^op-bindings/'
actions:
label:
add:
- A-pkg-common-ts
request_reviews:
users:
- roninjin10
- name: Add A-op-node label
- A-op-bindings
- name: Add A-op-bootnode label
conditions:
- 'files~=^op-node/'
- 'files~=^op-bootnode/'
- '#label<5'
actions:
label:
add:
- A-op-node
- name: Add A-op-batcher label
- A-op-bootnode
- name: Add A-op-chain-ops label
conditions:
- 'files~=^op-batcher/'
- 'files~=^op-chain-ops/'
actions:
label:
add:
- A-op-batcher
- name: Add A-cannon label
- A-op-chain-ops
- name: Add A-op-challenger label
conditions:
- 'files~=^cannon/'
- 'files~=^op-challenger/'
actions:
label:
add:
- A-cannon
- A-op-challenger
- name: Add A-op-e2e label
conditions:
- 'files~=^op-e2e/'
- '#label<5'
actions:
label:
add:
- A-op-e2e
- name: Add A-op-exporter label
conditions:
- 'files~=^op-exporter/'
- '#label<5'
actions:
label:
add:
- A-op-exporter
- name: Add A-op-heartbeat label
conditions:
- 'files~=^op-heartbeat/'
- '#label<5'
actions:
label:
add:
- A-op-heartbeat
- name: Add A-op-node label
conditions:
- 'files~=^op-node/'
actions:
label:
add:
- A-op-node
- name: Add A-op-preimage label
conditions:
- 'files~=^op-preimage/'
- '#label<5'
actions:
label:
add:
- A-op-preimage
- name: Add A-op-program label
conditions:
- 'files~=^op-program/'
......@@ -132,13 +174,75 @@ pull_request_rules:
label:
add:
- A-op-program
- name: Add A-op-challenger label
- name: Add A-op-proposer label
conditions:
- 'files~=^op-challenger/'
- 'files~=^op-proposer/'
actions:
label:
add:
- A-op-challenger
- A-op-proposer
- name: Add A-op-service label
conditions:
- 'files~=^op-service/'
- '#label<5'
actions:
label:
add:
- A-op-service
- name: Add A-op-signer label
conditions:
- 'files~=^op-signer/'
- '#label<5'
actions:
label:
add:
- A-op-signer
- name: Add A-op-wheel label
conditions:
- 'files~=^op-wheel/'
- '#label<5'
actions:
label:
add:
- A-op-wheel
- name: Add A-ops-bedrock label
conditions:
- 'files~=^ops-bedrock/'
- '#label<5'
actions:
label:
add:
- A-ops-bedrock
- name: Add A-ops label
conditions:
- 'files~=^ops/'
- '#label<5'
actions:
label:
add:
- A-ops
- name: Add A-pkg-sdk label and ecopod reviewers
conditions:
- 'files~=^packages/sdk/'
- '#label<5'
actions:
label:
add:
- A-pkg-sdk
request_reviews:
users:
- roninjin10
- name: Add A-pkg-common-ts label and ecopod reviewers
conditions:
- 'files~=^packages/common-ts/'
- '#label<5'
actions:
label:
add:
- A-pkg-common-ts
request_reviews:
users:
- roninjin10
- name: Add A-pkg-contracts-bedrock label
conditions:
- 'files~=^packages/contracts-bedrock/'
......@@ -148,12 +252,12 @@ pull_request_rules:
- A-pkg-contracts-bedrock
- name: Add M-docs label
conditions:
- 'files~=^technical-documents/'
- 'files~=^specs/'
- 'files~=^(technical-documents|specs)\/'
- '#label<5'
actions:
label:
add:
- A-pkg-contracts-bedrock
- M-docs
- name: Add M-deletion label when files are removed
conditions:
- 'removed-files~=^/'
......@@ -163,9 +267,8 @@ pull_request_rules:
- M-deletion
- name: Add M-ci label when ci files are modified
conditions:
- 'files~=^.github/'
- 'files~=^.circleci/'
- 'files~=^.husky/'
- 'files~=^\.(github|circleci|husky)\/'
- '#label<5'
actions:
label:
add:
......
......@@ -209,13 +209,20 @@ This makes them a great tool for contributors!
#### Filtering for Work
To find tickets available for external contribution, take a look at the [`M-community`][M-community] label.
To find tickets available for external contribution, take a look at the https://github.com/ethereum-optimism/optimism/labels/M-community label.
You can filter by the [`D-good-first-issue`][D-good-first-issue]
You can filter by the https://github.com/ethereum-optimism/optimism/labels/D-good-first-issue
label to find issues that are intended to be easy to implement or fix.
Also, all labels can be seen by visiting the [labels page][labels]
[labels]: https://github.com/ethereum-optimism/optimism/labels
[M-community]: https://github.com/ethereum-optimism/optimism/labels/M-community
[D-good-first-issue]: https://github.com/ethereum-optimism/optimism/labels/D-good-first-issue
#### Modifying Labels
When altering label names or deleting labels there are a few things you must be aware of.
- This may affect the mergify bot's use of labels. See the [mergify config](.github/mergify.yml).
- If the https://github.com/ethereum-optimism/labels/S-stale label is altered, the [close-stale](.github/workflows/close-stale.yml) workflow should be updated.
- If the https://github.com/ethereum-optimism/labels/M-dependabot label is altered, the [dependabot config](.github/dependabot.yml) file should be adjusted.
- Saved label filters for project boards will not automatically update. These should be updated if label names change.
......@@ -4,13 +4,13 @@ import (
"context"
"math/big"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
)
type FaultDisputeGameCaller interface {
......@@ -53,7 +53,7 @@ func (fc *FaultCaller) LogGameInfo(ctx context.Context) {
fc.log.Error("failed to get claim count", "err", err)
return
}
fc.log.Info("Game info", "claims", claimLen, "status", GameStatusString(status))
fc.log.Info("Game info", "claims", claimLen, "status", status)
}
// GetGameStatus returns the current game status.
......@@ -78,17 +78,3 @@ func (fc *FaultCaller) LogClaimDataLength(ctx context.Context) {
}
fc.log.Info("Number of claims", "length", claimLen)
}
// GameStatusString returns the current game status as a string.
func GameStatusString(status types.GameStatus) string {
switch status {
case types.GameStatusInProgress:
return "In Progress"
case types.GameStatusChallengerWon:
return "Challenger Won"
case types.GameStatusDefenderWon:
return "Defender Won"
default:
return "Unknown"
}
}
......@@ -4,8 +4,9 @@ import (
"context"
"time"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
)
type GameInfo interface {
......@@ -51,9 +52,9 @@ func progressGame(ctx context.Context, logger log.Logger, agreeWithProposedOutpu
expectedStatus = types.GameStatusDefenderWon
}
if expectedStatus == status {
logger.Info("Game won", "status", GameStatusString(status))
logger.Info("Game won", "status", status)
} else {
logger.Error("Game lost", "status", GameStatusString(status))
logger.Error("Game lost", "status", status)
}
return true
} else {
......
......@@ -5,10 +5,11 @@ import (
"errors"
"testing"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
"github.com/ethereum-optimism/optimism/op-node/testlog"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/require"
"github.com/ethereum-optimism/optimism/op-challenger/fault/types"
"github.com/ethereum-optimism/optimism/op-node/testlog"
)
func TestMonitorExitsWhenContextDone(t *testing.T) {
......@@ -48,7 +49,6 @@ func TestProgressGame_LogErrorWhenGameLost(t *testing.T) {
agreeWithOutput bool
logLevel log.Lvl
logMsg string
statusText string
}{
{
name: "GameLostAsDefender",
......@@ -56,7 +56,6 @@ func TestProgressGame_LogErrorWhenGameLost(t *testing.T) {
agreeWithOutput: false,
logLevel: log.LvlError,
logMsg: "Game lost",
statusText: "Challenger Won",
},
{
name: "GameLostAsChallenger",
......@@ -64,7 +63,6 @@ func TestProgressGame_LogErrorWhenGameLost(t *testing.T) {
agreeWithOutput: true,
logLevel: log.LvlError,
logMsg: "Game lost",
statusText: "Defender Won",
},
{
name: "GameWonAsDefender",
......@@ -72,7 +70,6 @@ func TestProgressGame_LogErrorWhenGameLost(t *testing.T) {
agreeWithOutput: false,
logLevel: log.LvlInfo,
logMsg: "Game won",
statusText: "Defender Won",
},
{
name: "GameWonAsChallenger",
......@@ -80,7 +77,6 @@ func TestProgressGame_LogErrorWhenGameLost(t *testing.T) {
agreeWithOutput: true,
logLevel: log.LvlInfo,
logMsg: "Game won",
statusText: "Challenger Won",
},
}
for _, test := range tests {
......@@ -94,7 +90,7 @@ func TestProgressGame_LogErrorWhenGameLost(t *testing.T) {
require.Equal(t, 0, gameInfo.logCount, "should not log latest game state")
errLog := handler.FindLog(test.logLevel, test.logMsg)
require.NotNil(t, errLog, "should log game result")
require.Equal(t, test.statusText, errLog.GetContextValue("status"))
require.Equal(t, test.status, errLog.GetContextValue("status"))
})
}
}
......
......@@ -20,6 +20,20 @@ const (
GameStatusDefenderWon
)
// String returns the string representation of the game status.
func (s GameStatus) String() string {
switch s {
case GameStatusInProgress:
return "In Progress"
case GameStatusChallengerWon:
return "Challenger Won"
case GameStatusDefenderWon:
return "Defender Won"
default:
return "Unknown"
}
}
// PreimageOracleData encapsulates the preimage oracle data
// to load into the onchain oracle.
type PreimageOracleData struct {
......
......@@ -56,7 +56,11 @@ log = logging.getLogger(__name__)
def main():
patterns = sys.argv[1].split(',')
patterns = patterns + REBUILD_ALL_PATTERNS
# temporarily only run indexer tests if indexer is changed because the tests are flaky
if len(patterns) != 1 or patterns[0] != "indexer":
patterns = patterns + REBUILD_ALL_PATTERNS
fp = os.path.realpath(__file__)
monorepo_path = os.path.realpath(os.path.join(fp, '..', '..'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment