diff --git a/README.md b/README.md index 73ec62c0..1d588d1a 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,8 @@ Cosmos based blockchain integrated with Smart Contracts [Orai](https://orai.io). | [`oraivisor`](oraivisor) | A small process manager around Oraichain binaries that monitors the governance module | | [`interchaintest`](interchaintest) | Docker containers for hooks testing of IBC-compatible blockchains | -## Docker Build - -```bash -# dev -docker build -t -f orai/Dockerfile --build-arg WASMVM_VERSION=v1.5.2 --build-arg VERSION=v0.42.2 . - -# prod -docker build -t -f orai/Dockerfile.prod --build-arg WASMVM_VERSION=v1.5.2 --build-arg VERSION=v0.42.2 . -``` - ## Upgrade command ```bash -oraid tx gov submit-proposal software-upgrade "v0.42.2" --title "upgrade Oraichain network to v0.42.2" --description "Please visit https://github.com/oraichain/orai/releases/tag/v0.42.2 to view the CHANGELOG for this upgrade" --from wallet --upgrade-height 21627705 --upgrade-info "https://github.com/oraichain/orai/releases/download/v0.42.2/manifest.json" --deposit 10000000orai --chain-id Oraichain -y -b block --gas-prices 0.001orai --gas 20000000 --node https://rpc.orai.io:443 +oraid tx gov submit-proposal software-upgrade "v0.42.3" --title "upgrade Oraichain network to v0.42.3" --description "Please visit https://github.com/oraichain/orai/releases/tag/v0.42.3 to view the CHANGELOG for this upgrade" --from wallet --upgrade-height 21627705 --upgrade-info "https://github.com/oraichain/orai/releases/download/v0.42.3/manifest.json" --deposit 10000000orai --chain-id Oraichain -y -b block --gas-prices 0.001orai --gas 20000000 --node https://rpc.orai.io:443 ``` diff --git a/go.work b/go.work index a271e5ab..b986dffa 100644 --- a/go.work +++ b/go.work @@ -8,4 +8,7 @@ use ( ./oraivisor ) -replace github.com/CosmWasm/wasmd => github.com/oraichain/wasmd v0.30.2-0.20240729102409-91ec1f5fdc6c +replace ( + github.com/CosmWasm/wasmd => github.com/oraichain/wasmd v0.30.2-0.20240729102409-91ec1f5fdc6c + github.com/cosmos/cosmos-sdk => github.com/oraichain/cosmos-sdk v0.45.17-0.20240822154747-4cc2e82d6f68 +) diff --git a/go.work.sum b/go.work.sum index c5fd2609..aa2f7799 100644 --- a/go.work.sum +++ b/go.work.sum @@ -286,11 +286,9 @@ github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/Tv github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ= github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.45.16 h1:5ba/Bh5/LE55IwHQuCU4fiG4eXeDKtSWzehXRpaKDcw= github.com/cosmos/cosmos-sdk v0.45.16/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/cosmos/gogoproto v1.4.3/go.mod h1:0hLIG5TR7IvV1fme1HCFKjfzW9X2x0Mo+RooWXCnOWU= github.com/cosmos/gogoproto v1.4.4/go.mod h1:/yl6/nLwsZcZ2JY3OrqjRqvqCG9InUMcXRfRjQiF9DU= -github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ibc-go/v2 v2.0.2/go.mod h1:XUmW7wmubCRhIEAGtMGS+5IjiSSmcAwihoN/yPGd6Kk= github.com/cosmos/ibc-go/v4 v4.3.1/go.mod h1:89E+K9CxpkS/etLEcG026jPM/RSnVMcfesvRYp/0aKI= @@ -388,7 +386,6 @@ github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+ github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= @@ -396,7 +393,6 @@ github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8 github.com/google/safehtml v0.0.2/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e h1:CYRpN206UTHUinz3VJoLaBdy1gEGeJNsqT0mvswDcMw= @@ -594,6 +590,11 @@ github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.m github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= +github.com/oraichain/cometbft v0.34.30-0.20240425173150-09d3515b75aa h1:VYk/7NyyDIjiSPhTZJVjF4xbidyxikD/C1EH+ZXSzo0= +github.com/oraichain/cometbft v0.34.30-0.20240425173150-09d3515b75aa/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= +github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= +github.com/oraichain/cosmos-sdk v0.45.17-0.20240822154747-4cc2e82d6f68 h1:zXer3jRPWbrC9jl7w2cEx4nCY19QWKNRdQ7l8xF7/+U= +github.com/oraichain/cosmos-sdk v0.45.17-0.20240822154747-4cc2e82d6f68/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/oraichain/ethermint v0.14.0-kava-v21.1 h1:JOOHoQqURFMRhBXhLxiU4ey4fLwtsIXE8j0eMre9Oow= github.com/oraichain/ethermint v0.14.0-kava-v21.1/go.mod h1:L4wqbHHORlqm04t6Qmv7CYHzqnOAl8jbkJF0yNm9LH4= github.com/oraichain/ethermint v0.14.0-orai-v1.0.0 h1:8bnCJO0fyPLT+ASoPs1+PYPQLVZt80N31p6UFFq2rmY= @@ -603,15 +604,15 @@ github.com/oraichain/ethermint v0.14.0-orai-v1.0.4 h1:/V5C5ud517uHdpKvMkd9qO5xl0 github.com/oraichain/ethermint v0.14.0-orai-v1.0.4/go.mod h1:ry+tXrkYJOEE/ICMXSWOGgv4uuDkc6GjuHHln3oKatg= github.com/oraichain/ethermint v0.14.0-orai-v1.0.5 h1:+sXxJWDuKTMNrq58TYn28RxKI/m9PrZNNZpybbOKe0k= github.com/oraichain/ethermint v0.14.0-orai-v1.0.5/go.mod h1:ry+tXrkYJOEE/ICMXSWOGgv4uuDkc6GjuHHln3oKatg= -github.com/oraichain/ethermint v0.14.1-0.20240730173417-7e4df27e54fd/go.mod h1:gpe0BVcBWKIfTraQXgCZ3g2f62vFzObAv2w/hvjLUko= github.com/oraichain/juno/x/clock v0.0.0-20231103100256-4c83cb3f8224 h1:bEt/DUaqXbvaRLp7/XWqvAFTJT7/3DdyVjdD2KL7Ioo= github.com/oraichain/juno/x/clock v0.0.0-20231103100256-4c83cb3f8224/go.mod h1:9bcy6YbLhOQ3IXqlOk1O5un+mFWUoSnCYTon5zANNkM= -github.com/oraichain/juno/x/clock v0.0.0-20240730041913-b862021c6b14/go.mod h1:A2bZN9cK0mV34BBtcZx+vnWf1Zj7yiZHT5e88BXczcI= github.com/oraichain/kava v0.21.1-orai-v1.0.0/go.mod h1:3adeVmSpm8xejhI+v0qKZsLA8LNdMpkZSns1kXG9YiA= github.com/oraichain/kava v0.21.1 h1:d6PUnDEg2P3sWvcK45b9hLpMQNkz2TX3zN1v3IHZ09E= github.com/oraichain/kava v0.21.1/go.mod h1:3adeVmSpm8xejhI+v0qKZsLA8LNdMpkZSns1kXG9YiA= github.com/oraichain/wasmd v0.30.2-0.20240701023743-e3d76c6757b5 h1:X8Edb1x06x3lEx1mRLHhKnQ3ZVNLsgdpmJskmShcrXk= github.com/oraichain/wasmd v0.30.2-0.20240701023743-e3d76c6757b5/go.mod h1:DUWz5+p7h3BbDxXAt7IBovagwt5NRPCGVuQkweIixzM= +github.com/oraichain/wasmd v0.30.2-0.20240729102409-91ec1f5fdc6c h1:M9XoVJ0EgBPBfuNUMxXGpa5AitznA27m59J0j651opk= +github.com/oraichain/wasmd v0.30.2-0.20240729102409-91ec1f5fdc6c/go.mod h1:DUWz5+p7h3BbDxXAt7IBovagwt5NRPCGVuQkweIixzM= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/oxyno-zeta/gomock-extra-matcher v1.1.0/go.mod h1:UMGTHYEmJ1dRq8LDZ7VTAYO4nqM3GD1UGC3RJEUxEz0= @@ -633,7 +634,6 @@ github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrb github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= @@ -777,6 +777,7 @@ go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/ go.opentelemetry.io/otel/metric v0.32.3/go.mod h1:pgiGmKohxHyTPHGOff+vrtIH39/R9fiO/WoenUQ3kcc= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= @@ -814,20 +815,17 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= @@ -842,7 +840,6 @@ golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= @@ -850,7 +847,6 @@ golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQ golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -882,10 +878,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -923,7 +917,6 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= gonum.org/v1/plot v0.10.0/go.mod h1:JWIHJ7U20drSQb/aDpTetJzfC1KlAPldJLpkSy88dvQ= google.golang.org/api v0.0.0-20170206182103-3d017632ea10/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= @@ -936,10 +929,8 @@ google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFl google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= -google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= @@ -947,9 +938,7 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/interchaintest/go.mod b/interchaintest/go.mod index 40ac7234..3f2b80e0 100644 --- a/interchaintest/go.mod +++ b/interchaintest/go.mod @@ -6,14 +6,12 @@ toolchain go1.21.4 replace ( // fork wasmd so that we have legacy wasm types - github.com/CosmWasm/wasmd => github.com/oraichain/wasmd v0.30.2-0.20240701025001-60163da93f49 // go list -m -json github.com/oraichain/wasmvm@main | jq '.|"\(.Path) \(.Version)"' -r github.com/CosmWasm/wasmvm => github.com/oraichain/wasmvm v1.5.2 // interchaintest supports ICS features so we need this for now - github.com/cosmos/cosmos-sdk => github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - github.com/tendermint/tendermint => github.com/oraichain/cometbft v0.34.30-0.20240329015336-24dcc6856c88 + github.com/tendermint/tendermint => github.com/oraichain/cometbft v0.34.30-0.20240822152340-79f7b8278984 // github.com/tidwall/btree => github.com/tidwall/btree v1.5.0 github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7 google.golang.org/grpc => google.golang.org/grpc v1.33.2 diff --git a/orai/Dockerfile b/orai/Dockerfile deleted file mode 100755 index 481d31ab..00000000 --- a/orai/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM golang:1.19-alpine as builder - -# this comes from standard alpine nightly file -# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile -# with some changes to support our toolchain, etc -RUN set -eux; apk add --no-cache ca-certificates build-base; -RUN apk add upx bash jq -# NOTE: add these to run with LEDGER_ENABLED=true -# RUN apk add libusb-dev linux-headers - -ARG WASMVM_VERSION -ARG VERSION - -WORKDIR /workspace -COPY orai/app/ /workspace/app -COPY orai/cmd/ /workspace/cmd -COPY orai/doc/statik /workspace/doc/statik -COPY orai/go.mod /workspace/ -COPY orai/go.sum /workspace/ -COPY orai/Makefile /workspace/ - -# See https://github.com/Oraichain/wasmvm/releases -RUN set -eux; \ - export ARCH=$(uname -m); \ - wget -O /lib/libwasmvm_muslc.a https://github.com/oraichain/wasmvm/releases/download/${WASMVM_VERSION}/libwasmvm_muslc.${ARCH}.a; - -RUN go mod download - -# # force it to use static lib (from above) not standard libgo_cosmwasm.so file -RUN make build LEDGER_ENABLED=false BUILD_TAGS=muslc GOMOD_FLAGS= VERSION=${VERSION} -RUN cp /workspace/build/oraid /bin/oraid -RUN upx --best --lzma /workspace/build/oraid diff --git a/orai/Dockerfile.oraivisor b/orai/Dockerfile.oraivisor deleted file mode 100644 index c4bc2f22..00000000 --- a/orai/Dockerfile.oraivisor +++ /dev/null @@ -1,23 +0,0 @@ -FROM golang:1.15-alpine3.12 AS go-builder - -# this comes from standard alpine nightly file -# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile -# with some changes to support our toolchain, etc -RUN set -eux; apk add --no-cache ca-certificates build-base; -RUN apk add make git upx -# NOTE: add these to run with LEDGER_ENABLED=true -# RUN apk add libusb-dev linux-headers - -WORKDIR /code -COPY oraivisor /code - -RUN make build - -# make size smaller -RUN goupx /code/build/oraivisor - -# ----- Update oraivisor from mainnet-alpine --------------------------------------------------- -FROM orai/orai:0.20.1-alpine - -# copy binaries -COPY --from=go-builder /code/build/oraivisor /usr/bin \ No newline at end of file diff --git a/orai/Dockerfile.prod b/orai/Dockerfile.prod deleted file mode 100755 index e3f78e4d..00000000 --- a/orai/Dockerfile.prod +++ /dev/null @@ -1,67 +0,0 @@ -FROM golang:1.19-alpine as orai-builder - -# this comes from standard alpine nightly file -# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile -# with some changes to support our toolchain, etc -RUN set -eux; apk add --no-cache ca-certificates build-base; -RUN apk add upx jq -# NOTE: add these to run with LEDGER_ENABLED=true -# RUN apk add libusb-dev linux-headers - -ARG WASMVM_VERSION -ARG VERSION - -WORKDIR /workspace -COPY orai/app/ /workspace/app -COPY orai/cmd/ /workspace/cmd -COPY orai/doc/statik /workspace/doc/statik -COPY orai/go.mod orai/go.sum orai/Makefile /workspace/ -COPY oraivisor/ /workspace/oraivisor -COPY oraivisor/Makefile /workspace/oraivisor/Makefile - -# See https://github.com/Oraichain/wasmvm/releases -RUN set -eux; \ - export ARCH=$(uname -m); \ - wget -O /lib/libwasmvm_muslc.a https://github.com/oraichain/wasmvm/releases/download/${WASMVM_VERSION}/libwasmvm_muslc.${ARCH}.a; - -RUN go mod download - -# # force it to use static lib (from above) not standard libgo_cosmwasm.so file -RUN make build LEDGER_ENABLED=false BUILD_TAGS=muslc GOMOD_FLAGS= VERSION=${VERSION} -RUN cp /workspace/build/oraid /bin/oraid -RUN upx --best --lzma /workspace/build/oraid - -FROM golang:1.19-alpine as oraivisor-builder - -RUN set -eux; apk add --no-cache ca-certificates build-base; -RUN apk add upx jq -WORKDIR /workspace -COPY oraivisor/ /workspace/ - -# install oraivisor -RUN pwd -RUN go mod download && go mod tidy -RUN make build -RUN upx --best --lzma /workspace/build/oraivisor - -# # then remove -# RUN rm -rf /workspace/* - -FROM alpine:3.16 - -WORKDIR /workspace - -RUN apk update - -# need to install build-base to run go oraid binary -RUN apk add bash build-base jq - -ENV DAEMON_ALLOW_DOWNLOAD_BINARIES=true DAEMON_RESTART_AFTER_UPGRADE=true DAEMON_NAME=oraid DAEMON_HOME=/root -ENV PATH="${DAEMON_HOME}/oraivisor/current/bin:${PATH}" -RUN mkdir -p $DAEMON_HOME/oraivisor/genesis/bin - -# init first symbolic link to run oraid and later oraivisor will update the link -RUN ln -s $DAEMON_HOME/oraivisor/genesis $DAEMON_HOME/oraivisor/current - -COPY --from=oraivisor-builder /workspace/build/oraivisor /usr/bin -COPY --from=orai-builder /workspace/build/oraid $DAEMON_HOME/oraivisor/genesis/bin \ No newline at end of file diff --git a/orai/README.md b/orai/README.md index 02a4a385..e8889aab 100755 --- a/orai/README.md +++ b/orai/README.md @@ -67,14 +67,6 @@ sudo wget https://github.com/CosmWasm/wasmvm/releases/download/v0.13.0/libwasmvm `oraid version` -## Deployment - -We recommend using Docker to deploy the network. To do so, please type: - -```bash -docker build -t -f Dockerfile.prod . -``` - ## Protobuf & protobuf swagger generation * [Install Docker](https://docs.docker.com/engine/install) diff --git a/orai/app/app.go b/orai/app/app.go index 484bd7ef..ff9a1391 100755 --- a/orai/app/app.go +++ b/orai/app/app.go @@ -164,7 +164,7 @@ const appName = "Oraichain" var ( NodeDir = ".oraid" - BinaryVersion = "v0.42.2" + BinaryVersion = "v0.42.3" // If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals. // If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals. diff --git a/orai/doc/Genesis_validator.md b/orai/doc/Genesis_validator.md deleted file mode 100755 index 7c40db14..00000000 --- a/orai/doc/Genesis_validator.md +++ /dev/null @@ -1,116 +0,0 @@ -# Tutorial to participate in the genesis phase - -### 1. Download the setup file. - -```bash -curl -OL https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/setup_genesis.sh -sudo chmod +x setup_genesis.sh -``` - -### 2. Run the setup file. - -```bash -./setup_genesis.sh -``` - -### 3. Edit wallet name and moniker you prefer to create a new wallet and validator. - -### 4. Run the following command: - -``` -docker-compose -f docker-compose.genesis.yml up -d -``` - -### 5. Enter the container through the command: - -``` -docker-compose exec orai ash -``` - -### 6. Type the following command to initiate your genesis node: - -```bash -setup -``` - -After running, there will be three .txt files generated. - -One file, which is account.txt, stores your genesis account information as well as its mnemonic. Please keep it safe, and remove the file when you finish storing your account information. - -Please upload the .oraid/config/gentx/gentx-\*.json file to the following google form: - -### 8. Wait for the team to setup the genesis file - -On the same vpn facilitating docker-machine, it can be done using command: -`docker-machine scp genesis1:"/home/ubuntu/oraichain/.oraid/config/gentx/gentx-*.json" genesis2:/home/ubuntu/oraichain/.oraid/config/gentx/` - -then add genesis accounts: -`./fn.sh addGenAccount --address address --amount 10000000` - -and finally call `oraid collect-gentxs` to complete the genesis.json file and use `docker-machine scp genesis1:/home/ubuntu/oraichain/.oraid/config/genesis.json genesis2:/home/ubuntu/oraichain/.oraid/config` to override other node's genesis file. - -then following [Network](./network.md) for secured network setup. - -### 9. After the team has finished setting up, type the following commands: - -Download the new genesis file containing all the information of the genesis nodes. - -```bash -curl $GENESIS_URL > .oraid/config/genesis.json -``` - -After downloading, please check if it contains your account and validator information. If it does not, please inform us so we can add your information. - -### 10. Restart the container to start your node: - -``` -docker-compose -f docker-compose.genesis.yml restart orai -``` - -to check if the node has run successfully, you can make a simple http request as follows: - -```bash -curl -X GET http://localhost:1317/cosmos/staking/v1beta1/validators -``` - -if you see your validator information as well as others, then your node is running well - -```json -{ - "validators": [ - { - "operator_address": "oraivaloper13fw6fhmcnllp4c4u584rjsnuun2stddjgngk4y", - "consensus_pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "B5zXxXtJ3fGOp9Ngxn5GtemEuX7JrAZL/ysayZSU2V4=" - }, - "jailed": false, - "status": "BOND_STATUS_BONDED", - "tokens": "250000000", - "delegator_shares": "250000000.000000000000000000", - "description": { - "moniker": "phamthanhtu", - "identity": "", - "website": "", - "security_contact": "", - "details": "" - }, - "unbonding_height": "0", - "unbonding_time": "1970-01-01T00:00:00Z", - "commission": { - "commission_rates": { - "rate": "0.100000000000000000", - "max_rate": "0.200000000000000000", - "max_change_rate": "0.010000000000000000" - }, - "update_time": "2021-01-27T07:46:51.048265860Z" - }, - "min_self_delegation": "1" - } - ], - "pagination": { - "next_key": null, - "total": "1" - } -} -``` diff --git a/orai/doc/README.md b/orai/doc/README.md deleted file mode 100755 index 9f3e98c8..00000000 --- a/orai/doc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Generated doc - -Tutorials and project doc is available on https://docs.cosmwasm.com/ diff --git a/orai/doc/network.md b/orai/doc/network.md deleted file mode 100644 index 388e571f..00000000 --- a/orai/doc/network.md +++ /dev/null @@ -1,31 +0,0 @@ -## Setup nodes and validators for network - -**Validator node configuration** - -```bash -pex = false -persistent_peers = list of sentry nodes, optionally other vpn validators -private_peer_ids = -addr_book_strict = false - -oraid start --p2p.pex false --p2p.persistent_peers "" -``` - -**Sentry Node Configuration** - -```bash -pex = true -unconditional_peer_ids = validator node id -persistent_peers = validator node, optionally other vpn sentry nodes -private_peer_ids = validator node id -addr_book_strict = false -external_address = public ip -oraid start --rpc.laddr tcp://0.0.0.0:26657 --p2p.pex true --p2p.persistent_peers "" --p2p.unconditional_peer_ids "" --p2p.private_peer_ids "" -``` - -**Full Node Configuration** - -```bash -persistent_peers = sentry nodes -addr_book_strict = true -``` diff --git a/orai/doc/proto.md b/orai/doc/proto.md deleted file mode 100755 index c60b552c..00000000 --- a/orai/doc/proto.md +++ /dev/null @@ -1,857 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [x/provider/types/genesis.proto](#x/provider/types/genesis.proto) - - [GenesisState](#oraichain.orai.provider.GenesisState) - -- [x/provider/types/query.proto](#x/provider/types/query.proto) - - [Query](#oraichain.orai.provider.Query) - -- [x/provider/types/query_dsource.proto](#x/provider/types/query_dsource.proto) - - [DataSourceInfoReq](#oraichain.orai.provider.DataSourceInfoReq) - - [DataSourceInfoRes](#oraichain.orai.provider.DataSourceInfoRes) - - [ListDataSourcesReq](#oraichain.orai.provider.ListDataSourcesReq) - - [ListDataSourcesRes](#oraichain.orai.provider.ListDataSourcesRes) - -- [x/provider/types/query_oscript.proto](#x/provider/types/query_oscript.proto) - - [ListOracleScriptsReq](#oraichain.orai.provider.ListOracleScriptsReq) - - [ListOracleScriptsRes](#oraichain.orai.provider.ListOracleScriptsRes) - - [MinFeesReq](#oraichain.orai.provider.MinFeesReq) - - [MinFeesRes](#oraichain.orai.provider.MinFeesRes) - - [OracleScriptInfoReq](#oraichain.orai.provider.OracleScriptInfoReq) - - [OracleScriptInfoRes](#oraichain.orai.provider.OracleScriptInfoRes) - -- [x/provider/types/query_tcase.proto](#x/provider/types/query_tcase.proto) - - [ListTestCasesReq](#oraichain.orai.provider.ListTestCasesReq) - - [ListTestCasesRes](#oraichain.orai.provider.ListTestCasesRes) - - [TestCaseInfoReq](#oraichain.orai.provider.TestCaseInfoReq) - - [TestCaseInfoRes](#oraichain.orai.provider.TestCaseInfoRes) - -- [x/provider/types/tx.proto](#x/provider/types/tx.proto) - - [Msg](#oraichain.orai.provider.Msg) - -- [x/provider/types/tx_dsource.proto](#x/provider/types/tx_dsource.proto) - - [MsgCreateAIDataSource](#oraichain.orai.provider.MsgCreateAIDataSource) - - [MsgCreateAIDataSourceRes](#oraichain.orai.provider.MsgCreateAIDataSourceRes) - - [MsgEditAIDataSource](#oraichain.orai.provider.MsgEditAIDataSource) - - [MsgEditAIDataSourceRes](#oraichain.orai.provider.MsgEditAIDataSourceRes) - -- [x/provider/types/tx_oscript.proto](#x/provider/types/tx_oscript.proto) - - [MsgCreateOracleScript](#oraichain.orai.provider.MsgCreateOracleScript) - - [MsgCreateOracleScriptRes](#oraichain.orai.provider.MsgCreateOracleScriptRes) - - [MsgEditOracleScript](#oraichain.orai.provider.MsgEditOracleScript) - - [MsgEditOracleScriptRes](#oraichain.orai.provider.MsgEditOracleScriptRes) - -- [x/provider/types/tx_tcase.proto](#x/provider/types/tx_tcase.proto) - - [MsgCreateTestCase](#oraichain.orai.provider.MsgCreateTestCase) - - [MsgCreateTestCaseRes](#oraichain.orai.provider.MsgCreateTestCaseRes) - - [MsgEditTestCase](#oraichain.orai.provider.MsgEditTestCase) - - [MsgEditTestCaseRes](#oraichain.orai.provider.MsgEditTestCaseRes) - -- [x/provider/types/types_ds.proto](#x/provider/types/types_ds.proto) - - [AIDataSource](#oraichain.orai.provider.AIDataSource) - -- [x/provider/types/types_os.proto](#x/provider/types/types_os.proto) - - [OracleScript](#oraichain.orai.provider.OracleScript) - -- [x/provider/types/types_tc.proto](#x/provider/types/types_tc.proto) - - [TestCase](#oraichain.orai.provider.TestCase) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## x/provider/types/genesis.proto - - - - - -### GenesisState -GenesisState defines the capability module's genesis state. - - -| Field | Type | Label | Description | -| ------------- | ----------------------------------------------------- | -------- | ----------- | -| AIDataSources | [AIDataSource](#oraichain.orai.provider.AIDataSource) | repeated | | -| OracleScripts | [OracleScript](#oraichain.orai.provider.OracleScript) | repeated | | -| TestCases | [TestCase](#oraichain.orai.provider.TestCase) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/query.proto - - - - - - - - - - - -### Query -Query provides defines the gRPC querier service - -| Method Name | Request Type | Response Type | Description | -| ----------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------- | -| DataSourceInfo | [DataSourceInfoReq](#oraichain.orai.provider.DataSourceInfoReq) | [DataSourceInfoRes](#oraichain.orai.provider.DataSourceInfoRes) | DataSourceInfo gets the data source meta data | -| ListDataSources | [ListDataSourcesReq](#oraichain.orai.provider.ListDataSourcesReq) | [ListDataSourcesRes](#oraichain.orai.provider.ListDataSourcesRes) | ListDataSources gets the list of data sources | -| OracleScriptInfo | [OracleScriptInfoReq](#oraichain.orai.provider.OracleScriptInfoReq) | [OracleScriptInfoRes](#oraichain.orai.provider.OracleScriptInfoRes) | OracleScriptInfo gets the oracle script meta data | -| ListOracleScripts | [ListOracleScriptsReq](#oraichain.orai.provider.ListOracleScriptsReq) | [ListOracleScriptsRes](#oraichain.orai.provider.ListOracleScriptsRes) | ListOracleScripts gets the list of oracle scripts | -| TestCaseInfo | [TestCaseInfoReq](#oraichain.orai.provider.TestCaseInfoReq) | [TestCaseInfoRes](#oraichain.orai.provider.TestCaseInfoRes) | TestCaseInfo gets the test case meta data | -| ListTestCases | [ListTestCasesReq](#oraichain.orai.provider.ListTestCasesReq) | [ListTestCasesRes](#oraichain.orai.provider.ListTestCasesRes) | ListTestCases gets the list of test cases | -| QueryMinFees | [MinFeesReq](#oraichain.orai.provider.MinFeesReq) | [MinFeesRes](#oraichain.orai.provider.MinFeesRes) | QueryMinFees gets the min fees of oracle script | - - - - - - -

Top

- -## x/provider/types/query_dsource.proto - - - - - -### DataSourceInfoReq -DataSourceInfoReq is the request type for the Query/DataSourceInfo RPC method - - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------------------------------------------- | -| name | [string](#string) | | address is the address of the contract to query | - - - - - - - - -### DataSourceInfoRes -DataSourceInfoRes is the response type for the Query/DataSourceInfo RPC method - - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| contract | [string](#string) | | | -| description | [string](#string) | | | -| fees | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - -### ListDataSourcesReq -ListDataSourcesReq is the request type for the Query/ListDataSources RPC method - - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| name | [string](#string) | | | -| page | [int64](#int64) | | | -| limit | [int64](#int64) | | | - - - - - - - - -### ListDataSourcesRes -ListDataSourcesRes is the response type for the Query/ListDataSources RPC method - - -| Field | Type | Label | Description | -| ------------- | ----------------------------------------------------- | -------- | ----------- | -| AIDataSources | [AIDataSource](#oraichain.orai.provider.AIDataSource) | repeated | | -| count | [int64](#int64) | | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/query_oscript.proto - - - - - -### ListOracleScriptsReq -ListOracleScriptsReq is the request type for the Query/ListOracleScripts RPC method - - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| name | [string](#string) | | | -| page | [int64](#int64) | | | -| limit | [int64](#int64) | | | - - - - - - - - -### ListOracleScriptsRes -ListOracleScriptsRes is the response type for the Query/ListOracleScripts RPC method - - -| Field | Type | Label | Description | -| ------------- | ----------------------------------------------------- | -------- | ----------- | -| OracleScripts | [OracleScript](#oraichain.orai.provider.OracleScript) | repeated | | -| count | [int64](#int64) | | | - - - - - - - - -### MinFeesReq -ListOracleScriptsReq is the request type for the Query/ListOracleScripts RPC method - - -| Field | Type | Label | Description | -| ---------------- | ----------------- | ----- | ----------- | -| OracleScriptName | [string](#string) | | | -| ValNum | [int64](#int64) | | | - - - - - - - - -### MinFeesRes -ListOracleScriptsRes is the response type for the Query/ListOracleScripts RPC method - - -| Field | Type | Label | Description | -| ------- | ----------------- | ----- | ----------- | -| minFees | [string](#string) | | | - - - - - - - - -### OracleScriptInfoReq -OracleScriptInfoReq is the request type for the Query/OracleScriptInfo RPC method - - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------------------------------------------- | -| name | [string](#string) | | address is the address of the contract to query | - - - - - - - - -### OracleScriptInfoRes -OracleScriptInfoRes is the response type for the Query/OracleScriptInfo RPC method - - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------- | -------- | --------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the oracle script. | -| contract | [string](#string) | | | -| description | [string](#string) | | | -| fees | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| d_sources | [string](#string) | repeated | | -| t_cases | [string](#string) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/query_tcase.proto - - - - - -### ListTestCasesReq -ListTestCasesReq is the request type for the Query/ListTestCases RPC method - - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| name | [string](#string) | | | -| page | [int64](#int64) | | | -| limit | [int64](#int64) | | | - - - - - - - - -### ListTestCasesRes -ListTestCasesRes is the response type for the Query/ListTestCases RPC method - - -| Field | Type | Label | Description | -| --------- | --------------------------------------------- | -------- | ----------- | -| TestCases | [TestCase](#oraichain.orai.provider.TestCase) | repeated | | -| count | [int64](#int64) | | | - - - - - - - - -### TestCaseInfoReq -TestCaseInfoReq is the request type for the Query/TestCaseInfo RPC method - - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------------------------------------------- | -| name | [string](#string) | | address is the address of the contract to query | - - - - - - - - -### TestCaseInfoRes -TestCaseInfoRes is the response type for the Query/TestCaseInfo RPC method - - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------- | -------- | ----------------------------------------------------------------------------- | -| name | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the test case. | -| contract | [string](#string) | | | -| description | [string](#string) | | | -| fees | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/tx.proto - - - - - - - - - - - -### Msg -Msg defines the provider Msg service. - -| Method Name | Request Type | Response Type | Description | -| ------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------ | -| CreateAIDataSource | [MsgCreateAIDataSource](#oraichain.orai.provider.MsgCreateAIDataSource) | [MsgCreateAIDataSourceRes](#oraichain.orai.provider.MsgCreateAIDataSourceRes) | Create a new data source | -| EditAIDataSource | [MsgEditAIDataSource](#oraichain.orai.provider.MsgEditAIDataSource) | [MsgEditAIDataSourceRes](#oraichain.orai.provider.MsgEditAIDataSourceRes) | Edit an existing data source | -| CreateOracleScript | [MsgCreateOracleScript](#oraichain.orai.provider.MsgCreateOracleScript) | [MsgCreateOracleScriptRes](#oraichain.orai.provider.MsgCreateOracleScriptRes) | Create a new oracle script | -| EditOracleScript | [MsgEditOracleScript](#oraichain.orai.provider.MsgEditOracleScript) | [MsgEditOracleScriptRes](#oraichain.orai.provider.MsgEditOracleScriptRes) | Edit an existing oracle script | -| CreateTestCase | [MsgCreateTestCase](#oraichain.orai.provider.MsgCreateTestCase) | [MsgCreateTestCaseRes](#oraichain.orai.provider.MsgCreateTestCaseRes) | Create a new test case | -| EditTestCase | [MsgEditTestCase](#oraichain.orai.provider.MsgEditTestCase) | [MsgEditTestCaseRes](#oraichain.orai.provider.MsgEditTestCaseRes) | Edit an existing test case | - - - - - - -

Top

- -## x/provider/types/tx_dsource.proto - - - - - -### MsgCreateAIDataSource -MsgCreateAIDataSource submit data source metadata onto Oraichain - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| fees | [string](#string) | | | - - - - - - - - -### MsgCreateAIDataSourceRes -MsgCreateAIDataSourceRes returns store result data. - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| fees | [string](#string) | | | - - - - - - - - -### MsgEditAIDataSource -MsgEditAIDataSource edit data source metadata onto Oraichain - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ------------------------------------------------------------------------------- | -| old_name | [string](#string) | | | -| new_name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| fees | [string](#string) | | | - - - - - - - - -### MsgEditAIDataSourceRes -MsgEditAIDataSourceRes returns edit result data. - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| fees | [string](#string) | | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/tx_oscript.proto - - - - - -### MsgCreateOracleScript -MsgCreateOracleScript submit oracle script metadata onto Oraichain - - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | --------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the oracle script. | -| fees | [string](#string) | | | -| data_sources | [string](#string) | repeated | | -| test_cases | [string](#string) | repeated | | - - - - - - - - -### MsgCreateOracleScriptRes -MsgCreateOracleScriptRes returns store result data. - - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | --------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the oracle script. | -| fees | [string](#string) | | | -| data_sources | [string](#string) | repeated | | -| test_cases | [string](#string) | repeated | | - - - - - - - - -### MsgEditOracleScript -MsgEditOracleScript edit oracle script metadata onto Oraichain - - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | --------------------------------------------------------------------------------- | -| old_name | [string](#string) | | | -| new_name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the oracle script. | -| fees | [string](#string) | | | -| data_sources | [string](#string) | repeated | | -| test_cases | [string](#string) | repeated | | - - - - - - - - -### MsgEditOracleScriptRes -MsgEditOracleScriptRes returns edit result data. - - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | --------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the oracle script. | -| fees | [string](#string) | | | -| data_sources | [string](#string) | repeated | | -| test_cases | [string](#string) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/tx_tcase.proto - - - - - -### MsgCreateTestCase -MsgCreateTestCase submit test case metadata onto Oraichain - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the test case. | -| fees | [string](#string) | | | - - - - - - - - -### MsgCreateTestCaseRes -MsgCreateTestCaseRes returns store result data. - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the test case. | -| fees | [string](#string) | | | - - - - - - - - -### MsgEditTestCase -MsgEditTestCase edit test case metadata onto Oraichain - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------- | -| old_name | [string](#string) | | | -| new_name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the test case. | -| fees | [string](#string) | | | - - - - - - - - -### MsgEditTestCaseRes -MsgEditTestCaseRes returns edit result data. - - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------- | -| name | [string](#string) | | | -| description | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the test case. | -| fees | [string](#string) | | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/types_ds.proto - - - - - -### AIDataSource - - - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| description | [string](#string) | | | -| fees | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/types_os.proto - - - - - -### OracleScript - - - -| Field | Type | Label | Description | -| ------------ | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| description | [string](#string) | | | -| minimum_fees | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| d_sources | [string](#string) | repeated | | -| t_cases | [string](#string) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## x/provider/types/types_tc.proto - - - - - -### TestCase - - - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------- | -| name | [string](#string) | | | -| contract | [string](#string) | | | -| owner | [bytes](#bytes) | | Owner is the address who is allowed to make further changes to the data source. | -| description | [string](#string) | | | -| fees | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/orai/doc/reset_node.md b/orai/doc/reset_node.md deleted file mode 100755 index 76b7bd12..00000000 --- a/orai/doc/reset_node.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tutorial to reset the node - -### 1. Remove all runtime directories using the following command in the directory where you have the orai.env file - -```bash -sudo rm -rf .oraid/ -``` - -### 2. Pull and recreate the latest version of the orai image: - -``` -docker-compose pull orai && docker-compose up -d --force-recreate -``` \ No newline at end of file diff --git a/orai/doc/smart_contract.md b/orai/doc/smart_contract.md deleted file mode 100644 index 94fd8942..00000000 --- a/orai/doc/smart_contract.md +++ /dev/null @@ -1,65 +0,0 @@ -# How to simulate the oracle script smart contract - -## NOTE: You need to be in the root directory of the repository to successfully follow the below steps. - -### 1. Build the smart contract - -Start the rust container - -```bash -docker-compose up -d rust && docker-compose exec rust bash -``` - -```bash -cd oscript-price/ && optimize.sh . && exit -``` - -### 2. Start and enter the docker container - -```bash -docker-compose up -d simulate && docker-compose exec simulate bash -``` - -### 3. Simulate the smart contract - -```bash -cosmwasm-simulate oscript-price/artifacts/oscript_price.wasm -``` - -### 4. Type "query" in the command line - -The terminal will show something similar to: - -```bash -Auto loading json schema from oscript-price/artifacts/schema -Input call type(init | handle | query): -``` - -Please type **query** to continue - -### 5. Type the input for the query - -The terminal will ask you to type an input json string, similar to this below: - -```bash -Input json string: -``` - -Type the following input to query: - -```bash -{"aggregate":{"results":["100.5","200.1","300.1"]}} -``` - -The **results** field requires an array of float numbers to aggregate the results - -After typing, the result should look like: - -```bash -executing func [query] , params is {"aggregate":{"results":["100.5","200.1","300.1"]}} -query data = "200.23" -Gas used : 34661 -***************************call finished*************************** -``` - -The simulation process is done \ No newline at end of file diff --git a/orai/docker-compose-e2e-upgrade.yml b/orai/docker-compose-e2e-upgrade.yml deleted file mode 100755 index 0e204330..00000000 --- a/orai/docker-compose-e2e-upgrade.yml +++ /dev/null @@ -1,58 +0,0 @@ -services: - validator1: - container_name: validator1 - image: oraichain/foundation-orai:0.42.1-alpine-prod # one version lower so we can test the network upgrade - working_dir: /workspace - tty: true - ulimits: - nofile: - soft: 65536 - hard: 65536 - ports: - - 1317:1317 - - 26656:26656 - - 26657:26657 - - 9090:9090 - - 8545:8545 - cap_add: - - SYS_PTRACE - volumes: - - ./:/workspace - - validator2: - container_name: validator2 - image: oraichain/foundation-orai:0.42.1-alpine-prod - working_dir: /workspace - tty: true - ulimits: - nofile: - soft: 65536 - hard: 65536 - ports: - - 3317:1317 - - 36656:26656 - - 36657:26657 - - 3090:9090 - cap_add: - - SYS_PTRACE - volumes: - - ./:/workspace - - validator3: - container_name: validator3 - image: oraichain/foundation-orai:0.42.1-alpine-prod - working_dir: /workspace - tty: true - ulimits: - nofile: - soft: 65536 - hard: 65536 - ports: - - 4317:1317 - - 46656:26656 - - 46657:26657 - - 4090:9090 - cap_add: - - SYS_PTRACE - volumes: - - ./:/workspace diff --git a/orai/docker-compose.prod.yml b/orai/docker-compose.prod.yml deleted file mode 100755 index 2ad285f7..00000000 --- a/orai/docker-compose.prod.yml +++ /dev/null @@ -1,25 +0,0 @@ -services: - orai: - container_name: orai_node - image: oraichain/foundation-orai:0.42.2-alpine-prod - working_dir: /workspace - tty: true - ulimits: - nofile: - soft: 65536 - hard: 65536 - ports: - - 1317:1317 - - 26656:26656 - - 26657:26657 - - 9090:9090 - cap_add: - - SYS_PTRACE - env_file: - - orai.env - volumes: - - ./:/workspace - - oraivisor:/root/oraivisor - -volumes: - oraivisor: null diff --git a/orai/docker-compose.yml b/orai/docker-compose.yml deleted file mode 100755 index 5ef6bc01..00000000 --- a/orai/docker-compose.yml +++ /dev/null @@ -1,30 +0,0 @@ -services: - orai: - container_name: orai_node - image: oraichain/foundation-orai:0.42.2-alpine-dev - working_dir: /workspace - tty: true - ulimits: - nofile: - soft: 65536 - hard: 65536 - ports: - - 3317:1317 - - 36656:26656 - - 36657:26657 - - 3090:9090 - cap_add: - - SYS_PTRACE - env_file: - - orai.env - volumes: - - ./:/workspace - - oraivisor:/root/oraivisor - - proto: - image: cosmwasm/prototools-docker - tty: true - volumes: - - ./:/work -volumes: - oraivisor: null diff --git a/orai/go.mod b/orai/go.mod index 6206ef09..ecd674f0 100755 --- a/orai/go.mod +++ b/orai/go.mod @@ -200,8 +200,6 @@ replace ( github.com/CosmWasm/token-factory => github.com/CosmosContracts/token-factory v1.2.1-juno.0.20230523144425-253f9b9df6a6 // fork wasmd so that we have legacy wasm types - github.com/CosmWasm/wasmd => github.com/oraichain/wasmd v0.30.2-0.20240729102409-91ec1f5fdc6c - // go list -m -json github.com/oraichain/wasmvm@main | jq '.|"\(.Path) \(.Version)"' -r github.com/CosmWasm/wasmvm => github.com/oraichain/wasmvm v1.5.2 @@ -209,8 +207,6 @@ replace ( // same version as cosmos-sdk github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.2 - github.com/cosmos/cosmos-sdk => github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191 - // backport iavl and go-ethereum to matching version with cosmos sdk & kava v0.14.0-kava-v21.1 github.com/cosmos/iavl => github.com/cosmos/iavl v0.19.5 github.com/ethereum/go-ethereum => github.com/ethereum/go-ethereum v1.10.17 @@ -224,7 +220,8 @@ replace ( // use Oraichain fork of cometbft // go list -m -json github.com/oraichain/cometbft@482cde0c4e04479d4164b1b4f7a0b90071c58b7f | jq '.|"\(.Path) \(.Version)"' -r - github.com/tendermint/tendermint => github.com/oraichain/cometbft v0.34.30-0.20240329015336-24dcc6856c88 + // github.com/tendermint/tendermint => github.com/oraichain/cometbft v0.34.30-0.20240425173150-09d3515b75aa + github.com/tendermint/tendermint => github.com/oraichain/cometbft v0.34.30-0.20240822152340-79f7b8278984 // Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support // also add params query, fix proto account & ibc v3 to v4 compatibility, and get first 4 bytes of sha256(chain_id) when not eip159 compatible diff --git a/orai/go.sum b/orai/go.sum index 35d3882f..f2220e3f 100755 --- a/orai/go.sum +++ b/orai/go.sum @@ -63,6 +63,8 @@ github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRr github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/CosmWasm/wasmd v0.33.0 h1:bNh596FfZj26m02kjpA0pkRj/f1JueMokT3zJfHT6Ww= +github.com/CosmWasm/wasmd v0.33.0/go.mod h1:BuszgLUQffVXxjfFCRjc2RuulJOpLyNZpG9+GdC0t/c= github.com/CosmosContracts/token-factory v1.2.1-juno.0.20230523144425-253f9b9df6a6 h1:2jL+sNaJoH+OMGYhOCcL6M5i3RaLGDDunZr+GeWy2xQ= github.com/CosmosContracts/token-factory v1.2.1-juno.0.20230523144425-253f9b9df6a6/go.mod h1:REKRfNe+zunKZitx2wGCPJBBmwu8qofOxGhsgV2h4cw= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -221,6 +223,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-sdk v0.45.16 h1:5ba/Bh5/LE55IwHQuCU4fiG4eXeDKtSWzehXRpaKDcw= +github.com/cosmos/cosmos-sdk v0.45.16/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -824,18 +828,14 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/oraichain/cometbft v0.34.30-0.20240329015336-24dcc6856c88 h1:TCLtpL/CLFq+awORdJK3JzVJ1C+I1hS9vX+PTBcz2f4= -github.com/oraichain/cometbft v0.34.30-0.20240329015336-24dcc6856c88/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= -github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191 h1:xQrW8zgHNvuzeGxD7Yd2KPS4rZH4uTGsjFrWVHOW4eQ= -github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= +github.com/oraichain/cometbft v0.34.30-0.20240822152340-79f7b8278984 h1:6bnkvlyGf6PE+3+/fM9Ic5Yb5qafPf1iM1YG21UOxt4= +github.com/oraichain/cometbft v0.34.30-0.20240822152340-79f7b8278984/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= github.com/oraichain/ethermint v0.14.1-0.20240730173417-7e4df27e54fd h1:6x+W4+RgYlzfUkbLrVeFbjDUQTyJOyvF5konzAGUxWs= github.com/oraichain/ethermint v0.14.1-0.20240730173417-7e4df27e54fd/go.mod h1:gpe0BVcBWKIfTraQXgCZ3g2f62vFzObAv2w/hvjLUko= github.com/oraichain/juno/x/clock v0.0.0-20240730041913-b862021c6b14 h1:VF0heTRI6XI364bctsIXe5UNQctryVVU+qvGSdHax18= github.com/oraichain/juno/x/clock v0.0.0-20240730041913-b862021c6b14/go.mod h1:A2bZN9cK0mV34BBtcZx+vnWf1Zj7yiZHT5e88BXczcI= github.com/oraichain/kava v0.21.2-0.20240712210740-04e37a257e4c h1:4/8eCd5wXyUn2N41qeQ3mS5c3vqVXDNQ0VmlW1AhUoA= github.com/oraichain/kava v0.21.2-0.20240712210740-04e37a257e4c/go.mod h1:3adeVmSpm8xejhI+v0qKZsLA8LNdMpkZSns1kXG9YiA= -github.com/oraichain/wasmd v0.30.2-0.20240729102409-91ec1f5fdc6c h1:M9XoVJ0EgBPBfuNUMxXGpa5AitznA27m59J0j651opk= -github.com/oraichain/wasmd v0.30.2-0.20240729102409-91ec1f5fdc6c/go.mod h1:DUWz5+p7h3BbDxXAt7IBovagwt5NRPCGVuQkweIixzM= github.com/oraichain/wasmvm v1.5.2 h1:hN5Pa4EPlRb0BYKkNh2cgixd0+L6kPpzc+s30Il2W/Q= github.com/oraichain/wasmvm v1.5.2/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= diff --git a/orai/scripts/e2e-docker-upgrade.sh b/orai/scripts/e2e-docker-upgrade.sh deleted file mode 100755 index a716328c..00000000 --- a/orai/scripts/e2e-docker-upgrade.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/bash -set -u - -# setup the network using the old binary - -ARGS="--chain-id testing -y --keyring-backend test --gas 20000000 --gas-adjustment 1.5 -b block" -NEW_VERSION=${NEW_VERSION:-"v0.42.2"} -UPGRADE_INFO_VERSION=${UPGRADE_INFO_VERSION:-"v0.42.2"} -UPGRADE_INFO=${UPGRADE_INFO:-"https://github.com/oraichain/orai/releases/download/$UPGRADE_INFO_VERSION/manifest.json"} -MIGRATE_MSG=${MIGRATE_MSG:-'{}'} -EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'} -docker_command="docker-compose -f $PWD/docker-compose-e2e-upgrade.yml exec" -validator1_command="$docker_command validator1 bash -c" -validator2_command="$docker_command validator2 bash -c" -working_dir=/workspace -oraid_dir=$working_dir/.oraid -VALIDATOR_HOME=${VALIDATOR_HOME:-"$oraid_dir/validator1"} -WASM_PATH=${WASM_PATH:-"$working_dir/scripts/wasm_file/swapmap.wasm"} -HIDE_LOGS="/dev/null" - -# setup local network -sh $PWD/scripts/multinode-docker.sh - -# create new upgrade proposal -UPGRADE_HEIGHT=${UPGRADE_HEIGHT:-85} -$validator1_command "oraid tx gov submit-proposal software-upgrade $NEW_VERSION --title 'foobar' --description 'foobar' --from validator1 --upgrade-height $UPGRADE_HEIGHT --upgrade-info $UPGRADE_INFO --deposit 10000000orai $ARGS --home $VALIDATOR_HOME > $HIDE_LOGS" -$validator1_command "oraid tx gov vote 1 yes --from validator1 --home $VALIDATOR_HOME $ARGS > $HIDE_LOGS" -$validator1_command "oraid tx gov vote 1 yes --from validator2 --home $oraid_dir/validator2 $ARGS > $HIDE_LOGS" - -# sleep to wait til the proposal passes -echo "Sleep til the proposal passes..." - -# Check if latest height is less than the upgrade height -latest_height=$(curl --no-progress-meter http://localhost:1317/blocks/latest | jq '.block.header.height | tonumber') -echo $latest_height -while [ $latest_height -lt $UPGRADE_HEIGHT ]; -do - sleep 5 - ((latest_height=$(curl --no-progress-meter http://localhost:1317/blocks/latest | jq '.block.header.height | tonumber'))) - echo $latest_height -done - -# sleep about 5 secs to wait for the rest & json rpc server to be u -echo "Waiting for the REST & JSONRPC servers to be up ..." -sleep 19 - -oraid_version=$(curl --no-progress-meter http://localhost:36657/abci_info | jq '.result.response.version' | tr -d '"') -echo "oraid version: $oraid_version" -if [[ $oraid_version != $NEW_VERSION ]] ; then - echo "The chain has not upgraded yet. There's something wrong!"; exit 1 -fi - -height_before=$(curl --no-progress-meter http://localhost:1317/blocks/latest | jq '.block.header.height | tonumber') - -re='^[0-9]+([.][0-9]+)?$' -if ! [[ $height_before =~ $re ]] ; then - echo "error: Not a number" >&2; exit 1 -fi - -sleep 5 - -height_after=$(curl --no-progress-meter http://localhost:1317/blocks/latest | jq '.block.header.height | tonumber') - -if ! [[ $height_after =~ $re ]] ; then - echo "error: Not a number" >&2; exit 1 -fi - -if [ $height_after -gt $height_before ] -then -echo "Upgrade Passed" -else -echo "Upgarde Failed" -fi - -inflation=$(curl --no-progress-meter http://localhost:1317/cosmos/mint/v1beta1/inflation | jq '.inflation | tonumber') -if ! [[ $inflation =~ $re ]] ; then - echo "Error: Cannot query inflation => Potentially missing Go GRPC backport" >&2; - echo "Tests Failed"; exit 1 -fi - -result=$(curl --no-progress-meter http://localhost:8545/ -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}' | jq '.result') - -if ! [[ $result =~ true ]] ; then - echo "Error: Cannot query JSONRPC" >&2; - echo "Tests Failed"; exit 1 -fi - -evm_denom=$(curl --no-progress-meter http://localhost:1317/ethermint/evm/v1/params | jq '.params.evm_denom') -if ! [[ $evm_denom =~ "aorai" ]] ; then - echo "Error: EVM denom is not correct. The upgraded version is not the latest!" >&2; - echo "Tests Failed"; exit 1 -fi - -NODE_HOME=$VALIDATOR_HOME USER=validator1 WASM_PATH=$WASM_PATH bash $PWD/scripts/tests-0.42.1/test-gasless-docker.sh -NODE_HOME=$VALIDATOR_HOME USER=validator1 WASM_PATH=$WASM_PATH bash $PWD/scripts/tests-0.42.1/test-tokenfactory-docker.sh -NODE_HOME=$VALIDATOR_HOME USER=validator1 bash $PWD/scripts/tests-0.42.1/test-evm-cosmos-mapping-docker.sh -NODE_HOME=$VALIDATOR_HOME USER=validator1 bash $PWD/scripts/tests-0.42.2/test-multi-sig-docker.sh - -echo "Tests Passed" diff --git a/orai/scripts/e2e-tests.sh b/orai/scripts/e2e-tests.sh new file mode 100755 index 00000000..9c482e6a --- /dev/null +++ b/orai/scripts/e2e-tests.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +set -eu + +# setup the network using the old binary + +WASM_PATH=${WASM_PATH:-"$PWD/scripts/wasm_file/swapmap.wasm"} +ARGS="--chain-id testing -y --keyring-backend test --gas auto --gas-adjustment 1.5 -b block" +NEW_VERSION=${NEW_VERSION:-"v0.42.3"} +VALIDATOR_HOME=${VALIDATOR_HOME:-"$HOME/.oraid/validator1"} +re='^[0-9]+([.][0-9]+)?$' + +# setup local network +sh $PWD/scripts/multinode-local-testnet.sh + +# sleep about 5 secs to wait for the rest & json rpc server to be u +echo "Waiting for the REST & JSONRPC servers to be up ..." +sleep 5 + +oraid_version=$(oraid version) +if [[ $oraid_version =~ $NEW_VERSION ]] ; then + echo "The chain version is not latest yet. There's something wrong!"; exit 1 +fi + +inflation=$(curl --no-progress-meter http://localhost:1317/cosmos/mint/v1beta1/inflation | jq '.inflation | tonumber') +if ! [[ $inflation =~ $re ]] ; then + echo "Error: Cannot query inflation => Potentially missing Go GRPC backport" >&2; + echo "Tests Failed"; exit 1 +fi + +evm_denom=$(curl --no-progress-meter http://localhost:1317/ethermint/evm/v1/params | jq '.params.evm_denom') +if ! [[ $evm_denom =~ "aorai" ]] ; then + echo "Error: EVM denom is not correct. The current chain version is not the latest!" >&2; + echo "Tests Failed"; exit 1 +fi + +sh $PWD/scripts/test_clock_counter_contract.sh + +# test gasless +NODE_HOME=$VALIDATOR_HOME USER=validator1 WASM_PATH="$PWD/scripts/wasm_file/counter_high_gas_cost.wasm" sh $PWD/scripts/tests-0.42.1/test-gasless.sh +NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.1/test-tokenfactory.sh +NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.1/test-tokenfactory-bindings.sh +NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.1/test-evm-cosmos-mapping.sh +NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.1/test-evm-cosmos-mapping-complex.sh +NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.2/test-multi-sig.sh +NODE_HOME=$VALIDATOR_HOME sh $PWD/scripts/tests-0.42.3/test-commit-timeout.sh + +echo "Tests Passed!!" \ No newline at end of file diff --git a/orai/scripts/e2e-upgrade.sh b/orai/scripts/e2e-upgrade.sh index 3c1eadfc..db9a2bf6 100755 --- a/orai/scripts/e2e-upgrade.sh +++ b/orai/scripts/e2e-upgrade.sh @@ -4,10 +4,10 @@ set -eu # setup the network using the old binary -OLD_VERSION=${OLD_VERSION:-"v0.42.1"} +OLD_VERSION=${OLD_VERSION:-"v0.42.2"} WASM_PATH=${WASM_PATH:-"$PWD/scripts/wasm_file/swapmap.wasm"} ARGS="--chain-id testing -y --keyring-backend test --gas auto --gas-adjustment 1.5 -b block" -NEW_VERSION=${NEW_VERSION:-"v0.42.2"} +NEW_VERSION=${NEW_VERSION:-"v0.42.3"} VALIDATOR_HOME=${VALIDATOR_HOME:-"$HOME/.oraid/validator1"} MIGRATE_MSG=${MIGRATE_MSG:-'{}'} EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'} @@ -127,5 +127,6 @@ NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.1/test-toke NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.1/test-evm-cosmos-mapping.sh NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.1/test-evm-cosmos-mapping-complex.sh NODE_HOME=$VALIDATOR_HOME USER=validator1 sh $PWD/scripts/tests-0.42.2/test-multi-sig.sh +NODE_HOME=$VALIDATOR_HOME sh $PWD/scripts/tests-0.42.3/test-commit-timeout.sh echo "Tests Passed!!" \ No newline at end of file diff --git a/orai/scripts/multinode-docker.sh b/orai/scripts/multinode-docker.sh deleted file mode 100755 index 4a6d7abf..00000000 --- a/orai/scripts/multinode-docker.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/bash -set -u - -# # always returns true so set -e doesn't exit if it is not running. -rm -rf $PWD/.oraid/ - -# make four orai directories -mkdir $PWD/.oraid -mkdir $PWD/.oraid/validator1 -mkdir $PWD/.oraid/validator2 -mkdir $PWD/.oraid/validator3 -docker-compose -f docker-compose-e2e-upgrade.yml down --remove-orphans -docker volume rm orai_oraivisor -docker-compose -f docker-compose-e2e-upgrade.yml up -d --force-recreate -docker_command="docker-compose -f docker-compose-e2e-upgrade.yml exec" -validator1_command="$docker_command validator1 bash -c" -validator2_command="$docker_command validator2 bash -c" -validator3_command="$docker_command validator3 bash -c" -working_dir=/workspace/.oraid -HIDE_LOGS="/dev/null" - -# init all three validators -$validator1_command "oraid init --chain-id=testing validator1 --home=$working_dir/validator1" -$validator2_command "oraid init --chain-id=testing validator2 --home=$working_dir/validator2" -$validator3_command "oraid init --chain-id=testing validator3 --home=$working_dir/validator3" - -# # create keys for all three validators -$validator1_command "oraid keys add validator1 --keyring-backend=test --home=$working_dir/validator1" -$validator1_command "oraid keys add validator2 --keyring-backend=test --home=$working_dir/validator2" -$validator1_command "oraid keys add validator3 --keyring-backend=test --home=$working_dir/validator3" - -update_genesis () { - cat $PWD/.oraid/validator1/config/genesis.json | jq "$1" > $PWD/.oraid/validator1/config/tmp_genesis.json && mv $PWD/.oraid/validator1/config/tmp_genesis.json $PWD/.oraid/validator1/config/genesis.json -} - -# change staking denom to orai -update_genesis '.app_state["staking"]["params"]["bond_denom"]="orai"' - -# create validator node 1 -validator1_key=`$validator1_command "oraid keys list --output json --home $working_dir/validator1 --keyring-backend test" | jq .[0].address` -$validator1_command "oraid add-genesis-account $validator1_key 1000000000000orai,1000000000000stake --home=$working_dir/validator1" -$validator1_command "oraid gentx validator1 500000000orai --keyring-backend=test --home=$working_dir/validator1 --chain-id=testing" -$validator1_command "oraid collect-gentxs --home=$working_dir/validator1" -$validator1_command "oraid validate-genesis --home=$working_dir/validator1" - -# update staking genesis -update_genesis '.app_state["staking"]["params"]["unbonding_time"]="240s"' - -# update crisis variable to orai -update_genesis '.app_state["crisis"]["constant_fee"]["denom"]="orai"' - -# udpate gov genesis -update_genesis '.app_state["gov"]["voting_params"]["voting_period"]="5s"' -update_genesis '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="orai"' - -# update mint genesis -update_genesis '.app_state["mint"]["params"]["mint_denom"]="orai"' - -# port key (validator1 uses default ports) -# validator1 1317, 9090, 9091, 26658, 26657, 26656, 6060 -# validator2 1316, 9088, 9089, 26655, 26654, 26653, 6061 -# validator3 1315, 9086, 9087, 26652, 26651, 26650, 6062 - - -# change app.toml values -VALIDATOR1_APP_TOML=$PWD/.oraid/validator1/config/app.toml -VALIDATOR2_APP_TOML=$PWD/.oraid/validator2/config/app.toml -VALIDATOR3_APP_TOML=$PWD/.oraid/validator3/config/app.toml - -# change config.toml values -VALIDATOR1_CONFIG=$PWD/.oraid/validator1/config/config.toml -VALIDATOR2_CONFIG=$PWD/.oraid/validator2/config/config.toml -VALIDATOR3_CONFIG=$PWD/.oraid/validator3/config/config.toml - -# Pruning - comment this configuration if you want to run upgrade script -pruning="custom" -pruning_keep_recent="5" -pruning_keep_every="10" -pruning_interval="10" - -sed -i -e "s%^pruning *=.*%pruning = \"$pruning\"%; " $VALIDATOR1_APP_TOML -sed -i -e "s%^pruning-keep-recent *=.*%pruning-keep-recent = \"$pruning_keep_recent\"%; " $VALIDATOR1_APP_TOML -sed -i -e "s%^pruning-keep-every *=.*%pruning-keep-every = \"$pruning_keep_every\"%; " $VALIDATOR1_APP_TOML -sed -i -e "s%^pruning-interval *=.*%pruning-interval = \"$pruning_interval\"%; " $VALIDATOR1_APP_TOML - -sed -i -e "s%^pruning *=.*%pruning = \"$pruning\"%; " $VALIDATOR2_APP_TOML -sed -i -e "s%^pruning-keep-recent *=.*%pruning-keep-recent = \"$pruning_keep_recent\"%; " $VALIDATOR2_APP_TOML -sed -i -e "s%^pruning-keep-every *=.*%pruning-keep-every = \"$pruning_keep_every\"%; " $VALIDATOR2_APP_TOML -sed -i -e "s%^pruning-interval *=.*%pruning-interval = \"$pruning_interval\"%; " $VALIDATOR2_APP_TOML - -sed -i -e "s%^pruning *=.*%pruning = \"$pruning\"%; " $VALIDATOR3_APP_TOML -sed -i -e "s%^pruning-keep-recent *=.*%pruning-keep-recent = \"$pruning_keep_recent\"%; " $VALIDATOR3_APP_TOML -sed -i -e "s%^pruning-keep-every *=.*%pruning-keep-every = \"$pruning_keep_every\"%; " $VALIDATOR3_APP_TOML -sed -i -e "s%^pruning-interval *=.*%pruning-interval = \"$pruning_interval\"%; " $VALIDATOR3_APP_TOML - -# state sync - comment this configuration if you want to run upgrade script -snapshot_interval="10" -snapshot_keep_recent="2" - -sed -i -e "s%^snapshot-interval *=.*%snapshot-interval = \"$snapshot_interval\"%; " $VALIDATOR1_APP_TOML -sed -i -e "s%^snapshot-keep-recent *=.*%snapshot-keep-recent = \"$snapshot_keep_recent\"%; " $VALIDATOR1_APP_TOML - -sed -i -e "s%^snapshot-interval *=.*%snapshot-interval = \"$snapshot_interval\"%; " $VALIDATOR2_APP_TOML -sed -i -e "s%^snapshot-keep-recent *=.*%snapshot-keep-recent = \"$snapshot_keep_recent\"%; " $VALIDATOR2_APP_TOML - -sed -i -e "s%^snapshot-interval *=.*%snapshot-interval = \"$snapshot_interval\"%; " $VALIDATOR3_APP_TOML -sed -i -e "s%^snapshot-keep-recent *=.*%snapshot-keep-recent = \"$snapshot_keep_recent\"%; " $VALIDATOR3_APP_TOML - -# validator1 -sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR1_CONFIG - -# validator2 -sed -i -E 's|tcp://127.0.0.1:26658|tcp://0.0.0.0:26658|g' $VALIDATOR2_CONFIG -sed -i -E 's|tcp://127.0.0.1:26657|tcp://0.0.0.0:26657|g' $VALIDATOR2_CONFIG -sed -i -E 's|tcp://0.0.0.0:26656|tcp://0.0.0.0:26656|g' $VALIDATOR2_CONFIG -sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR2_CONFIG - -# validator3 -sed -i -E 's|tcp://127.0.0.1:26658|tcp://0.0.0.0:26658|g' $VALIDATOR3_CONFIG -sed -i -E 's|tcp://127.0.0.1:26657|tcp://0.0.0.0:26657|g' $VALIDATOR3_CONFIG -sed -i -E 's|tcp://0.0.0.0:26656|tcp://0.0.0.0:26656|g' $VALIDATOR3_CONFIG -sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR3_CONFIG - -# modify jsonrpc ports to avoid clashing -sed -i -E 's|0.0.0.0:8545|0.0.0.0:7545|g' $VALIDATOR2_APP_TOML -sed -i -e "s%^ws-address *=.*%ws-address = \"0.0.0.0:7546\"%; " $VALIDATOR2_APP_TOML - -sed -i -E 's|0.0.0.0:8545|0.0.0.0:6545|g' $VALIDATOR3_APP_TOML -sed -i -e "s%^ws-address *=.*%ws-address = \"0.0.0.0:6546\"%; " $VALIDATOR3_APP_TOML - -# copy validator1 genesis file to validator2-3 -cp $PWD/.oraid/validator1/config/genesis.json $PWD/.oraid/validator2/config/genesis.json -cp $PWD/.oraid/validator1/config/genesis.json $PWD/.oraid/validator3/config/genesis.json - -validator1_id_res=`$validator1_command "oraid tendermint show-node-id --home=$working_dir/validator1 --log_format json"` -validator1_id=$(echo "$validator1_id_res" | tr -d -c '[:alnum:]') # remove all special characters because of the command's result -# copy tendermint node id of validator1 to persistent peers of validator2-3 -sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$validator1_id@validator1:26656\"|g" $VALIDATOR2_CONFIG -sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$validator1_id@validator1:26656\"|g" $VALIDATOR3_CONFIG - -# start all three validators -$docker_command -d validator1 bash -c "oraivisor start --home=$working_dir/validator1" -$docker_command -d validator2 bash -c "oraivisor start --home=$working_dir/validator2" -$docker_command -d validator3 bash -c "oraivisor start --home=$working_dir/validator3" - -# send orai from first validator to second validator -echo "Waiting 5 seconds to send funds to validators 2 and 3..." -sleep 5 - -validator2_key_res=`$validator2_command "oraid keys show validator2 -a --keyring-backend=test --home=$working_dir/validator2"` -validator2_key=$(echo "$validator2_key_res" | tr -d -c '[:alnum:]') # remove all special characters because of the command's result -validator3_key_res=`$validator3_command "oraid keys show validator3 -a --keyring-backend=test --home=$working_dir/validator3"` -validator3_key=$(echo "$validator3_key_res" | tr -d -c '[:alnum:]') # remove all special characters because of the command's result - -$validator1_command "oraid tx send validator1 $validator2_key 5000000000orai --keyring-backend=test --home=$working_dir/validator1 --chain-id=testing --broadcast-mode block --gas 200000 --fees 2orai --yes > $HIDE_LOGS" -$validator1_command "oraid tx send validator1 $validator3_key 4000000000orai --keyring-backend=test --home=$working_dir/validator1 --chain-id=testing --broadcast-mode block --gas 200000 --fees 2orai --yes > $HIDE_LOGS" -# send test orai to a test account -# oraid tx send $(oraid keys show validator1 -a --keyring-backend=test --home=$PWD/.oraid/validator1) orai14n3tx8s5ftzhlxvq0w5962v60vd82h30rha573 5000000000orai --keyring-backend=test --home=$PWD/.oraid/validator1 --chain-id=testing --broadcast-mode block --gas 200000 --fees 2orai --node http://localhost:26657 --yes - -# create second & third validator -validator2_pubkey_res=`$validator2_command "oraid tendermint show-validator --home=$working_dir/validator2"` -validator2_pubkey=$(echo "$validator2_pubkey_res" | jq '@json') # remove all special characters because of the command's result -validator3_pubkey_res=`$validator3_command "oraid tendermint show-validator --home=$working_dir/validator3"` -validator3_pubkey=$(echo "$validator3_pubkey_res" | jq '@json') # remove all special characters because of the command's result -$validator2_command "oraid tx staking create-validator --amount=500000000orai --from=validator2 --pubkey=$validator2_pubkey --moniker=validator2 --chain-id=testing --commission-rate=0.1 --commission-max-rate=0.2 --commission-max-change-rate=0.05 --min-self-delegation=500000000 --keyring-backend=test --home=$working_dir/validator2 --broadcast-mode block --gas 200000 --fees 2orai --yes > $HIDE_LOGS" -$validator3_command "oraid tx staking create-validator --amount=400000000orai --from=validator3 --pubkey=$validator3_pubkey --moniker=validator3 --chain-id=testing --commission-rate=0.1 --commission-max-rate=0.2 --commission-max-change-rate=0.05 --min-self-delegation=400000000 --keyring-backend=test --home=$working_dir/validator3 --broadcast-mode block --gas 200000 --fees 2orai --yes > $HIDE_LOGS" - -echo "All 3 Validators are up and running!" \ No newline at end of file diff --git a/orai/scripts/test_clock_counter_contract.sh b/orai/scripts/test_clock_counter_contract.sh index 9a34a1c9..84c4a554 100755 --- a/orai/scripts/test_clock_counter_contract.sh +++ b/orai/scripts/test_clock_counter_contract.sh @@ -1,6 +1,7 @@ #!/bin/bash # Before running this script, you must setup local network: # sh $PWD/scripts/multinode-local-testnet.sh +# cw-clock-example.wasm source code: https://github.com/oraichain/cw-plus.git WASM_PATH=${WASM_PATH:-"$PWD/scripts/wasm_file/cw-clock-example.wasm"} ARGS="--chain-id testing -y --keyring-backend test --gas auto --gas-adjustment 1.5 -b block" @@ -38,9 +39,21 @@ counter_after=$(oraid query wasm contract-state smart $contract_address $QUERY_M sleep 2 echo "cw-clock counter_after: $counter_after" -if [ $counter_after -gt $counter_before ] -then -echo "Clock Counter Test Passed" -else -echo "Clock Counter Test Failed" +if [[ $counter_after == $counter_before ]]; then + echo "Clock Counter Test Failed"; exit 1 fi + +QUERY_MSG='{"get_after_sudo":{}}' +after_sudo_before=$(oraid query wasm contract-state smart $contract_address $QUERY_MSG --node "tcp://localhost:26657" --output json | jq -r '.data | tonumber') +sleep 2 +echo "cw-clock after sudo before: $after_sudo_before" + +after_sudo_after=$(oraid query wasm contract-state smart $contract_address $QUERY_MSG --node "tcp://localhost:26657" --output json | jq -r '.data | tonumber') +sleep 2 +echo "cw-clock after sudo after: $after_sudo_after" + +if [[ $after_sudo_before == $after_sudo_after ]]; then + echo "Clock Counter After Sudo Test Failed"; exit 1 +fi + +echo "Clock Counter Test Passed" diff --git a/orai/scripts/tests-0.42.1/test-evm-cosmos-mapping-docker.sh b/orai/scripts/tests-0.42.1/test-evm-cosmos-mapping-docker.sh deleted file mode 100755 index 5da683dd..00000000 --- a/orai/scripts/tests-0.42.1/test-evm-cosmos-mapping-docker.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -eux - -CHAIN_ID=${CHAIN_ID:-testing} -USER=${USER:-tupt} -NODE_HOME=${NODE_HOME:-"$PWD/.oraid"} -ARGS="--from $USER --chain-id $CHAIN_ID -y --keyring-backend test --gas auto --gas-adjustment 1.5 -b block --home $NODE_HOME" -docker_command="docker-compose -f $PWD/docker-compose-e2e-upgrade.yml exec" -validator1_command="$docker_command validator1 bash -c" -HIDE_LOGS="/dev/null" - -user_address_result=`$validator1_command "oraid keys show $USER --home $NODE_HOME --keyring-backend test --output json"` -user_address=$(echo $user_address_result | jq '.address' | tr -d '"') - -user_pubkey_result=`$validator1_command "oraid keys show $USER --home $NODE_HOME --keyring-backend test -p"` -user_pubkey=$(echo $user_pubkey_result | jq '.key' | tr -d '"') -$validator1_command "oraid tx evm set-mapping-evm $user_pubkey $ARGS > $HIDE_LOGS" - -expected_evm_address=`$validator1_command "oraid debug pubkey-simple $user_pubkey"` -actual_evm_address_result=`$validator1_command "oraid query evm mappedevm $user_address --output json"` -actual_evm_address=$(echo $actual_evm_address_result | jq '.evm_address' | tr -d '"') -if ! [[ $actual_evm_address =~ $expected_evm_address ]] ; then - echo "The evm addresses dont match"; exit 1 -fi - -echo "EVM cosmos mapping docker tests passed!" \ No newline at end of file diff --git a/orai/scripts/tests-0.42.1/test-gasless-docker.sh b/orai/scripts/tests-0.42.1/test-gasless-docker.sh deleted file mode 100755 index a120e50b..00000000 --- a/orai/scripts/tests-0.42.1/test-gasless-docker.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -eu - -CHAIN_ID=${CHAIN_ID:-testing} -USER=${USER:-tupt} -WASM_PATH=${WASM_PATH:-"$PWD/scripts/wasm_file/swapmap.wasm"} -EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'} -NODE_HOME=${NODE_HOME:-"$PWD/.oraid"} -ARGS="--from $USER --chain-id $CHAIN_ID -y --keyring-backend test --gas 20000000 --gas-adjustment 1.5 -b block --home $NODE_HOME" -docker_command="docker-compose -f $PWD/docker-compose-e2e-upgrade.yml exec" -validator1_command="$docker_command validator1 bash -c" -HIDE_LOGS="/dev/null" - -# prepare a new contract for gasless -store_ret=`$validator1_command "oraid tx wasm store $WASM_PATH --from validator1 --home $NODE_HOME $ARGS --output json"` -code_id=$(echo $store_ret | jq -r '.logs[0].events[1].attributes[] | select(.key | contains("code_id")).value') -$validator1_command "oraid tx wasm instantiate $code_id \"{}\" --label 'testing' --from validator1 --home $NODE_HOME -b block --no-admin $ARGS > $HIDE_LOGS" -contract_address_res=`$validator1_command "oraid query wasm list-contract-by-code $code_id --output json | jq -r '.contracts[0]'"` -contract_address=$(echo "$contract_address_res" | tr -d -c '[:alnum:]') # remove all special characters because of the command's result - -# set gasless proposal -$validator1_command "oraid tx gov submit-proposal set-gasless $contract_address --title 'gasless' --description 'gasless' --deposit 10000000orai $ARGS > $HIDE_LOGS" -proposal_id_result=`$validator1_command "oraid query gov proposals --reverse --output json"` -proposal_id=$(echo $proposal_id_result | jq '.proposals[0].proposal_id | tonumber') - -$validator1_command "oraid tx gov vote $proposal_id yes $ARGS > $HIDE_LOGS" - -# wait til proposal passes -sleep 6 -proposal_status_result=`$validator1_command "oraid query gov proposal $proposal_id --output json"` -proposal_status=$(echo $proposal_status_result | jq '.status') -if ! [[ $proposal_status =~ "PROPOSAL_STATUS_PASSED" ]] ; then - echo "The proposal has not passed yet"; exit 1 -fi \ No newline at end of file diff --git a/orai/scripts/tests-0.42.1/test-tokenfactory-docker.sh b/orai/scripts/tests-0.42.1/test-tokenfactory-docker.sh deleted file mode 100755 index 9f0fdf7a..00000000 --- a/orai/scripts/tests-0.42.1/test-tokenfactory-docker.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -set -eu - -CHAIN_ID=${CHAIN_ID:-testing} -USER=${USER:-tupt} -NODE_HOME=${NODE_HOME:-"$PWD/.oraid"} -ARGS="--from $USER --chain-id $CHAIN_ID -y --keyring-backend test --gas auto --gas-adjustment 1.5 -b block --home $NODE_HOME" -docker_command="docker-compose -f $PWD/docker-compose-e2e-upgrade.yml exec" -validator1_command="$docker_command validator1 bash -c" -HIDE_LOGS="/dev/null" - -# prepare a new contract for gasless -fee_params=`$validator1_command "oraid query tokenfactory params --output json | jq '.params.denom_creation_fee[0].denom'"` -if ! [[ $fee_params =~ "orai" ]] ; then - echo "The tokenfactory fee params is not orai"; exit 1 -fi - -# try creating a new denom -denom_name="usdt" -$validator1_command "oraid tx tokenfactory create-denom $denom_name $ARGS > $HIDE_LOGS" - -# try querying list denoms afterwards -user_address_result=`$validator1_command "oraid keys show $USER --home $NODE_HOME --keyring-backend test --output json"` -user_address=$(echo $user_address_result | jq '.address' | tr -d '"') -first_denom_before_trim=`$validator1_command "oraid query tokenfactory denoms-from-creator $user_address --output json"` -first_denom=$(echo $first_denom_before_trim | jq '.denoms[0]' | tr -d '"') -echo "first denom: $first_denom" - -if ! [[ $first_denom =~ "factory/$user_address/$denom_name" ]] ; then - echo "The tokenfactory denom does not match the created denom"; exit 1 -fi - -admin=`$validator1_command "oraid query tokenfactory denom-authority-metadata $first_denom --output json | jq '.authority_metadata.admin'"` -echo "admin: $admin" - -if ! [[ $admin =~ $user_address ]] ; then - echo "The tokenfactory admin does not match the creator"; exit 1 -fi - -# try mint -$validator1_command "oraid tx tokenfactory mint 10$first_denom $ARGS > $HIDE_LOGS" - -# query balance after mint -tokenfactory_balance_result=`$validator1_command "oraid query bank balances $user_address --denom=$first_denom --output json"` -tokenfactory_balance=$(echo $tokenfactory_balance_result | jq '.amount | tonumber') -echo "token factory balance: $tokenfactory_balance" -if [[ $tokenfactory_balance -ne 10 ]] ; then - echo "The tokenfactory balance does not increase after mint"; exit 1 -fi - -# try burn -$validator1_command "oraid tx tokenfactory burn 10$first_denom $ARGS > $HIDE_LOGS" -tokenfactory_balance_result=`$validator1_command "oraid query bank balances $user_address --denom=$first_denom --output json"` -tokenfactory_balance=$(echo $tokenfactory_balance_result | jq '.amount | tonumber') -if [[ $tokenfactory_balance -ne 0 ]] ; then - echo "The tokenfactory balance does not decrease after burn"; exit 1 -fi - -echo "Tokenfactory tests passed!" \ No newline at end of file diff --git a/orai/scripts/tests-0.42.2/test-multi-sig-docker.sh b/orai/scripts/tests-0.42.2/test-multi-sig-docker.sh deleted file mode 100755 index 73ca1f96..00000000 --- a/orai/scripts/tests-0.42.2/test-multi-sig-docker.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -set -eu - -CHAIN_ID=${CHAIN_ID:-testing} -USER=${USER:-tupt} -NODE_HOME=${NODE_HOME:-"$PWD/.oraid"} -ARGS="--from $USER --chain-id $CHAIN_ID -y --keyring-backend test --gas 20000000 -b block --home $NODE_HOME" -docker_command="docker-compose -f $PWD/docker-compose-e2e-upgrade.yml exec" -validator1_command="$docker_command validator1 bash -c" -HIDE_LOGS="/dev/null" - -# add a signer wallet -signer="signer" -$validator1_command "echo y | oraid keys add $signer --home $NODE_HOME --keyring-backend test" -signer_address_result=`$validator1_command "oraid keys show $signer --home $NODE_HOME --keyring-backend test --output json"` -signer_address=$(echo $signer_address_result | jq '.address' | tr -d '"') - -# add a multisig wallet -multisig="multisig" -$validator1_command "echo y | oraid keys add $multisig --multisig $USER,$signer --multisig-threshold 1 --home $NODE_HOME --keyring-backend test" -multisig_address_result=`$validator1_command "oraid keys show $multisig --home $NODE_HOME --keyring-backend test --output json"` -multisig_address=$(echo $multisig_address_result | jq '.address' | tr -d '"') - -user_address_result=`$validator1_command "oraid keys show $USER --home $NODE_HOME --keyring-backend test --output json"` -user_address=$(echo $user_address_result | jq '.address' | tr -d '"') - -# send some tokens to the multisign address -$validator1_command "oraid tx send $user_address $multisig_address 100000000orai $ARGS > $HIDE_LOGS" -$validator1_command "oraid tx send $user_address $signer_address 100000000orai $ARGS > $HIDE_LOGS" - -# now we test multi-sign -# generate dry message -$validator1_command "oraid tx send $multisig_address $user_address 1orai --generate-only $ARGS 2>&1 | tee tx.json" - -# sign message -$validator1_command "oraid tx sign --from $user_address --multisig=$multisig_address tx.json $ARGS 2>&1 | tee tx-signed-data.json" - -# multisign -$validator1_command "oraid tx multisign tx.json multisig tx-signed-data.json $ARGS 2>&1 | tee tx-signed.json" - -# broadcast -result=`$validator1_command "oraid tx broadcast tx-signed.json $ARGS --output json"` -code=$(echo $result | jq '.code | tonumber') -# clean up tx files -$validator1_command "rm tx*.json" - -if [[ $code -gt 0 ]] ; then - echo "Multi-sig test failed"; exit 1 -fi - -echo "Multi-sign test passed!" \ No newline at end of file diff --git a/orai/scripts/tests-0.42.3/test-commit-timeout.sh b/orai/scripts/tests-0.42.3/test-commit-timeout.sh new file mode 100755 index 00000000..07a0b9da --- /dev/null +++ b/orai/scripts/tests-0.42.3/test-commit-timeout.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -eu + +NODE_HOME=${NODE_HOME:-"$PWD/.oraid"} +TEST_NODE_HOME="$NODE_HOME/.oraid" + +# remove old test default config files +rm -rf $TEST_NODE_HOME +# populate config files in the test directory +oraid version --home $TEST_NODE_HOME + +# Extract timeout commit from the test commit file. Should be 500ms +timeout_commit=$(sed -n 's/^[[:space:]]*timeout_commit[[:space:]]*=[[:space:]]*"\(.*\)".*/\1/p' $TEST_NODE_HOME/config/config.toml) +echo "timeout commit: $timeout_commit" + +if ! [[ $timeout_commit == "500ms" ]] ; then + echo "Commit timeout test failed"; exit 1 +fi + +echo "Commit timeout test passed!" \ No newline at end of file diff --git a/orai/scripts/wasm_file/cw-clock-example.wasm b/orai/scripts/wasm_file/cw-clock-example.wasm index 87781826..bfb1fe40 100644 Binary files a/orai/scripts/wasm_file/cw-clock-example.wasm and b/orai/scripts/wasm_file/cw-clock-example.wasm differ