Skip to content

fix(rs-drive-abci): start rs-drive-abci using dashmate and pass init_chain - #941

Merged
QuantumExplorer merged 32 commits into
v0.25-devfrom
fix/rs-drive-abci
Apr 27, 2023
Merged

fix(rs-drive-abci): start rs-drive-abci using dashmate and pass init_chain#941
QuantumExplorer merged 32 commits into
v0.25-devfrom
fix/rs-drive-abci

Conversation

@lklimek

@lklimek lklimek commented Apr 20, 2023

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

init_chain abci call fails due to:

  • invalid handling of public keys
  • invalid handling of quorum types

What was done?

Main solution:

  1. Workaround: hex-decode public key when needed
  2. Updated javascript dependencies
  3. Updated Tenderdash to 0.12.0-dev.2
  4. Adjusted dashmate to use SCCACHE
  5. Use dashcore-rpc from feat/fixesFor25 and use dashcore version exported by dashcore-rpc

How Has This Been Tested?

using dashmate

#! /bin/bash -x

# yarn reset --hard

docker rm -f `docker ps -qa`
docker volume rm -f `docker volume list -q`
docker network prune -f

rm -rf /home/ubuntu/.dashmate

set -e

scripts/configure_dashmate.sh

yarn setup
yarn start

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek
lklimek force-pushed the fix/rs-drive-abci branch 3 times, most recently from 5674bcc to 2060b3a Compare April 20, 2023 08:44
Base automatically changed from feat/abci_validation to v0.25-dev April 20, 2023 10:58
@lklimek
lklimek force-pushed the fix/rs-drive-abci branch from 2060b3a to 7469498 Compare April 20, 2023 11:02
@lklimek
lklimek force-pushed the fix/rs-drive-abci branch from f3e3b94 to 567521b Compare April 20, 2023 13:32
@lklimek lklimek changed the title fix(rs-drive-abci): make rs-drive-abci work in dashmate local network fix(rs-drive-abci): unrecognized quorum type in get_quorum_listextended Apr 20, 2023
@lklimek
lklimek marked this pull request as ready for review April 20, 2023 16:49
@lklimek lklimek changed the title fix(rs-drive-abci): unrecognized quorum type in get_quorum_listextended fix(rs-drive-abci): init_chain fails Apr 21, 2023
@lklimek lklimek changed the title fix(rs-drive-abci): init_chain fails fix(rs-drive-abci): init_chain fails due to quorum type and pubkey issues Apr 21, 2023
@lklimek
lklimek requested a review from QuantumExplorer April 21, 2023 14:23
@lklimek lklimek changed the title fix(rs-drive-abci): init_chain fails due to quorum type and pubkey issues fix(rs-drive-abci): init_chain fails Apr 24, 2023
@lklimek lklimek changed the title fix(rs-drive-abci): init_chain fails fix(rs-drive-abci): start rs-drive-abci using dashmate Apr 24, 2023
@lklimek lklimek changed the title fix(rs-drive-abci): start rs-drive-abci using dashmate fix(rs-drive-abci): start rs-drive-abci using dashmate and pass init_chain Apr 25, 2023
Comment thread packages/rs-drive-abci/src/execution/helpers.rs
Comment thread packages/rs-drive-abci/src/execution/initialization.rs Outdated
Comment thread packages/rs-drive-abci/src/execution/initialization.rs Outdated
Comment thread packages/rs-drive-abci/src/execution/initialization.rs
};

Ok(core_height)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand the point here. Let's imagine we send core a height 0 -> it won't work. Let's imagine we send a height it doesn't know about -> non deterministic. I think we would never want the requested height.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imagine we are at genesis. We publish tenderdash's genesis.json. We put core chain lock height there. MNOs download that genesis.json and accept it. So we should use that core chain lock height here, as this is the intention of the user (MNO).

We determine core chain locked height ourselves (from fork info) only if user didn't explicitly provide it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add verification of provided core chain lock in #981

Comment thread packages/rs-drive-abci/src/execution/masternode_identities/mod.rs
Comment thread packages/rs-drive-abci/src/execution/quorum.rs Outdated
requested: u32,
fork_info: &Bip9SoftforkInfo,
) -> Result<u32, Error> {
let core_height = if requested != 0 {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let core_height = if requested != 0 {
let core_height = if requested != None {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add check if requested is ok in core (TODO for now)

Comment thread packages/rs-drive-abci/src/execution/quorum.rs Outdated
Comment thread packages/rs-drive-abci/src/execution/initialization.rs Outdated
};

Ok(core_height)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add verification of provided core chain lock in #981

@QuantumExplorer
QuantumExplorer merged commit fb04b56 into v0.25-dev Apr 27, 2023
@QuantumExplorer
QuantumExplorer deleted the fix/rs-drive-abci branch April 27, 2023 09:39
@thephez thephez added this to the v0.25.0 milestone Oct 11, 2023
QuantumExplorer added a commit that referenced this pull request Aug 11, 2026
…y-wallet

rust-dashcore#952 (merged as 9c0e8742) gave the #926 policy a canonical
home: AccountType::is_contact_owned(), with an exhaustive match so any
future account type must declare whether its coins are the wallet's or
a contact's. Bump the workspace pin to the dev tip (37b1a361, which
also brings dash-spv sync-reliability fixes #941/#943/#949/#953) and
make is_contact_watch_only delegate to the upstream predicate instead
of matching DashpayExternalAccount locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants