Skip to content

Commit

Permalink
feat: full test4 support; various fixes
Browse files Browse the repository at this point in the history
- add extractor-0.1.1, to support new test4 tx format for add package,
  while still being able to parse test3 transactions
- make sorting for stats stable and deterministic
- use devx test4 node temporarily while the official one doesn't work
- support having multiple addpkg's to the same path (on-chain, this
  means some of these have failed; but this is not saved in tx-archive).
- re-run extractor.
  • Loading branch information
thehowl committed Jul 25, 2024
1 parent 9a9c450 commit bb457f7
Show file tree
Hide file tree
Showing 5,630 changed files with 248,582 additions and 2,129 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 1 addition & 4 deletions .github/workflows/txs-exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ jobs:
with:
go-version: "^1.22.0"

- name: Build gnotx-extractor
run: make -C extractor build

- name: Run backup script
run: make -C ${{ matrix.testnet }} fetch

- name: Run stats script
run: make -C ${{ matrix.testnet }} stats

- name: Run stats script
- name: Run extractor
run: make -C ${{ matrix.testnet }} extractor

- name: Run git pull
Expand Down
6 changes: 0 additions & 6 deletions deps.go

This file was deleted.

6 changes: 6 additions & 0 deletions extractor-0.1.1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea
logs
extracted
.env
testdir
test
5 changes: 5 additions & 0 deletions extractor-0.1.1/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.PHONY: build
build:
@mkdir -p ../bin
go build -o ../bin/gnotx-extractor .
27 changes: 27 additions & 0 deletions extractor-0.1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Gno Source Code Extractor

This tool is a simple parser to extract source code (packages & realms) from logs created by the [tx-archive](https://github.com/gnolang/tx-archive) tool for Gno chains.

**Note:** this directory is `extractor-0.1.1` as it targets the [`v0.1.1`](https://github.com/gnolang/gno/releases/tag/v0.1.1)
release of gnolang/gno; aka the one used to deploy test4. This ensures
compatibility with its data types.

## Running the extractor

The extractor takes in three arguments:
- the filetype of the archive files,
- output directory for the extracted packages,
- the root directory where the archive files are located.

```
USAGE
[flags]
The Gno source code extractor service
FLAGS
-file-type .jsonl the file type for analysis, with a preceding period (ie .log)
-output-dir ./extracted the output directory for the extracted Gno source code
-source-dir . the root folder containing transaction data
```

7 changes: 7 additions & 0 deletions extractor-0.1.1/deps.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build deps

package main

import (
_ "github.com/gnolang/tx-archive/cmd"
)
52 changes: 52 additions & 0 deletions extractor-0.1.1/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
module github.com/gnolang/gno/tx-exports/extractor-0.1.1

go 1.22

toolchain go1.22.4

require (
github.com/gnolang/gno v0.1.1
github.com/gnolang/tx-archive v0.3.0
github.com/peterbourgon/ff/v3 v3.4.0
github.com/stretchr/testify v1.9.0
golang.org/x/sync v0.7.0
)

require (
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/xid v1.5.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
206 changes: 206 additions & 0 deletions extractor-0.1.1/go.sum

Large diffs are not rendered by default.

Loading

0 comments on commit bb457f7

Please sign in to comment.