Skip to content

Commit

Permalink
Updates/merge cuttlefish (#1007)
Browse files Browse the repository at this point in the history
## Summary

A PR to update the engine in the node to align with Cuttlefish.

This PR just gets the bottlenose node compiling/syncing with the
Cuttlefish engine code. It does not yet implement any explicit
cuttlefish functionality in the node, and there are a number of todo!s
left in which will be fixed in later work.

## Testing

The testing strategy is that:
* Existing tests pass
* Can sync a stokenet node with a fresh ledger

(Need to check that our backwards compatibility test suite works 👍)
  • Loading branch information
dhedey authored Oct 18, 2024
2 parents 93bc7ea + df35de0 commit e6a55bc
Show file tree
Hide file tree
Showing 190 changed files with 2,618 additions and 3,711 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ RUN apt-get update \
# We fix the version of Rust here to ensure that we can update it without having
# issues with the caching layers containing outdated versions which aren't compatible.
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh \
&& sh rustup.sh -y --target 1.71.1-aarch64-unknown-linux-gnu 1.71.1-x86_64-unknown-linux-gnu --default-toolchain 1.77.2
&& sh rustup.sh -y --target 1.81.0-aarch64-unknown-linux-gnu 1.81.0-x86_64-unknown-linux-gnu --default-toolchain 1.81.0

RUN "$HOME/.cargo/bin/cargo" install sccache --version 0.7.4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void registerCodec(CodecMap codecMap) {
codecs -> EnumCodec.fromPermittedRecordSubclasses(MempoolError.class, codecs));
}

record PriorityThresholdNotMet(Option<UInt32> minTipPercentageRequired, UInt32 tipPercentage)
record PriorityThresholdNotMet(Option<UInt32> minTipBasisPointsRequired, UInt32 tipBasisPoints)
implements MempoolError {}

record Duplicate(HashCode notarizedTransactionHash) implements MempoolError {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public void addTransaction(RawNotarizedTransaction transaction) throws MempoolRe
case MempoolError.PriorityThresholdNotMet
e -> throw new MempoolPriorityThresholdNotMetException(
String.format(
"Mempool is full and transaction's priority threshold not met, min tip percentage"
"Mempool is full and transaction's priority threshold not met, min tip basis points"
+ " required: %s",
e.minTipPercentageRequired()));
e.minTipBasisPointsRequired()));
case MempoolError.Duplicate e -> throw new MempoolDuplicateException(
String.format(
"Mempool already has transaction with notarized hash %s",
Expand Down
Loading

0 comments on commit e6a55bc

Please sign in to comment.