diff --git a/README.md b/README.md index 5b787b08..c342edfd 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ They have the following responsibilities: The following is a diagram that describes at a high level the interaction between the validator, EVM-chains, and the external world: -![image](https://user-images.githubusercontent.com/6136245/180085125-3093401c-5ef0-449e-93b7-c323fd0bfbce.png) +![image](https://user-images.githubusercontent.com/5305984/234063968-f7627d29-5f4f-49c2-aa3b-e88a4799a815.png) + To understand better the usual work mechanics of the validator, let’s go through a typical use-case where a user mints a table, adds data to the table, and reads it: diff --git a/docker/deployed/mainnet/api/config.json b/docker/deployed/mainnet/api/config.json index 0e506606..67b16174 100644 --- a/docker/deployed/mainnet/api/config.json +++ b/docker/deployed/mainnet/api/config.json @@ -9,8 +9,8 @@ }, "Gateway": { "ExternalURIPrefix": "https://tableland.network", - "MetadataRendererURI": "https://render.tableland.xyz", - "AnimationRendererURI": "https://render.tableland.xyz/anim" + "MetadataRendererURI": "https://tables.tableland.xyz", + "AnimationRendererURI": "https://tables.tableland.xyz" }, "DB": { "Port": "5432" @@ -188,7 +188,7 @@ }, { "Name": "Filecoin Mainnet", - "ChainID": 314, + "ChainID": 314, "Registry": { "EthEndpoint": "https://rpc.ankr.com/filecoin/${VALIDATOR_ANKR_FILECOIN_MAINNET_API_KEY}", "ContractAddress": "0x59EF8Bf2d6c102B4c42AEf9189e1a9F0ABfD652d" @@ -214,4 +214,4 @@ "HashCalculationStep": 60 } ] -} \ No newline at end of file +} diff --git a/docker/deployed/testnet/api/config.json b/docker/deployed/testnet/api/config.json index 47805a0b..742708ab 100644 --- a/docker/deployed/testnet/api/config.json +++ b/docker/deployed/testnet/api/config.json @@ -9,8 +9,8 @@ }, "Gateway": { "ExternalURIPrefix": "https://testnets.tableland.network", - "MetadataRendererURI": "https://testnets.render.tableland.xyz", - "AnimationRendererURI": "https://testnets.render.tableland.xyz/anim" + "MetadataRendererURI": "https://tables.testnets.tableland.xyz", + "AnimationRendererURI": "https://tables.testnets.tableland.xyz" }, "DB": { "Port": "5432" @@ -161,7 +161,7 @@ }, { "Name": "Filecoin Hyperspace", - "ChainID": 3141, + "ChainID": 3141, "Registry": { "EthEndpoint": "https://rpc.ankr.com/filecoin_testnet/${VALIDATOR_ANKR_FILECOIN_HYPERSPACE_API_KEY}", "ContractAddress": "0x0B9737ab4B3e5303CB67dB031b509697e31c02d3" @@ -187,4 +187,4 @@ "HashCalculationStep": 60 } ] -} \ No newline at end of file +} diff --git a/go.mod b/go.mod index 4d7c7e6d..baffa937 100644 --- a/go.mod +++ b/go.mod @@ -3,24 +3,24 @@ module github.com/textileio/go-tableland go 1.19 require ( - cloud.google.com/go/bigquery v1.50.0 + cloud.google.com/go/bigquery v1.51.0 cloud.google.com/go/logging v1.7.0 - github.com/XSAM/otelsql v0.20.0 - github.com/ethereum/go-ethereum v1.11.5 + github.com/XSAM/otelsql v0.21.0 + github.com/ethereum/go-ethereum v1.11.6 github.com/golang-migrate/migrate/v4 v4.15.2 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/json-iterator/go v1.1.12 - github.com/klauspost/compress v1.16.4 + github.com/klauspost/compress v1.16.5 github.com/mattn/go-sqlite3 v1.14.16 github.com/omeid/uconfig v1.2.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.15.0 - github.com/rs/zerolog v1.29.0 + github.com/rs/zerolog v1.29.1 github.com/sethvargo/go-limiter v0.7.2 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 - github.com/tablelandnetwork/sqlparser v0.0.0-20230328132500-785ebca8e351 + github.com/tablelandnetwork/sqlparser v0.0.0-20230420192826-7c549ca44bf8 github.com/textileio/cli v1.0.2 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0 go.opentelemetry.io/otel v1.14.0 @@ -67,7 +67,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/flatbuffers v2.0.8+incompatible // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect @@ -77,7 +77,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.0 // indirect + github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect @@ -125,12 +125,12 @@ require ( go.uber.org/zap v1.19.0 // indirect golang.org/x/crypto v0.6.0 // indirect golang.org/x/exp v0.0.0-20230206171751-46f607a40771 // indirect - golang.org/x/mod v0.8.0 // indirect + golang.org/x/mod v0.9.0 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.6.0 // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect - golang.org/x/tools v0.6.0 // indirect + golang.org/x/tools v0.7.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 64ccf178..ea588cdc 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.50.0 h1:RscMV6LbnAmhAzD893Lv9nXXy2WCaJmbxYPWDLbGqNQ= -cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= +cloud.google.com/go/bigquery v1.51.0 h1:Y3qpQAdMQlbD2xJ70Y6flcK/CVpjLRuVrR0rJSi7wD4= +cloud.google.com/go/bigquery v1.51.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= @@ -133,8 +133,8 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIO github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/XSAM/otelsql v0.20.0 h1:HIiNs5pmYxgqwm3c6J4Xv6JJ0zBlCAb0HUEJBNX/g2k= -github.com/XSAM/otelsql v0.20.0/go.mod h1:65rhbaPV/WUP7I9F3yODndlvGD7xH3JGL/oR62XemZk= +github.com/XSAM/otelsql v0.21.0 h1:Mkxp2H1S71prJFFwKdGQGe0EaGyGcxehim2wWy8OWog= +github.com/XSAM/otelsql v0.21.0/go.mod h1:65rhbaPV/WUP7I9F3yODndlvGD7xH3JGL/oR62XemZk= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -384,7 +384,7 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= @@ -459,8 +459,8 @@ github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPO github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.11.5 h1:3M1uan+LAUvdn+7wCEFrcMM4LJTeuxDrPTg/f31a5QQ= -github.com/ethereum/go-ethereum v1.11.5/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/ethereum/go-ethereum v1.11.6 h1:2VF8Mf7XiSUfmoNOy3D+ocfl9Qu8baQBrCNbo2CXQ8E= +github.com/ethereum/go-ethereum v1.11.6/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= @@ -651,8 +651,9 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -773,8 +774,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= +github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= @@ -899,8 +900,8 @@ github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdY github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.4 h1:91KN02FnsOYhuunwU4ssRe8lc2JosWmizWa91B5v1PU= -github.com/klauspost/compress v1.16.4/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= +github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -1190,8 +1191,8 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= -github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= +github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1296,6 +1297,8 @@ github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5f github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/tablelandnetwork/sqlparser v0.0.0-20230328132500-785ebca8e351 h1:aHuHicCezduOZVQXPXFM5MJ+h73caB2OUvVjGffzIsc= github.com/tablelandnetwork/sqlparser v0.0.0-20230328132500-785ebca8e351/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE= +github.com/tablelandnetwork/sqlparser v0.0.0-20230420192826-7c549ca44bf8 h1:mC58HOJfkfPsqetYd4hpCp0ey5qb9/ZkIRZEx+d2b4U= +github.com/tablelandnetwork/sqlparser v0.0.0-20230420192826-7c549ca44bf8/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/textileio/cli v1.0.2 h1:qSp/x4d/9SZ93TxhgZnE5okRKqzqHqrzAwKAPjuPw50= github.com/textileio/cli v1.0.2/go.mod h1:vTlCvvVyOmXXLwddCcBg3PDavfUsCkRBZoyr6Nu1lkc= @@ -1521,8 +1524,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1867,8 +1870,8 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2079,6 +2082,7 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= diff --git a/internal/gateway/gateway.go b/internal/gateway/gateway.go index 13a1a3fb..2dd822da 100644 --- a/internal/gateway/gateway.go +++ b/internal/gateway/gateway.go @@ -207,7 +207,7 @@ func (g *GatewayService) getMetadataImage(chainID tableland.ChainID, tableID tab return DefaultMetadataImage } - return fmt.Sprintf("%s/%d/%s", g.metadataRendererURI, chainID, tableID) + return fmt.Sprintf("%s/%d/%s.svg", g.metadataRendererURI, chainID, tableID) } func (g *GatewayService) getAnimationURL(chainID tableland.ChainID, tableID tables.TableID) string { @@ -215,7 +215,7 @@ func (g *GatewayService) getAnimationURL(chainID tableland.ChainID, tableID tabl return DefaultAnimationURL } - return fmt.Sprintf("%s/?chain=%d&id=%s", g.animationRendererURI, chainID, tableID) + return fmt.Sprintf("%s/%d/%s.html", g.animationRendererURI, chainID, tableID) } func (g *GatewayService) emptyMetadataImage() string { diff --git a/internal/gateway/gateway_test.go b/internal/gateway/gateway_test.go index d0dc9820..9504ffc0 100644 --- a/internal/gateway/gateway_test.go +++ b/internal/gateway/gateway_test.go @@ -47,7 +47,7 @@ func TestGatewayInitialization(t *testing.T) { t.Run("invalid animation uri", func(t *testing.T) { t.Parallel() - _, err := NewGateway(nil, nil, "https://tableland.network", "https://render.tableland.xyz", "invalid uri") + _, err := NewGateway(nil, nil, "https://tableland.network", "https://tables.tableland.xyz", "invalid uri") require.Error(t, err) require.ErrorContains(t, err, "animation renderer uri could not be parsed") }) @@ -97,14 +97,14 @@ func TestGateway(t *testing.T) { require.NoError(t, err) stack := map[tableland.ChainID]sqlstore.SystemStore{1337: store} - svc, err := NewGateway(parser, stack, "https://tableland.network", "https://render.tableland.xyz", "") + svc, err := NewGateway(parser, stack, "https://tableland.network", "https://tables.tableland.xyz", "") require.NoError(t, err) metadata, err := svc.GetTableMetadata(ctx, id) require.NoError(t, err) require.Equal(t, "foo_1337_42", metadata.Name) require.Equal(t, fmt.Sprintf("https://tableland.network/api/v1/tables/%d/%s", 1337, id), metadata.ExternalURL) - require.Equal(t, "https://render.tableland.xyz/1337/42", metadata.Image) //nolint + require.Equal(t, "https://tables.tableland.xyz/1337/42.svg", metadata.Image) //nolint require.Equal(t, "date", metadata.Attributes[0].DisplayType) require.Equal(t, "created", metadata.Attributes[0].TraitType) @@ -180,7 +180,7 @@ func TestGetMetadata(t *testing.T) { parser, err := parserimpl.New([]string{"system_", "registry", "sqlite_"}) require.NoError(t, err) - svc, err := NewGateway(parser, stack, "https://tableland.network", "https://render.tableland.xyz", "") + svc, err := NewGateway(parser, stack, "https://tableland.network", "https://tables.tableland.xyz", "") require.NoError(t, err) metadata, err := svc.GetTableMetadata(ctx, id) @@ -188,7 +188,7 @@ func TestGetMetadata(t *testing.T) { require.Equal(t, "foo_1337_42", metadata.Name) require.Equal(t, fmt.Sprintf("https://tableland.network/api/v1/tables/%d/%s", 1337, id), metadata.ExternalURL) - require.Equal(t, "https://render.tableland.xyz/1337/42", metadata.Image) + require.Equal(t, "https://tables.tableland.xyz/1337/42.svg", metadata.Image) require.Equal(t, "date", metadata.Attributes[0].DisplayType) require.Equal(t, "created", metadata.Attributes[0].TraitType) }) @@ -199,7 +199,7 @@ func TestGetMetadata(t *testing.T) { parser, err := parserimpl.New([]string{"system_", "registry", "sqlite_"}) require.NoError(t, err) - svc, err := NewGateway(parser, stack, "https://tableland.network", "https://render.tableland.xyz/", "") + svc, err := NewGateway(parser, stack, "https://tableland.network", "https://tables.tableland.xyz/", "") require.NoError(t, err) metadata, err := svc.GetTableMetadata(ctx, id) @@ -207,7 +207,7 @@ func TestGetMetadata(t *testing.T) { require.Equal(t, "foo_1337_42", metadata.Name) require.Equal(t, fmt.Sprintf("https://tableland.network/api/v1/tables/%d/%s", 1337, id), metadata.ExternalURL) - require.Equal(t, "https://render.tableland.xyz/1337/42", metadata.Image) + require.Equal(t, "https://tables.tableland.xyz/1337/42.svg", metadata.Image) require.Equal(t, "date", metadata.Attributes[0].DisplayType) require.Equal(t, "created", metadata.Attributes[0].TraitType) }) @@ -229,7 +229,7 @@ func TestGetMetadata(t *testing.T) { parser, err := parserimpl.New([]string{"system_", "registry", "sqlite_"}) require.NoError(t, err) - svc, err := NewGateway(parser, stack, "https://tableland.network", "https://render.tableland.xyz", "") + svc, err := NewGateway(parser, stack, "https://tableland.network", "https://tables.tableland.xyz", "") require.NoError(t, err) id, _ := tables.NewTableID("43") @@ -252,8 +252,8 @@ func TestGetMetadata(t *testing.T) { parser, stack, "https://tableland.network", - "https://render.tableland.xyz", - "https://render.tableland.xyz/anim", + "https://tables.tableland.xyz", + "https://tables.tableland.xyz", ) require.NoError(t, err) @@ -262,8 +262,8 @@ func TestGetMetadata(t *testing.T) { require.Equal(t, "foo_1337_42", metadata.Name) require.Equal(t, fmt.Sprintf("https://tableland.network/api/v1/tables/%d/%s", 1337, id), metadata.ExternalURL) - require.Equal(t, "https://render.tableland.xyz/1337/42", metadata.Image) - require.Equal(t, "https://render.tableland.xyz/anim/?chain=1337&id=42", metadata.AnimationURL) + require.Equal(t, "https://tables.tableland.xyz/1337/42.svg", metadata.Image) + require.Equal(t, "https://tables.tableland.xyz/1337/42.html", metadata.AnimationURL) require.Equal(t, "date", metadata.Attributes[0].DisplayType) require.Equal(t, "created", metadata.Attributes[0].TraitType) }) @@ -293,8 +293,8 @@ func TestQueryConstraints(t *testing.T) { parser, stack, "https://tableland.network", - "https://render.tableland.xyz", - "https://render.tableland.xyz/anim", + "https://tables.tableland.xyz", + "https://tables.tableland.xyz", ) require.NoError(t, err) diff --git a/internal/tableland/impl/tableland_test.go b/internal/tableland/impl/tableland_test.go index 47994476..1ccf84d5 100644 --- a/internal/tableland/impl/tableland_test.go +++ b/internal/tableland/impl/tableland_test.go @@ -852,8 +852,8 @@ func (s *tablelandSetup) newTablelandClient(t *testing.T) *tablelandClient { s.parser, map[tableland.ChainID]sqlstore.SystemStore{1337: s.systemStore}, "https://tableland.network/tables", - "https://render.tableland.xyz", - "https://render.tableland.xyz/anim", + "https://tables.tableland.xyz", + "https://tables.tableland.xyz", ) require.NoError(t, err) diff --git a/pkg/client/v1/client_test.go b/pkg/client/v1/client_test.go index 4f2a6a0f..5739ad59 100644 --- a/pkg/client/v1/client_test.go +++ b/pkg/client/v1/client_test.go @@ -98,8 +98,8 @@ func TestGetTableByID(t *testing.T) { table := calls.getTableByID(id) require.NotEmpty(t, fullName, table.Name) require.Equal(t, "https://testnets.tableland.network/api/v1/tables/1337/1", table.ExternalUrl) - require.Equal(t, "https://render.tableland.xyz/anim/?chain=1337&id=1", table.AnimationUrl) - require.Equal(t, "https://render.tableland.xyz/1337/1", table.Image) + require.Equal(t, "https://tables.tableland.xyz/1337/1.html", table.AnimationUrl) + require.Equal(t, "https://tables.tableland.xyz/1337/1.svg", table.Image) require.Len(t, table.Attributes, 1) require.Equal(t, "date", table.Attributes[0].DisplayType) diff --git a/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go b/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go index d980749a..c236bde8 100644 --- a/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go +++ b/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go @@ -37,12 +37,12 @@ func TestReplayProductionHistory(t *testing.T) { expectedStateHashes := map[tableland.ChainID]string{ 1: "bce26781eed109b8aaae2d1f688c134831fdf061", - 5: "913772facb72768ccd9db2ab4411296bbe166080", + 5: "f141373c03aee3a74595538abba81cd1c3755f63", 10: "1aa835eec9a9ac08cc2784d9d29df7fb15409d08", 69: "fd1ba648c9406c0af321cb734eb203c742fff2a3", 137: "fd1da780698b394a352b59e9b0c124f9cf010b67", - 420: "810a86b586e5333b453810305f0eabbf0bfb6934", - 80001: "13672494a659c31b46a8fa3d6973b7671a1d567b", + 420: "639dda72b6e4a5a8ef7ceb2b734e0b6ecc241407", + 80001: "f5bc53afc7525e9ff1f337bad8e9d4e9cb1ad111", 421613: "d58fd380066628fa92fd8a87831ea744b9ba1d8b", } diff --git a/tests/fullstack/fullstack.go b/tests/fullstack/fullstack.go index 0f7a633f..19461238 100644 --- a/tests/fullstack/fullstack.go +++ b/tests/fullstack/fullstack.go @@ -140,8 +140,8 @@ func CreateFullStack(t *testing.T, deps Deps) FullStack { parser, stores, "https://testnets.tableland.network", - "https://render.tableland.xyz", - "https://render.tableland.xyz/anim", + "https://tables.tableland.xyz", + "https://tables.tableland.xyz", ) require.NoError(t, err) gatewayService, err = gateway.NewInstrumentedGateway(gatewayService)