diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d1ba31fc7..c6fb499bf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [v23.0.0](https://github.com/Stride-Labs/stride/releases/tag/v23.0.0) - 2024-07-19 + +### On-Chain changes +1. added airdrop module ([#1235](https://github.com/Stride-Labs/stride/pull/1235)) +2. removed trade route dead code ([#1189](https://github.com/Stride-Labs/stride/pull/1189)) +3. added wasm light client ([#1224](https://github.com/Stride-Labs/stride/pull/1224)), ([#1231](https://github.com/Stride-Labs/stride/pull/1231)) +4. consolidated cli txs in to same file ([#1211](https://github.com/Stride-Labs/stride/pull/1211)) +5. v23 upgrade handler (final) ([#1243](https://github.com/Stride-Labs/stride/pull/1243)) +6. close delegation channel tx ([#1242](https://github.com/Stride-Labs/stride/pull/1242)) +7. v23 Import Paths ([#1246](https://github.com/Stride-Labs/stride/pull/1246)) +8. version bumps ([#1187](https://github.com/Stride-Labs/stride/pull/1187)), ([#1228](https://github.com/Stride-Labs/stride/pull/1228)) +9. Add Default Config Settings ([#1245](https://github.com/Stride-Labs/stride/pull/1245)) + +### Off-Chain changes +1. Faster `make sync` ([#1209](https://github.com/Stride-Labs/stride/pull/1209)) +2. Replace `docker-compose` with `docker compose` ([#1221](https://github.com/Stride-Labs/stride/pull/1221)) +3. removed version from docker compose ([#1227](https://github.com/Stride-Labs/stride/pull/1227)) + + ## [v22.0.0](https://github.com/Stride-Labs/stride/releases/tag/v22.0.0) - 2024-04-16 ### On-Chain changes diff --git a/dockernet/build.sh b/dockernet/build.sh index 758d1c7d80..a35a9f2dfa 100755 --- a/dockernet/build.sh +++ b/dockernet/build.sh @@ -49,11 +49,12 @@ build_local_and_docker() { echo "Building $title Docker... " if [[ "$module" == "stride" ]]; then - image=Dockerfile - else - image=dockernet/dockerfiles/Dockerfile.$module + # First build stride with the main image, then use the override + # in the dockerfiles folder below + DOCKER_BUILDKIT=1 docker build --tag stridezone:$module -f Dockerfile . fi - + + image=dockernet/dockerfiles/Dockerfile.$module DOCKER_BUILDKIT=1 docker build --tag stridezone:$module -f $image . docker_build_succeeded=${PIPESTATUS[0]} diff --git a/dockernet/docker-compose.yml b/dockernet/docker-compose.yml index 84e0ca6227..43069de3f5 100644 --- a/dockernet/docker-compose.yml +++ b/dockernet/docker-compose.yml @@ -2,7 +2,6 @@ services: # Stride nodes stride1: image: stridezone:stride - command: strided start --reject-config-defaults volumes: - ./state/stride1:/home/stride/.stride ports: @@ -12,13 +11,11 @@ services: stride2: image: stridezone:stride - command: strided start --reject-config-defaults volumes: - ./state/stride2:/home/stride/.stride stride3: image: stridezone:stride - command: strided start --reject-config-defaults volumes: - ./state/stride3:/home/stride/.stride @@ -103,7 +100,7 @@ services: # being run when testing upgrades host1: image: stridezone:stride - command: strided start + command: strided start --reject-config-defaults volumes: - ./state/host1:/home/stride/.stride ports: @@ -113,13 +110,13 @@ services: host2: image: stridezone:stride - command: strided start + command: strided start --reject-config-defaults volumes: - ./state/host2:/home/stride/.stride host3: image: stridezone:stride - command: strided start + command: strided start --reject-config-defaults volumes: - ./state/host3:/home/stride/.stride @@ -195,56 +192,56 @@ services: volumes: - ./state/relayer-gaia:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-gaia"] + command: [ "bash", "start.sh", "stride-gaia" ] relayer-gaia-ics: image: stridezone:relayer volumes: - ./state/relayer-gaia-ics:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-gaia-ics"] + command: [ "bash", "start.sh", "stride-gaia-ics" ] relayer-juno: image: stridezone:relayer volumes: - ./state/relayer-juno:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-juno"] + command: [ "bash", "start.sh", "stride-juno" ] relayer-osmo: image: stridezone:relayer volumes: - ./state/relayer-osmo:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-osmo"] + command: [ "bash", "start.sh", "stride-osmo" ] relayer-stars: image: stridezone:relayer volumes: - ./state/relayer-stars:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-stars"] + command: [ "bash", "start.sh", "stride-stars" ] relayer-host: image: stridezone:relayer volumes: - ./state/relayer-host:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-host"] + command: [ "bash", "start.sh", "stride-host" ] relayer-evmos: image: stridezone:relayer volumes: - ./state/relayer-evmos:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-evmos"] + command: [ "bash", "start.sh", "stride-evmos" ] relayer-dydx: image: stridezone:relayer volumes: - ./state/relayer-dydx:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-dydx"] + command: [ "bash", "start.sh", "stride-dydx" ] # Relayers for rate limiter tests relayer-juno-osmo: @@ -252,7 +249,7 @@ services: volumes: - ./state/relayer-juno-osmo:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "juno-osmo"] + command: [ "bash", "start.sh", "juno-osmo" ] # Relayers for reward converter accessory chains relayer-stride-noble: @@ -260,21 +257,21 @@ services: volumes: - ./state/relayer-stride-noble:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-noble"] + command: [ "bash", "start.sh", "stride-noble" ] relayer-noble-osmo: image: stridezone:relayer volumes: - ./state/relayer-noble-osmo:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "noble-osmo"] + command: [ "bash", "start.sh", "noble-osmo" ] relayer-stride-osmo: image: stridezone:relayer volumes: - ./state/relayer-stride-osmo:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "stride-osmo"] + command: [ "bash", "start.sh", "stride-osmo" ] # Relayers for reward converter with dydx relayer-dydx-noble: @@ -282,14 +279,14 @@ services: volumes: - ./state/relayer-dydx-noble:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "dydx-noble"] + command: [ "bash", "start.sh", "dydx-noble" ] relayer-osmo-dydx: image: stridezone:relayer volumes: - ./state/relayer-osmo-dydx:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "osmo-dydx"] + command: [ "bash", "start.sh", "osmo-dydx" ] # Relayers for reward converter with gaia relayer-gaia-noble: @@ -297,11 +294,11 @@ services: volumes: - ./state/relayer-gaia-noble:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "gaia-noble"] + command: [ "bash", "start.sh", "gaia-noble" ] relayer-osmo-gaia: image: stridezone:relayer volumes: - ./state/relayer-osmo-gaia:/home/relayer/.relayer restart: always - command: ["bash", "start.sh", "osmo-gaia"] + command: [ "bash", "start.sh", "osmo-gaia" ] \ No newline at end of file diff --git a/dockernet/dockerfiles/Dockerfile.stride b/dockernet/dockerfiles/Dockerfile.stride new file mode 100644 index 0000000000..c497949d6a --- /dev/null +++ b/dockernet/dockerfiles/Dockerfile.stride @@ -0,0 +1,3 @@ +FROM stridezone:stride + +CMD strided start --reject-config-defaults \ No newline at end of file diff --git a/dockernet/upgrades/Dockerfile.stride b/dockernet/upgrades/Dockerfile.stride index 111252ebc0..67442f10b0 100644 --- a/dockernet/upgrades/Dockerfile.stride +++ b/dockernet/upgrades/Dockerfile.stride @@ -23,6 +23,6 @@ WORKDIR /home/stride EXPOSE 26657 26656 1317 9090 -RUN echo "mv ${COSMOVISOR_HOME} ${DAEMON_HOME}/cosmovisor && cosmovisor run start" > start.sh +RUN echo "mv ${COSMOVISOR_HOME} ${DAEMON_HOME}/cosmovisor && cosmovisor run start --reject-config-defaults" > start.sh CMD ["bash", "start.sh" ] diff --git a/proto/stride/stakeibc/genesis.proto b/proto/stride/stakeibc/genesis.proto index 03caf5d2db..4c14f56115 100644 --- a/proto/stride/stakeibc/genesis.proto +++ b/proto/stride/stakeibc/genesis.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "stride/stakeibc/params.proto"; import "stride/stakeibc/host_zone.proto"; import "stride/stakeibc/epoch_tracker.proto"; -// this line is used by starport scaffolding # genesis/proto/import +import "stride/stakeibc/trade_route.proto"; option go_package = "github.com/Stride-Labs/stride/v23/x/stakeibc/types"; @@ -13,10 +13,9 @@ option go_package = "github.com/Stride-Labs/stride/v23/x/stakeibc/types"; message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; string port_id = 2; - // list of zones that are registered by the protocol repeated HostZone host_zone_list = 5 [ (gogoproto.nullable) = false ]; repeated EpochTracker epoch_tracker_list = 10 [ (gogoproto.nullable) = false ]; - // this line is used by starport scaffolding # genesis/proto/state + repeated TradeRoute trade_routes = 12 [ (gogoproto.nullable) = false ]; reserved 3, 4, 6, 9, 11; } diff --git a/x/stakeibc/genesis.go b/x/stakeibc/genesis.go index 651cd76865..3abd5a5d12 100644 --- a/x/stakeibc/genesis.go +++ b/x/stakeibc/genesis.go @@ -16,6 +16,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) for _, epochTracker := range genState.EpochTrackerList { k.SetEpochTracker(ctx, epochTracker) } + for _, tradeRoute := range genState.TradeRoutes { + k.SetTradeRoute(ctx, tradeRoute) + } k.SetParams(ctx, genState.Params) } @@ -27,6 +30,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.Params = k.GetParams(ctx) genesis.HostZoneList = k.GetAllHostZone(ctx) genesis.EpochTrackerList = k.GetAllEpochTracker(ctx) + genesis.TradeRoutes = k.GetAllTradeRoutes(ctx) return genesis } diff --git a/x/stakeibc/types/genesis.pb.go b/x/stakeibc/types/genesis.pb.go index 78f7284c74..9a5787de0e 100644 --- a/x/stakeibc/types/genesis.pb.go +++ b/x/stakeibc/types/genesis.pb.go @@ -25,11 +25,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the stakeibc module's genesis state. type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - // list of zones that are registered by the protocol + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` HostZoneList []HostZone `protobuf:"bytes,5,rep,name=host_zone_list,json=hostZoneList,proto3" json:"host_zone_list"` EpochTrackerList []EpochTracker `protobuf:"bytes,10,rep,name=epoch_tracker_list,json=epochTrackerList,proto3" json:"epoch_tracker_list"` + TradeRoutes []TradeRoute `protobuf:"bytes,12,rep,name=trade_routes,json=tradeRoutes,proto3" json:"trade_routes"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -93,6 +93,13 @@ func (m *GenesisState) GetEpochTrackerList() []EpochTracker { return nil } +func (m *GenesisState) GetTradeRoutes() []TradeRoute { + if m != nil { + return m.TradeRoutes + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "stride.stakeibc.GenesisState") } @@ -100,29 +107,31 @@ func init() { func init() { proto.RegisterFile("stride/stakeibc/genesis.proto", fileDescriptor_dea81129ed6fb77a) } var fileDescriptor_dea81129ed6fb77a = []byte{ - // 346 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xcd, 0x4e, 0xc2, 0x40, - 0x14, 0x85, 0x5b, 0x18, 0x4a, 0x19, 0x88, 0x36, 0x8d, 0x09, 0x48, 0xa4, 0x10, 0xdd, 0xb0, 0xb1, - 0x4d, 0x4a, 0x7c, 0x01, 0x12, 0xa2, 0x36, 0x2c, 0x14, 0x5c, 0xb1, 0x69, 0xda, 0x32, 0x69, 0x1b, - 0x84, 0x69, 0x3a, 0x57, 0xa3, 0x3e, 0x85, 0x2b, 0x9f, 0x89, 0x25, 0x4b, 0x57, 0xc6, 0xc0, 0x8b, - 0x98, 0x76, 0xc6, 0xbf, 0xb2, 0x9b, 0x3b, 0xe7, 0xcb, 0x77, 0x4f, 0x2e, 0xee, 0x30, 0x48, 0xe3, - 0x39, 0xb1, 0x18, 0x78, 0x0b, 0x12, 0xfb, 0x81, 0x15, 0x92, 0x15, 0x61, 0x31, 0x33, 0x93, 0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x7a, 0x6b, 0xc8, 0x9b, 0xad, 0x21, 0x7f, 0x6e, 0x0d, 0xf9, - 0x75, 0x67, 0x48, 0x9b, 0x9d, 0x21, 0xbd, 0xef, 0x0c, 0x69, 0x66, 0x87, 0x31, 0x44, 0x0f, 0xbe, - 0x19, 0xd0, 0xa5, 0x35, 0xcd, 0x17, 0x9f, 0x8f, 0x3d, 0x9f, 0x59, 0xe2, 0xdc, 0x8f, 0xf6, 0xc0, - 0x7a, 0xfa, 0x3d, 0x3a, 0x3c, 0x27, 0x84, 0xf9, 0x4a, 0x7e, 0xed, 0xc1, 0x57, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x5d, 0x8a, 0x02, 0x78, 0x19, 0x02, 0x00, 0x00, + // 383 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x4f, 0x6f, 0xa2, 0x40, + 0x18, 0x87, 0x41, 0x47, 0xc4, 0x81, 0xec, 0x12, 0xb2, 0x89, 0xac, 0xbb, 0xa2, 0xbb, 0x7b, 0xf1, + 0xb2, 0x90, 0x60, 0xf6, 0x0b, 0x98, 0x35, 0x6d, 0x89, 0x87, 0x56, 0x3d, 0x79, 0x21, 0xfc, 0x99, + 0x00, 0xb1, 0x3a, 0x64, 0x66, 0x6c, 0xda, 0x7e, 0x8a, 0x7e, 0x2c, 0x8f, 0x1e, 0x7b, 0x68, 0x9a, + 0x46, 0xbf, 0x48, 0x03, 0x4c, 0x8d, 0xc5, 0x1b, 0xef, 0xfb, 0x7b, 0xf2, 0xf0, 0xbe, 0xf3, 0xc2, + 0x2e, 0x65, 0x24, 0x8d, 0x90, 0x4d, 0x99, 0xbf, 0x44, 0x69, 0x10, 0xda, 0x31, 0x5a, 0x23, 0x9a, + 0x52, 0x2b, 0x23, 0x98, 0x61, 0xfd, 0x6b, 0x19, 0x5b, 0x1f, 0x71, 0xe7, 0x5b, 0x8c, 0x63, 0x5c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0xb9, 0xae, 0x01, 0x17, 0xc8, 0x40, 0x6b, 0xb8, 0x40, 0x96, 0xb4, + 0xa6, 0x0b, 0xe4, 0x96, 0x06, 0x5d, 0x20, 0x2b, 0x9a, 0x3a, 0x9a, 0x6c, 0xf7, 0xa6, 0xb8, 0xdb, + 0x9b, 0xe2, 0xdb, 0xde, 0x14, 0x9f, 0x0e, 0xa6, 0xb0, 0x3b, 0x98, 0xc2, 0xf3, 0xc1, 0x14, 0x16, + 0x4e, 0x9c, 0xb2, 0x64, 0x13, 0x58, 0x21, 0x5e, 0xd9, 0xb3, 0xe2, 0x8f, 0x7f, 0x27, 0x7e, 0x40, + 0x6d, 0x7e, 0xb2, 0x3b, 0x67, 0x68, 0xdf, 0x9f, 0x1c, 0xee, 0x21, 0x43, 0x34, 0x90, 0x8a, 0x9b, + 0x0d, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x38, 0x1c, 0x4a, 0x68, 0x82, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -145,6 +154,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.TradeRoutes) > 0 { + for iNdEx := len(m.TradeRoutes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TradeRoutes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if len(m.EpochTrackerList) > 0 { for iNdEx := len(m.EpochTrackerList) - 1; iNdEx >= 0; iNdEx-- { { @@ -228,6 +251,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.TradeRoutes) > 0 { + for _, e := range m.TradeRoutes { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -399,6 +428,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TradeRoutes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TradeRoutes = append(m.TradeRoutes, TradeRoute{}) + if err := m.TradeRoutes[len(m.TradeRoutes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:])