Skip to content

Commit

Permalink
Merge pull request #147 from 0xPolygon/release/0.3.1
Browse files Browse the repository at this point in the history
chore: release v0.3.1
  • Loading branch information
vcastellm authored Oct 29, 2024
2 parents 95cdb6a + ad87a4e commit cb437cd
Show file tree
Hide file tree
Showing 34 changed files with 2,924 additions and 652 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
with:
repository: 0xPolygon/kurtosis-cdk
path: "kurtosis-cdk"
ref: "v0.2.14"
ref: "v0.2.15"

- name: Setup Bats and bats libs
uses: bats-core/[email protected]
Expand All @@ -81,3 +81,22 @@ jobs:
env:
KURTOSIS_FOLDER: ${{ github.workspace }}/kurtosis-cdk
BATS_LIB_PATH: /usr/lib/

- name: Dump enclave logs
if: failure()
run: kurtosis dump ./dump

- name: Generate archive name
if: failure()
run: |
archive_name="dump_run_with_args_${{matrix.e2e-group}}_${{ github.run_id }}"
echo "ARCHIVE_NAME=${archive_name}" >> "$GITHUB_ENV"
echo "Generated archive name: ${archive_name}"
kurtosis service exec cdk cdk-node-001 'cat /etc/cdk/cdk-node-config.toml' > ./dump/cdk-node-config.toml
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARCHIVE_NAME }}
path: ./dump
546 changes: 538 additions & 8 deletions aggregator/aggregator_test.go

Large diffs are not rendered by default.

25 changes: 23 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const (
)

var (
configFileFlag = cli.StringFlag{
configFileFlag = cli.StringSliceFlag{
Name: config.FlagCfg,
Aliases: []string{"c"},
Usage: "Configuration `FILE`",
Usage: "Configuration file(s)",
Required: true,
}
customNetworkFlag = cli.StringFlag{
Expand All @@ -43,6 +43,24 @@ var (
Required: false,
Value: cli.NewStringSlice(common.SEQUENCE_SENDER, common.AGGREGATOR, common.AGGORACLE, common.RPC),
}
saveConfigFlag = cli.StringFlag{
Name: config.FlagSaveConfigPath,
Aliases: []string{"s"},
Usage: "Save final configuration into to the indicated path (name: cdk-node-config.toml)",
Required: false,
}
disableDefaultConfigVars = cli.BoolFlag{
Name: config.FlagDisableDefaultConfigVars,
Aliases: []string{"d"},
Usage: "Disable default configuration variables, all of them must be defined on config files",
Required: false,
}

allowDeprecatedFields = cli.BoolFlag{
Name: config.FlagAllowDeprecatedFields,
Usage: "Allow that config-files contains deprecated fields",
Required: false,
}
)

func main() {
Expand All @@ -53,6 +71,9 @@ func main() {
&configFileFlag,
&yesFlag,
&componentsFlag,
&saveConfigFlag,
&disableDefaultConfigVars,
&allowDeprecatedFields,
}
app.Commands = []*cli.Command{
{
Expand Down
21 changes: 9 additions & 12 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,17 @@ func createAggregator(ctx context.Context, c config.Config, runMigrations bool)
}

// READ CHAIN ID FROM POE SC
l2ChainID, err := etherman.GetL2ChainID()
if err != nil {
logger.Fatal(err)
}

st := newState(&c, l2ChainID, stateSQLDB)

c.Aggregator.ChainID = l2ChainID
if c.Aggregator.ChainID == 0 {
l2ChainID, err := etherman.GetL2ChainID()
if err != nil {
logger.Fatal(err)
}
log.Infof("Autodiscover L2ChainID: %d", l2ChainID)
c.Aggregator.ChainID = l2ChainID
}

// Populate Network config
c.Aggregator.Synchronizer.Etherman.Contracts.GlobalExitRootManagerAddr =
c.NetworkConfig.L1Config.GlobalExitRootManagerAddr
c.Aggregator.Synchronizer.Etherman.Contracts.RollupManagerAddr = c.NetworkConfig.L1Config.RollupManagerAddr
c.Aggregator.Synchronizer.Etherman.Contracts.ZkEVMAddr = c.NetworkConfig.L1Config.ZkEVMAddr
st := newState(&c, c.Aggregator.ChainID, stateSQLDB)

aggregator, err := aggregator.New(ctx, c.Aggregator, logger, st, etherman)
if err != nil {
Expand Down
Loading

0 comments on commit cb437cd

Please sign in to comment.