Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROWHEAD-6.3.1-rc -> master merge #2568

Merged
merged 25 commits into from
Jul 10, 2024
Merged

Conversation

Vovchyk
Copy link
Contributor

@Vovchyk Vovchyk commented Jul 10, 2024

Description

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • Requires Activation Code (Hard Fork)
  • Other information:

fed:arrowhead631-master-merge

Vovchyk and others added 25 commits July 3, 2024 18:01
Add unit test for before and after rskip434

Add fix for receiveHeaders too

Replace too much work check with height check

Add tests for receiveHeaders and refactor

Correct test name
Refactor and use value from bridge constants
Refactor

Put verification inside try to avoid npe
…_config

Add arrowhead631 config. Adapt tests
chore(logging): refactor and improve logging
@Vovchyk Vovchyk requested a review from a team as a code owner July 10, 2024 13:32
block849137 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849137Header));

String blockWithTooMuchWorkHeader = "006001207ca158816ffc9d45b9ecd6a49ffbf3038f3646cf13fc01000000000000000000e0182ce7cc10db785b5fb2fb4314053f5b12cd6116168797cb461aa339fc725078b87766255d0317ba5261e2";
blockWithTooMuchWork = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(blockWithTooMuchWorkHeader));

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
BtcBlock.BtcBlock
should be avoided because it has been deprecated.
btcBlockStoreFactory.newInstance(repository, bridgeMainnetConstants, bridgeStorageProviderPostRSKIP434, activationsPostRSKIP434);

String block849134Header = "0080b92c24f123130ae29e899f0cab72653722e54cdf3b30445202000000000000000000c72ead65a3b78ab637d1876c00414a77e47bcc5b52667ac1e573633563bea5a695aa7766255d031728d182a8";
block849134 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849134Header));

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
BtcBlock.BtcBlock
should be avoided because it has been deprecated.
block849134 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849134Header));

String block849135Header = "00004020bf67910b5d3996ee594848b482ee84d0e28c97a9a2d601000000000000000000865e218552bb92df36c962f5163e84a6c2542584fb36be2fa8b2a4246c73a701f1ae7766255d031791836b22";
block849135 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849135Header));

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
BtcBlock.BtcBlock
should be avoided because it has been deprecated.
block849135 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849135Header));

String block849136Header = "0000003a796f8b7a9d6ba6e13064e7c64e94570f877170262f1f0200000000000000000036b2ab17565a24a9be4626ca801cb31f91232034ba848295475f931a58dd5446e5b07766255d03173b01a491";
block849136 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849136Header));

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
BtcBlock.BtcBlock
should be avoided because it has been deprecated.
block849136 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849136Header));

String block849137Header = "00e00820925b77c9ff4d0036aa29f3238cde12e9af9d55c34ed30200000000000000000032a9fa3e12ef87a2327b55db6a16a1227bb381db8b269d90aa3a6e38cf39665f91b47766255d0317c1b1575f";
block849137 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849137Header));

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
BtcBlock.BtcBlock
should be avoided because it has been deprecated.
blockWithTooMuchWork = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(blockWithTooMuchWorkHeader));

String block849139Header = "00a0b625ffa2f7cbf95219fc74c3db38f84ae265784bc1417c71020000000000000000008e5b319a229376089f4a7b77c90ed90ac19a0532fc4c62426f5a5931ee7e3e8dd2c67766255d03171e91a015";
block849139 = new BtcBlock(bridgeMainnetConstants.getBtcParams(), HexUtils.stringHexToByteArray(block849139Header));

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
BtcBlock.BtcBlock
should be avoided because it has been deprecated.
@@ -938,10 +938,29 @@
BridgeSupport bridgeSupport = getBridgeSupport(provider, track, mockFactory, activations);
BtcBlockChain btcBlockChain = new SimpleBlockChain(btcContext, btcBlockStore);
TestUtils.setInternalState(bridgeSupport, "btcBlockChain", btcBlockChain);

Sha256Hash merkleRoot = PegTestUtils.createHash(2);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
PegTestUtils.createHash
should be avoided because it has been deprecated.
co.rsk.bitcoinj.core.BtcBlock prevBlock = new co.rsk.bitcoinj.core.BtcBlock(
btcParams,
1,
PegTestUtils.createHash(1), // hash from its previous block

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
PegTestUtils.createHash
should be avoided because it has been deprecated.

import static org.junit.jupiter.api.Assertions.*;

class BytesSliceTest {

Check notice

Code scanning / CodeQL

Unused classes and interfaces Note test

Unused class: BytesSliceTest is not referenced within this codebase. If not used as an external API it should be removed.

import static org.junit.jupiter.api.Assertions.*;

class BytesTest {

Check notice

Code scanning / CodeQL

Unused classes and interfaces Note test

Unused class: BytesTest is not referenced within this codebase. If not used as an external API it should be removed.
Copy link

sonarcloud bot commented Jul 10, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 55%)
2 New Blocker Issues (required ≤ 0)
1 New Critical Issues (required ≤ 0)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link
Contributor

@fmacleal fmacleal left a comment

Choose a reason for hiding this comment

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

LGTM

@marcos-iov
Copy link
Contributor

pipeline:run

@aeidelman aeidelman added this to the Arrowhead 6.3.1 milestone Jul 10, 2024
@josedahlquist josedahlquist merged commit 5696a03 into master Jul 10, 2024
9 of 10 checks passed
@marcos-iov marcos-iov deleted the arrowhead631-master-merge branch July 10, 2024 20:12
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.

7 participants