Parcourir la source

Fix devnet

Change-Id: I1d62e6323cc2169cce43581f9aeefb537bc84a76
Hendrik Hofstadt il y a 4 ans
Parent
commit
c0228415f8
4 fichiers modifiés avec 7 ajouts et 21 suppressions
  1. 5 19
      bridge/pkg/solana/client.go
  2. 0 1
      devnet/bridge.yaml
  3. 1 0
      ethereum/Dockerfile
  4. 1 1
      solana/devnet_setup.sh

+ 5 - 19
bridge/pkg/solana/client.go

@@ -121,19 +121,13 @@ func (s *SolanaWatcher) Run(ctx context.Context) error {
 							},
 							{
 								Memcmp: &rpc.RPCFilterMemcmp{
-									Offset: 4,                   // Start of the Persist flag
-									Bytes:  solana.Base58{0x01}, // Only grab messages that need to be persisted
-								},
-							},
-							{
-								Memcmp: &rpc.RPCFilterMemcmp{
-									Offset: 5,                 // Start of the ConsistencyLevel value
+									Offset: 4,                 // Start of the ConsistencyLevel value
 									Bytes:  solana.Base58{32}, // Only grab messages that require max confirmations
 								},
 							},
 							{
 								Memcmp: &rpc.RPCFilterMemcmp{
-									Offset: 6,                         // Offset of VaaTime
+									Offset: 5,                         // Offset of VaaTime
 									Bytes:  solana.Base58{0, 0, 0, 0}, // This means this VAA hasn't been signed yet
 								},
 							},
@@ -158,19 +152,13 @@ func (s *SolanaWatcher) Run(ctx context.Context) error {
 							},
 							{
 								Memcmp: &rpc.RPCFilterMemcmp{
-									Offset: 4,                   // Start of the Persist flag
-									Bytes:  solana.Base58{0x01}, // Only grab messages that need to be persisted
-								},
-							},
-							{
-								Memcmp: &rpc.RPCFilterMemcmp{
-									Offset: 5,                // Start of the ConsistencyLevel value
+									Offset: 4,                // Start of the ConsistencyLevel value
 									Bytes:  solana.Base58{1}, // Only grab messages that require the Confirmed level
 								},
 							},
 							{
 								Memcmp: &rpc.RPCFilterMemcmp{
-									Offset: 6,                         // Offset of VaaTime
+									Offset: 5,                         // Offset of VaaTime
 									Bytes:  solana.Base58{0, 0, 0, 0}, // This means this VAA hasn't been signed yet
 								},
 							},
@@ -186,7 +174,7 @@ func (s *SolanaWatcher) Run(ctx context.Context) error {
 					// Merge accounts
 					accounts := append(fAccounts, cAccounts...)
 
-					logger.Debug("fetched transfer proposals without VAA",
+					logger.Info("fetched transfer proposals without VAA",
 						zap.Int("n", len(accounts)),
 						zap.Duration("took", time.Since(start)),
 					)
@@ -220,7 +208,6 @@ func (s *SolanaWatcher) Run(ctx context.Context) error {
 							EmitterChain:     vaa.ChainIDSolana,
 							EmitterAddress:   proposal.EmitterAddress,
 							Payload:          proposal.Payload,
-							Persist:          proposal.Persist == 1,
 							ConsistencyLevel: proposal.ConsistencyLevel,
 						}
 
@@ -245,7 +232,6 @@ type (
 	MessagePublicationAccount struct {
 		VaaVersion uint8
 		// Borsh does not seem to support booleans, so 0=false / 1=true
-		Persist             uint8
 		ConsistencyLevel    uint8
 		VaaTime             uint32
 		VaaSignatureAccount vaa.Address

+ 0 - 1
devnet/bridge.yaml

@@ -63,7 +63,6 @@ spec:
             - bridge
             - --ethRPC
             - ws://eth-devnet:8545
-            - --terra
             - --terraWS
             - ws://terra-terrad:26657/websocket
             - --terraLCD

+ 1 - 0
ethereum/Dockerfile

@@ -13,6 +13,7 @@ WORKDIR /home/node/app
 # Only invalidate the npm install step if package.json changed
 ADD --chown=node:node package.json .
 ADD --chown=node:node package-lock.json .
+ADD --chown=node:node .env.test .env
 
 # We want to cache node_modules *and* incorporate it into the final image.
 RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \

+ 1 - 1
solana/devnet_setup.sh

@@ -44,7 +44,7 @@ spl-token mint "$token" 10000000000 "$account"
 
 # Create the bridge contract at a known address
 # OK to fail on subsequent attempts (already created).
-retry client create-bridge "$bridge_address" "$initial_guardian" 86400 100 200
+retry client create-bridge "$bridge_address" "$initial_guardian" 86400 100
 
 # Let k8s startup probe succeed
 nc -l -p 2000