Skip to content

Commit

Permalink
Merge branch 'v2.0-dev' into feat/sdk/queries
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov authored Feb 14, 2025
2 parents 1412c03 + ddf4e67 commit d153226
Show file tree
Hide file tree
Showing 102 changed files with 11,405 additions and 1,007 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,14 @@ jobs:
include:
- runner: ubuntu-24.04
platform: linux/amd64
- runner: ubuntu-24.04
- runner: ubuntu-24.04-arm
platform: linux/arm64
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.platform == 'linux/arm64' }}

- name: Build and push by digest
uses: ./.github/actions/docker
id: docker_build
Expand Down
16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# conflicts in case of parallel compilation.
# 3. Configuration variables are shared between runs using /root/env file.

ARG ALPINE_VERSION=3.18
ARG ALPINE_VERSION=3.21

# deps-${RUSTC_WRAPPER:-base}
# If one of SCCACHE_GHA_ENABLED, SCCACHE_BUCKET, SCCACHE_MEMCACHED is set, then deps-sccache is used, otherwise deps-base
Expand Down Expand Up @@ -72,6 +72,7 @@ RUN apk add --no-cache \
ca-certificates \
clang-static clang-dev \
cmake \
curl \
git \
libc-dev \
linux-headers \
Expand Down Expand Up @@ -148,7 +149,13 @@ RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export PROTOC_ARCH=aarch_64; else e
ln -s /opt/protoc/bin/protoc /usr/bin/

# Switch to clang
RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc
# Note that CC / CXX can be updated later on (eg. when configuring sccache)
RUN rm /usr/bin/cc && \
ln -s /usr/bin/clang /usr/bin/cc
RUN <<EOS
echo "export CXX='clang++'" >> /root/env
echo "export CC='clang'" >> /root/env
EOS

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
Expand Down Expand Up @@ -287,6 +294,7 @@ git clone https://github.com/facebook/rocksdb.git -b v9.9.3 --depth 1 .
source /root/env

make -j$(nproc) static_lib

mkdir -p /opt/rocksdb/usr/local/lib
cp librocksdb.a /opt/rocksdb/usr/local/lib/
cp -r include /opt/rocksdb/usr/local/
Expand Down Expand Up @@ -494,11 +502,13 @@ WORKDIR /platform
COPY --from=build-planner /platform/recipe.json recipe.json

# Build dependencies - this is the caching Docker layer!
# Note we unset CFLAGS and CXXFLAGS as they have `-march` included, which breaks wasm32 build
RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=secret,id=AWS \
source /root/env && \
unset CFLAGS CXXFLAGS && \
cargo chef cook \
--recipe-path recipe.json \
--profile "$CARGO_BUILD_PROFILE" \
Expand Down Expand Up @@ -546,12 +556,14 @@ COPY --parents \
packages/dash-spv \
/platform/

# We unset CFLAGS CXXFLAGS because they hold `march` flags which break wasm32 build
RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=cache,sharing=shared,id=unplugged_${TARGETARCH},target=/tmp/unplugged \
--mount=type=secret,id=AWS \
source /root/env && \
unset CFLAGS CXXFLAGS && \
cp -R /tmp/unplugged /platform/.yarn/ && \
yarn install --inline-builds && \
cp -R /platform/.yarn/unplugged /tmp/ && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,37 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse> getGetTok
return getGetTokenStatusesMethod;
}

private static volatile io.grpc.MethodDescriptor<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse> getGetTokenPreProgrammedDistributionsMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getTokenPreProgrammedDistributions",
requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest.class,
responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse> getGetTokenPreProgrammedDistributionsMethod() {
io.grpc.MethodDescriptor<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse> getGetTokenPreProgrammedDistributionsMethod;
if ((getGetTokenPreProgrammedDistributionsMethod = PlatformGrpc.getGetTokenPreProgrammedDistributionsMethod) == null) {
synchronized (PlatformGrpc.class) {
if ((getGetTokenPreProgrammedDistributionsMethod = PlatformGrpc.getGetTokenPreProgrammedDistributionsMethod) == null) {
PlatformGrpc.getGetTokenPreProgrammedDistributionsMethod = getGetTokenPreProgrammedDistributionsMethod =
io.grpc.MethodDescriptor.<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getTokenPreProgrammedDistributions"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse.getDefaultInstance()))
.setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getTokenPreProgrammedDistributions"))
.build();
}
}
}
return getGetTokenPreProgrammedDistributionsMethod;
}

private static volatile io.grpc.MethodDescriptor<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse> getGetTokenTotalSupplyMethod;

Expand Down Expand Up @@ -1639,6 +1670,13 @@ public void getTokenStatuses(org.dash.platform.dapi.v0.PlatformOuterClass.GetTok
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTokenStatusesMethod(), responseObserver);
}

/**
*/
public void getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request,
io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTokenPreProgrammedDistributionsMethod(), responseObserver);
}

/**
*/
public void getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request,
Expand Down Expand Up @@ -1935,6 +1973,13 @@ public void getGroupActionSigners(org.dash.platform.dapi.v0.PlatformOuterClass.G
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse>(
this, METHODID_GET_TOKEN_STATUSES)))
.addMethod(
getGetTokenPreProgrammedDistributionsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse>(
this, METHODID_GET_TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS)))
.addMethod(
getGetTokenTotalSupplyMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
Expand Down Expand Up @@ -2299,6 +2344,14 @@ public void getTokenStatuses(org.dash.platform.dapi.v0.PlatformOuterClass.GetTok
getChannel().newCall(getGetTokenStatusesMethod(), getCallOptions()), request, responseObserver);
}

/**
*/
public void getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request,
io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetTokenPreProgrammedDistributionsMethod(), getCallOptions()), request, responseObserver);
}

/**
*/
public void getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request,
Expand Down Expand Up @@ -2628,6 +2681,13 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse get
getChannel(), getGetTokenStatusesMethod(), getCallOptions(), request);
}

/**
*/
public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetTokenPreProgrammedDistributionsMethod(), getCallOptions(), request);
}

/**
*/
public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request) {
Expand Down Expand Up @@ -2989,6 +3049,14 @@ public com.google.common.util.concurrent.ListenableFuture<org.dash.platform.dapi
getChannel().newCall(getGetTokenStatusesMethod(), getCallOptions()), request);
}

/**
*/
public com.google.common.util.concurrent.ListenableFuture<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse> getTokenPreProgrammedDistributions(
org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetTokenPreProgrammedDistributionsMethod(), getCallOptions()), request);
}

/**
*/
public com.google.common.util.concurrent.ListenableFuture<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse> getTokenTotalSupply(
Expand Down Expand Up @@ -3067,11 +3135,12 @@ public com.google.common.util.concurrent.ListenableFuture<org.dash.platform.dapi
private static final int METHODID_GET_IDENTITY_TOKEN_INFOS = 34;
private static final int METHODID_GET_IDENTITIES_TOKEN_INFOS = 35;
private static final int METHODID_GET_TOKEN_STATUSES = 36;
private static final int METHODID_GET_TOKEN_TOTAL_SUPPLY = 37;
private static final int METHODID_GET_GROUP_INFO = 38;
private static final int METHODID_GET_GROUP_INFOS = 39;
private static final int METHODID_GET_GROUP_ACTIONS = 40;
private static final int METHODID_GET_GROUP_ACTION_SIGNERS = 41;
private static final int METHODID_GET_TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS = 37;
private static final int METHODID_GET_TOKEN_TOTAL_SUPPLY = 38;
private static final int METHODID_GET_GROUP_INFO = 39;
private static final int METHODID_GET_GROUP_INFOS = 40;
private static final int METHODID_GET_GROUP_ACTIONS = 41;
private static final int METHODID_GET_GROUP_ACTION_SIGNERS = 42;

private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand Down Expand Up @@ -3238,6 +3307,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
serviceImpl.getTokenStatuses((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest) request,
(io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse>) responseObserver);
break;
case METHODID_GET_TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS:
serviceImpl.getTokenPreProgrammedDistributions((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest) request,
(io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse>) responseObserver);
break;
case METHODID_GET_TOKEN_TOTAL_SUPPLY:
serviceImpl.getTokenTotalSupply((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest) request,
(io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse>) responseObserver);
Expand Down Expand Up @@ -3356,6 +3429,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getGetIdentityTokenInfosMethod())
.addMethod(getGetIdentitiesTokenInfosMethod())
.addMethod(getGetTokenStatusesMethod())
.addMethod(getGetTokenPreProgrammedDistributionsMethod())
.addMethod(getGetTokenTotalSupplyMethod())
.addMethod(getGetGroupInfoMethod())
.addMethod(getGetGroupInfosMethod())
Expand Down
Loading

0 comments on commit d153226

Please sign in to comment.