Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
12cc268
build(dashmate): update tenderdash to 0.12-dev.2
lklimek Apr 19, 2023
04d770d
build(rs-drive-abci): use same dashcore version as dashcore-rpc
lklimek Apr 20, 2023
567521b
feat(dashmate): enable sccache for rs-drive-abci
lklimek Apr 20, 2023
8439e13
build: fix yarn deps
lklimek Apr 20, 2023
226dc13
chore: integrate most recent changes from dashcore-rpc
lklimek Apr 20, 2023
b50c033
build(rs-drive-abci): fix sccache memcache in docker
lklimek Apr 21, 2023
e121d09
fix(rs-drive-abci): workaround: pubkey not hex-decoded
lklimek Apr 21, 2023
cfb5c2a
Merge remote-tracking branch 'origin/v0.25-dev' into fix/rs-drive-abci
lklimek Apr 21, 2023
a3c676b
chore: hex decode of pubkey not needed anymore
lklimek Apr 21, 2023
7a2fffa
Merge remote-tracking branch 'origin/v0.25-dev' into fix/rs-drive-abci
lklimek Apr 21, 2023
b320e41
build: updated yarn deps
lklimek Apr 21, 2023
c781ca2
build(rs-drive-abci): docker runs very verbosely (-vvvv)
lklimek Apr 21, 2023
1dfb4f6
Merge remote-tracking branch 'origin/v0.25-dev' into fix/rs-drive-abci
lklimek Apr 24, 2023
7522efc
build: cargo update
lklimek Apr 24, 2023
98dac52
fix(dashmate): add missing genesis fields to base conf
lklimek Apr 24, 2023
25cc27b
fix(rs-drive-abci): invalid v20 fork name
lklimek Apr 24, 2023
41df075
fix(dashmate): use fallbackfee=0.00001 for core
lklimek Apr 24, 2023
25fa358
fix(rs-drive-abci): minimum core height is 1, not 0
lklimek Apr 24, 2023
bd7607f
feat(rs-drive-abci): enable logging of dashcore-rpc issues
lklimek Apr 24, 2023
cd80522
chore: rustfmt
lklimek Apr 24, 2023
c8ce5ce
fix(rs-drive-abci): pub_key_operator is not hex-decoded
lklimek Apr 25, 2023
1fb71b4
fix(rs-drive-abci): init_chain not returning validator set
lklimek Apr 25, 2023
622e77a
fix(rs-drive-abci): quorum hash and protxhash must be reversed when s…
lklimek Apr 25, 2023
e897396
Merge remote-tracking branch 'origin/v0.25-dev' into fix/rs-drive-abci
lklimek Apr 25, 2023
b4df9c0
Merge remote-tracking branch 'origin/v0.25-dev' into fix/rs-drive-abci
lklimek Apr 25, 2023
54d7708
feat(dashmate): wait for v20 fork to activate
lklimek Apr 25, 2023
ffedd8c
build: use dash core 20.0.0-alpha.assetlocks.3
lklimek Apr 25, 2023
e5e5203
chore(dashmate): fix linter issue
lklimek Apr 26, 2023
27c62ad
Merge remote-tracking branch 'origin/v0.25-dev' into fix/rs-drive-abci
lklimek Apr 26, 2023
37d6a4d
chore(rs-drive-abci): remove unneeded clone
lklimek Apr 27, 2023
0f6a454
revert(rs-drive-abci): restore From<&Quorum> for ValidatorSetUpdate
lklimek Apr 27, 2023
66ab73d
chore(rs-drive-abci): fix cloning
lklimek Apr 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
55 changes: 36 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@
"engine.io": "^6.2.1",
"ua-parser-js": "^1.0.33",
"dns-packet": "^5.4.0"
},
"dependencies": {
"es-abstract": "^1.21.2",
"foreach": "^2.0.6"
}
}
7 changes: 5 additions & 2 deletions packages/dashmate/configs/system/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
},
core: {
docker: {
image: 'dashpay/dashd:20.0.0-alpha.assetlocks.2',
image: 'dashpay/dashd:20.0.0-alpha.assetlocks.3',
},
p2p: {
port: 9999,
Expand Down Expand Up @@ -143,7 +143,7 @@ module.exports = {
},
tenderdash: {
docker: {
image: 'dashpay/tenderdash:0.11.0-dev.4',
image: 'dashpay/tenderdash:0.12.0-dev.2',
},
p2p: {
port: 26656,
Expand All @@ -166,6 +166,9 @@ module.exports = {
key: null,
},
genesis: {
genesis_time: '2021-07-22T12:57:05.429Z',
chain_id: 'devnet', // TODO: Synchronize with RS-Drive-ABCI
validator_quorum_type: 4, // TODO: Synchronize with RS-Drive-ABCI
consensus_params: {
block: {
max_bytes: '22020096',
Expand Down
5 changes: 5 additions & 0 deletions packages/dashmate/docker-compose.platform.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ services:
build:
context: ${PLATFORM_SOURCE_PATH:?err}
dockerfile: ${PLATFORM_SOURCE_PATH:?err}/packages/rs-drive-abci/Dockerfile
args:
SCCACHE_MEMCACHED: ${SCCACHE_MEMCACHED}
SCCACHE_GHA_ENABLED: ${SCCACHE_GHA_ENABLED}
ACTIONS_CACHE_URL: ${ACTIONS_CACHE_URL}
ACTIONS_RUNTIME_TOKEN: ${ACTIONS_RUNTIME_TOKEN}
image: drive:local
stop_grace_period: 30s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,46 @@ function configureCoreTaskFactory(
task.output = `Initial chain locked core height is set to: ${ctx.initialCoreChainLockedHeight}`;
},
},
{
title: 'Activating V20 fork',
task: () => new Observable(async (observer) => {
let isV20Activated = false;
let blockchainInfo;

let blocksGenerated = 0;

const blocksToGenerateInOneStep = 10;

do {
({
result: blockchainInfo,
} = await ctx.seedCoreService.getRpcClient().getBlockchainInfo());

isV20Activated = blockchainInfo.bip9_softforks.v20.status === 'active';
if (isV20Activated) {
break;
}

await generateBlocks(
ctx.seedCoreService,
blocksToGenerateInOneStep,
NETWORK_LOCAL,
// eslint-disable-next-line no-loop-func
(blocks) => {
blocksGenerated += blocks;

observer.next(`${blocksGenerated} blocks generated`);
},
);
} while (!isV20Activated);

observer.next(`V20 fork has been activated at height ${blockchainInfo.bip9_softforks.v20.since}`);

observer.complete();

return this;
}),
},
{
title: 'Stopping nodes',
task: async () => (Promise.all(
Expand Down
1 change: 1 addition & 0 deletions packages/dashmate/templates/core/dash.conf.dot
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ maxconnections=256
printtoconsole=1
debug={{=it.core.debug }}
logips={{=it.core.logIps }}
fallbackfee=0.00001

# JSONRPC
server=1
Expand Down
8 changes: 1 addition & 7 deletions packages/rs-drive-abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ bs58 = "0.4.0"
hex = "0.4.3"
indexmap = "1.9.3"
sha2 = "0.10.6"
dashcore = { git = "https://github.com/dashpay/rust-dashcore", features = [
"std",
"secp-recovery",
"rand",
"signer",
"use-serde",
], default-features = false, branch = "feat/addons" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore-rpc", branch = "master" }
dpp = { path = "../rs-dpp", features = ["fixtures-and-mocks"] }
rust_decimal = "1.2.5"
Expand All @@ -55,6 +48,7 @@ tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", optio
anyhow = { version = "1.0.70" }
lazy_static = "1.4.0"
itertools = { version = "0.10.5" }
tracing-log = { version = "0.1.3", features = ["log-tracer"] }

[dev-dependencies]

Expand Down
20 changes: 13 additions & 7 deletions packages/rs-drive-abci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ RUN curl -Ls \
/opt/emsdk/emsdk install latest && \
/opt/emsdk/emsdk activate latest


# Switch to clang
RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc

#
# EXECUTE BUILD
#
FROM deps as build

WORKDIR /usr/src/dash-platform

COPY . .

#
# Configure sccache
#
Expand All @@ -90,6 +90,8 @@ ENV RUSTC_WRAPPER=/usr/bin/sccache
ARG SCCACHE_GHA_ENABLED
ARG ACTIONS_CACHE_URL
ARG ACTIONS_RUNTIME_TOKEN
# Alternative solution is to use memcache
ARG SCCACHE_MEMCACHED

# Disable incremental buildings, not supported by sccache
ENV CARGO_INCREMENTAL=false
Expand All @@ -109,14 +111,17 @@ ARG CARGO_BUILD_PROFILE=dev
# SCCACHE_SERVER_PORT port to avoid conflicts in case of parallel compilation
# 5. We also set RUSTC to include exact toolchain name in compilation command, and
# include this in cache key
# 6. We build `dashcore-rpc` first, as arm64 builder on github hangs if we don't do this.
RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc

WORKDIR /usr/src/dash-platform

COPY . .

RUN --mount=type=cache,sharing=shared,target=/root/.cache/sccache \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,target=${CARGO_HOME}/git/db \
export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \
if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \
cargo build \
--package dashcore-rpc \
--config net.git-fetch-with-cli=true && \
Expand Down Expand Up @@ -245,8 +250,9 @@ RUN addgroup -g $USER_GID $USERNAME && \

USER $USERNAME

ENV RUST_BACKTRACE=1
WORKDIR /var/lib/dash/rs-drive-abci
ENTRYPOINT ["/usr/bin/drive-abci"]
CMD ["-vv", "start"]
CMD ["-vvvv", "start"]

EXPOSE 26658
4 changes: 2 additions & 2 deletions packages/rs-drive-abci/src/abci/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ where
// use crate::config::PlatformConfig;
// use crate::rpc::core::MockCoreRPCLike;
// use chrono::{Duration, Utc};
// use dashcore::hashes::hex::FromHex;
// use dashcore::BlockHash;
// use dashcore_rpc::dashcore::hashes::hex::FromHex;
// use dashcore_rpc::dashcore::BlockHash;
// use dpp::contracts::withdrawals_contract;
//
// use dpp::identity::core_script::CoreScript;
Expand Down
Loading