Skip to content

Commit

Permalink
Rename chain
Browse files Browse the repository at this point in the history
  • Loading branch information
ansermino committed Nov 6, 2024
1 parent 63b6771 commit ada6ee7
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# export PATH="`pwd`/devel:$PATH"
# ```
#
# Each time you enter the project in your terminal (e.g. `cd ~/work/firehose-acme`) and then
# Each time you enter the project in your terminal (e.g. `cd ~/work/firehose-filecoin`) and then
# do `firehose start --help`, then it first compiles all the Go source code and then invoke the
# resulting just compiled binary, meaning you are "always" freshly compiled, it's more or less
# equivalent to doing directly `go run ./cmd/firefil start --help` (which is totally fine).
Expand Down
6 changes: 3 additions & 3 deletions .sfreleaser
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
global:
owner: chainsafe
project: firehose-acme
project: firehose-filecoin
binary: firefil
language: golang
variant: application
sfreleaser-min-version: v0.7.0
release:
pre-build-hooks:
- substreams pack -o "{{ .buildDir }}/substreams-acme-{{ .release.Version }}.spkg" substreams.yaml
- substreams pack -o "{{ .buildDir }}/substreams-filecoin-{{ .release.Version }}.spkg" substreams.yaml
upload-extra-assets:
- "{{ .buildDir }}/substreams-acme-{{ .release.Version }}.spkg"
- "{{ .buildDir }}/substreams-filecoin-{{ .release.Version }}.spkg"

# By default we disable Brew publishing because it's assumed that most owner
# of this repository will not have the a Homebrew tap repository created which
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG CHAIN_VERSION=latest
ARG SF_VERSION=latest

# Here you would actually pull from your own chain image, but for the sake of the demo, we use the dummy-blockchain.
# The idea is that you bring together your chain's binary at the right and the firehose-acme's binary into a single
# The idea is that you bring together your chain's binary at the right and the firehose-filecoin's binary into a single
# image.
FROM ghcr.io/streamingfast/dummy-blockchain:$CHAIN_VERSION as chain

Expand Down
10 changes: 5 additions & 5 deletions cmd/fireacme/main.go
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package main

import (
pbacme "github.com/chainsafe/firehose-filecoin/pb/sf/acme/type/v1"
pbfilecoin "github.com/chainsafe/firehose-filecoin/pb/sf/filecoin/type/v1"
firecore "github.com/streamingfast/firehose-core"
fhCmd "github.com/streamingfast/firehose-core/cmd"
)

func main() {
fhCmd.Main(&firecore.Chain[*pbacme.Block]{
ShortName: "acme",
fhCmd.Main(&firecore.Chain[*pbfilecoin.Block]{
ShortName: "filecoin",
LongName: "Filecoin",
ExecutableName: "dummy-blockchain",
FullyQualifiedModule: "github.com/chainsafe/firehose-filecoin",
Version: version,

FirstStreamableBlock: 1,

BlockFactory: func() firecore.Block { return new(pbacme.Block) },
BlockFactory: func() firecore.Block { return new(pbfilecoin.Block) },
ConsoleReaderFactory: firecore.NewConsoleReader,

Tools: &firecore.ToolsConfig[*pbacme.Block]{},
Tools: &firecore.ToolsConfig[*pbfilecoin.Block]{},
})
}

Expand Down
4 changes: 2 additions & 2 deletions pb/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ function main() {
set -e
cd "$ROOT/pb" &> /dev/null

generate "sf/acme/type/v1/type.proto"
generate "sf/filecoin/type/v1/type.proto"

echo "generate.sh - `date` - `whoami`" > ./last_generate.txt
echo "streamingfast/firehose-acme/proto revision: `GIT_DIR=$ROOT/.git git log -n 1 --pretty=format:%h -- proto`" >> ./last_generate.txt
echo "streamingfast/firehose-filecoin/proto revision: `GIT_DIR=$ROOT/.git git log -n 1 --pretty=format:%h -- proto`" >> ./last_generate.txt
}

# usage:
Expand Down
2 changes: 1 addition & 1 deletion pb/last_generate.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
generate.sh - Mon Jan 8 23:53:31 EST 2024 - maoueh
streamingfast/firehose-acme/proto revision: 1e24bd4
streamingfast/firehose-filecoin/proto revision: 1e24bd4
2 changes: 1 addition & 1 deletion pb/sf/acme/type/v1/type.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pbacme
package pbfilecoin

import (
"time"
Expand Down
74 changes: 37 additions & 37 deletions pb/sf/acme/type/v1/type.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/buf.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Protobuf definitions when dealing with Firehose Filecoin chain(s) like Filecoin Mainnet and Filecoin Testnet.

Foremost, this provides [sf.acme.types.v1.Block](https://buf.build/chainsafe/firehose-filecoin/docs/main:sf.acme.type.v1#sf.acme.type.v1.Block) which is used for consuming Firehose & Substreams Filecoin block model.
Foremost, this provides [sf.filecoin.types.v1.Block](https://buf.build/chainsafe/firehose-filecoin/docs/main:sf.filecoin.type.v1#sf.filecoin.type.v1.Block) which is used for consuming Firehose & Substreams Filecoin block model.

This is probably the only model you should really care about, the rest are meant for internal communications for Firehose operators.

Expand Down
4 changes: 2 additions & 2 deletions proto/sf/acme/type/v1/type.proto
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";

package sf.acme.type.v1;
package sf.filecoin.type.v1;

option go_package = "github.com/chainsafe/firehose-filecoin/pb/sf/acme/type/v1;pbacme";
option go_package = "github.com/chainsafe/firehose-filecoin/pb/sf/filecoin/type/v1;pbfilecoin";

message BlockHeader {
uint64 height = 1;
Expand Down
4 changes: 2 additions & 2 deletions substreams.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
specVersion: v0.1.0
package:
name: acme
name: filecoin
version: v1.0.0
url: https://github.com/chainsafe/firehose-filecoin
doc: |
Expand All @@ -10,6 +10,6 @@ package:
protobuf:
files:
- sf/acme/type/v1/type.proto
- sf/filecoin/type/v1/type.proto
importPaths:
- ./proto
2 changes: 1 addition & 1 deletion tools/docker/99-firehose.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# This is place inside `/etc/profile.d/99-firehose-acme.sh`
# This is place inside `/etc/profile.d/99-firehose-filecoin.sh`
# on built system an executed to provide message to use when they
# connect on the box.
export PATH=$PATH:/app
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/motd_node_manager
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Welcome to this Firehose chain reader pod, common commands:
- Show version firefil --version

Node manager commands (acme-... <tab> to show all):
Node manager commands (filecoin-... <tab> to show all):
- Check if running reader-is-running

- Start or restart instance reader-resume
Expand Down

0 comments on commit ada6ee7

Please sign in to comment.