Skip to content

Commit

Permalink
Merge branch 'main' into deploy/mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
IPadawans committed Apr 26, 2024
2 parents 74e5b1f + 3b9298d commit 9412268
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 314 deletions.
77 changes: 0 additions & 77 deletions .github/assets/integrationnet-lambda-payload.json

This file was deleted.

77 changes: 0 additions & 77 deletions .github/assets/mainnet-lambda-payload.json

This file was deleted.

77 changes: 0 additions & 77 deletions .github/assets/testnet-lambda-payload.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/templates/build_tessellation/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ runs:
git checkout $TESSELLATION_VERSION
sbt clean
sbt kernel/publishM2 dagL1/publishM2 keytool/publishM2 shared/publishM2 sdk/publishM2 currencyL0/publishM2 currencyL1/publishM2
sbt kernel/publishM2 dagL1/publishM2 keytool/publishM2 shared/publishM2 nodeShared/publishM2 currencyL0/publishM2 currencyL1/publishM2
24 changes: 1 addition & 23 deletions .github/workflows/deploy-integrationnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,4 @@ jobs:

EC2_INSTANCE_1_ID: ${{ secrets.EC2_INSTANCE_1_ID_INTEGRATIONNET }}
EC2_INSTANCE_2_ID: ${{ secrets.EC2_INSTANCE_2_ID_INTEGRATIONNET }}
EC2_INSTANCE_3_ID: ${{ secrets.EC2_INSTANCE_3_ID_INTEGRATIONNET }}

- name: Inject information to JSON
uses: Lambdaspire/[email protected]
with:
file: .github/assets/integrationnet-lambda-payload.json
tokenPattern: ${TOKEN}
secretsJson: ${{ toJSON(secrets) }}

- name: Trigger Auto Restart Lambda - Integrationnet
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_INTEGRATIONNET }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_INTEGRATIONNET }}
AWS_REGION: ${{ secrets.AWS_REGION_INTEGRATIONNET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION_INTEGRATIONNET }}
run: |
aws lambda invoke \
--function-name MetagraphMonitor \
--invocation-type Event \
--cli-binary-format raw-in-base64-out \
--payload file://.github/assets/integrationnet-lambda-payload.json \
response.json
EC2_INSTANCE_3_ID: ${{ secrets.EC2_INSTANCE_3_ID_INTEGRATIONNET }}
25 changes: 1 addition & 24 deletions .github/workflows/deploy-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,4 @@ jobs:

EC2_INSTANCE_1_ID: ${{ secrets.EC2_INSTANCE_1_ID_MAINNET }}
EC2_INSTANCE_2_ID: ${{ secrets.EC2_INSTANCE_2_ID_MAINNET }}
EC2_INSTANCE_3_ID: ${{ secrets.EC2_INSTANCE_3_ID_MAINNET }}

- name: Inject information to JSON
uses: Lambdaspire/[email protected]
with:
file: .github/assets/mainnet-lambda-payload.json
tokenPattern: ${TOKEN}
secretsJson: ${{ toJSON(secrets) }}

- name: Trigger Auto Restart Lambda - Mainnet
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_MAINNET }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_MAINNET }}
AWS_REGION: ${{ secrets.AWS_REGION_MAINNET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION_MAINNET }}
run: |
echo "test"
aws lambda invoke \
--function-name MetagraphMonitor \
--invocation-type Event \
--cli-binary-format raw-in-base64-out \
--payload file://.github/assets/mainnet-lambda-payload.json \
response.json
EC2_INSTANCE_3_ID: ${{ secrets.EC2_INSTANCE_3_ID_MAINNET }}
24 changes: 1 addition & 23 deletions .github/workflows/deploy-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,4 @@ jobs:

EC2_INSTANCE_1_ID: ${{ secrets.EC2_INSTANCE_1_ID_TESTNET }}
EC2_INSTANCE_2_ID: ${{ secrets.EC2_INSTANCE_2_ID_TESTNET }}
EC2_INSTANCE_3_ID: ${{ secrets.EC2_INSTANCE_3_ID_TESTNET }}

- name: Inject information to JSON
uses: Lambdaspire/[email protected]
with:
file: .github/assets/testnet-lambda-payload.json
tokenPattern: ${TOKEN}
secretsJson: ${{ toJSON(secrets) }}

- name: Trigger Auto Restart Lambda - Testnet
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TESTNET }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TESTNET }}
AWS_REGION: ${{ secrets.AWS_REGION_TESTNET }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION_TESTNET }}
run: |
aws lambda invoke \
--function-name MetagraphMonitor \
--invocation-type Event \
--cli-binary-format raw-in-base64-out \
--payload file://.github/assets/testnet-lambda-payload.json \
response.json
EC2_INSTANCE_3_ID: ${{ secrets.EC2_INSTANCE_3_ID_TESTNET }}
2 changes: 1 addition & 1 deletion metagraph/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ lazy val sharedData = (project in file("modules/shared_data"))
CompilerPlugin.kindProjector,
CompilerPlugin.betterMonadicFor,
CompilerPlugin.semanticDB,
Libraries.tessellationSDK,
Libraries.tessellationNodeShared,
Libraries.borerCore,
Libraries.borerDerivation,
Libraries.requests,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import org.tessellation.currency.l1.CurrencyL1App
import org.tessellation.ext.cats.effect.ResourceIO
import org.tessellation.schema.SnapshotOrdinal
import org.tessellation.schema.cluster.ClusterId
import org.tessellation.schema.semver.{MetagraphVersion, TessellationVersion}
import org.tessellation.security.hash.Hash
import org.tessellation.security.signature.Signed

Expand All @@ -28,7 +29,8 @@ object Main extends CurrencyL1App(
"currency-data_l1",
"currency data L1 node",
ClusterId(UUID.fromString("517c3a05-9219-471b-a54c-21b7d72f4ae5")),
version = org.tessellation.BuildInfo.version
tessellationVersion = TessellationVersion.unsafeFrom(org.tessellation.BuildInfo.version),
metagraphVersion = MetagraphVersion.unsafeFrom(com.my.dor_metagraph.data_l1.BuildInfo.version)
) {

private def makeBaseDataApplicationL1Service(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import org.tessellation.currency.l0.CurrencyL0App
import org.tessellation.currency.l0.snapshot.CurrencySnapshotEvent
import org.tessellation.currency.schema.currency.{CurrencyIncrementalSnapshot, CurrencySnapshotStateProof}
import org.tessellation.ext.cats.effect.ResourceIO
import org.tessellation.node.shared.domain.rewards.Rewards
import org.tessellation.schema.SnapshotOrdinal
import org.tessellation.schema.cluster.ClusterId
import org.tessellation.sdk.domain.rewards.Rewards
import org.tessellation.schema.semver.{MetagraphVersion, TessellationVersion}
import org.tessellation.security.SecurityProvider
import org.tessellation.security.hash.Hash
import org.tessellation.security.signature.Signed
Expand All @@ -36,7 +37,8 @@ object Main extends CurrencyL0App(
"currency-l0",
"currency L0 node",
ClusterId(UUID.fromString("517c3a05-9219-471b-a54c-21b7d72f4ae5")),
version = org.tessellation.BuildInfo.version
tessellationVersion = TessellationVersion.unsafeFrom(org.tessellation.BuildInfo.version),
metagraphVersion = MetagraphVersion.unsafeFrom(com.my.dor_metagraph.l0.BuildInfo.version)
) {
private def makeBaseDataApplicationL0Service(
calculatedStateService: CalculatedStateService[IO]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.http4s.circe.CirceEntityCodec.circeEntityEncoder
import org.http4s.dsl.Http4sDsl
import org.http4s.server.middleware.CORS
import org.http4s.{HttpRoutes, Response}
import org.tessellation.http.routes.internal.{InternalUrlPrefix, PublicRoutes}
import org.tessellation.routes.internal.{InternalUrlPrefix, PublicRoutes}

case class CustomRoutes[F[_] : Async](calculatedStateService: CalculatedStateService[F]) extends Http4sDsl[F] with PublicRoutes[F] {

Expand Down
Loading

0 comments on commit 9412268

Please sign in to comment.