Commit 6cb2110b authored by Michael de Hoog's avatar Michael de Hoog Committed by GitHub

Fix Bedrock devnet stateviz container (#3511)

* Fix stateviz JSON deserialization

* Spelling nit

* Update the variable names too
parent 5c3f2b1f
...@@ -42,7 +42,7 @@ type SnapshotState struct { ...@@ -42,7 +42,7 @@ type SnapshotState struct {
L1Head eth.L1BlockRef `json:"l1Head"` // what we see as head on L1 L1Head eth.L1BlockRef `json:"l1Head"` // what we see as head on L1
L1Current eth.L1BlockRef `json:"l1Current"` // l1 block that the derivation is currently using L1Current eth.L1BlockRef `json:"l1Current"` // l1 block that the derivation is currently using
L2Head eth.L2BlockRef `json:"l2Head"` // l2 block that was last optimistically accepted (unsafe head) L2Head eth.L2BlockRef `json:"l2Head"` // l2 block that was last optimistically accepted (unsafe head)
L2SafeHead eth.L2BlockRef `json:"l2SafeHead"` // l2 block that was last derived L2Safe eth.L2BlockRef `json:"l2Safe"` // l2 block that was last derived
L2FinalizedHead eth.BlockID `json:"l2FinalizedHead"` // l2 block that is irreversible L2FinalizedHead eth.BlockID `json:"l2FinalizedHead"` // l2 block that is irreversible
} }
...@@ -54,7 +54,7 @@ func (e *SnapshotState) UnmarshalJSON(data []byte) error { ...@@ -54,7 +54,7 @@ func (e *SnapshotState) UnmarshalJSON(data []byte) error {
L1Head json.RawMessage `json:"l1Head"` L1Head json.RawMessage `json:"l1Head"`
L1Current json.RawMessage `json:"l1Current"` L1Current json.RawMessage `json:"l1Current"`
L2Head json.RawMessage `json:"l2Head"` L2Head json.RawMessage `json:"l2Head"`
L2SafeHead json.RawMessage `json:"l2SafeHead"` L2Safe json.RawMessage `json:"l2Safe"`
L2FinalizedHead json.RawMessage `json:"l2FinalizedHead"` L2FinalizedHead json.RawMessage `json:"l2FinalizedHead"`
}{} }{}
if err := json.Unmarshal(data, &t); err != nil { if err := json.Unmarshal(data, &t); err != nil {
...@@ -78,7 +78,7 @@ func (e *SnapshotState) UnmarshalJSON(data []byte) error { ...@@ -78,7 +78,7 @@ func (e *SnapshotState) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(unquote(t.L2Head), &e.L2Head); err != nil { if err := json.Unmarshal(unquote(t.L2Head), &e.L2Head); err != nil {
return err return err
} }
if err := json.Unmarshal(unquote(t.L2SafeHead), &e.L2SafeHead); err != nil { if err := json.Unmarshal(unquote(t.L2Safe), &e.L2Safe); err != nil {
return err return err
} }
if err := json.Unmarshal(unquote(t.L2FinalizedHead), &e.L2FinalizedHead); err != nil { if err := json.Unmarshal(unquote(t.L2FinalizedHead), &e.L2FinalizedHead); err != nil {
......
...@@ -109,7 +109,7 @@ SEQUENCER_BATCH_INBOX_ADDRESS="$(cat $DEVNET/rollup.json | jq -r '.batch_inbox_a ...@@ -109,7 +109,7 @@ SEQUENCER_BATCH_INBOX_ADDRESS="$(cat $DEVNET/rollup.json | jq -r '.batch_inbox_a
SEQUENCER_BATCH_INBOX_ADDRESS="$SEQUENCER_BATCH_INBOX_ADDRESS" \ SEQUENCER_BATCH_INBOX_ADDRESS="$SEQUENCER_BATCH_INBOX_ADDRESS" \
docker-compose up -d op-proposer op-batcher docker-compose up -d op-proposer op-batcher
echo "Bringin up stateviz webserver..." echo "Bringing up stateviz webserver..."
docker-compose up -d stateviz docker-compose up -d stateviz
) )
......
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