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

Fix's to the docker files and the ABCI. #276

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
# Phantasma Blockchain Changelog
All notable changes to this project will be documented in this file.

## Version 17 - 12 October, 2023
### Added

### Changed

### Fixed

## Version 16 - 12 October, 2023
### Added
- Added `docker-compose.yml` file to run the Phantasma Blockchain in a Docker container.
- Added `docker-entrypoint.sh` file to run the Phantasma Blockchain in a Docker container.
- Added `DockerfileTestnetDebug` file to help debug the Phantasma Blockchain in a Docker container.
- Added `DockerfileTestnetNodeBuilder` file to run the Phantasma Blockchain in a Docker container.
- Added `DockerfileNodeWin` file to build the Phantasma Blockchain.
- Added `wrapper-testnet-debug.sh` file to help debug the Phantasma Blockchain in a Docker container.
- Added a way to provide the `config.json` file as a parameter on startup.

### Changed
- Bumped version to 16.
- Upgrade to Simnet to increase the amount of SOUL and KCAL the user receives (Development only).
- Updated `Readme.md` file to include instructions on how to debug the Phantasma Blockchain.
- Updated `ABCIConnector.cs` file to check the CurrentBlock is null.

### Fixed
- Bug fixes to the ConsensusContract.
- Changed `Oracle.cs` to access directly the storage.
- Fixed `NexusValidator.cs` to get the validators from the storage.

## Version 15 - March 30, 2023
### Added

Expand Down
3 changes: 1 addition & 2 deletions DOCKER/DockerfileTestnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ COPY DOCKER/bin /app/bin

RUN apt-get update; apt-get install -y inotify-tools libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev libc6-dev libicu-dev libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev librocksdb-dev libc6-dev libsnappy-dev libicu-dev screen bash vim net-tools ca-certificates openssl libssl-dev libgdiplus libx11-dev nano

#EXPOSE 7077 7078 7079 7080 26056 26156 26256 26356 26057 26157 26257 26357
EXPOSE 7078 7079 7080 26156 26256 26356 26157 26257 26357
EXPOSE 7077 7078 7079 7080 26056 26156 26256 26356 26057 26157 26257 26357

RUN chmod +x /app/wrapper-testnet.sh
ENTRYPOINT ["/app/wrapper-testnet.sh"]
1 change: 0 additions & 1 deletion DOCKER/DockerfileTestnetDebug
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ COPY DOCKER/bin /app/bin

RUN apt-get update; apt-get install -y libc6-dev libsnappy-dev libicu-dev screen bash vim net-tools ca-certificates openssl libssl-dev librocksdb-dev nano

#EXPOSE 7077 7078 7079 7080 26056 26156 26256 26356 26057 26157 26257 26357
EXPOSE 7078 7079 7080 26156 26256 26356 26157 26257 26357

RUN chmod +x /app/wrapper-testnet-debug.sh
Expand Down
34 changes: 20 additions & 14 deletions Phantasma.Node/src/ABCIConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,27 +293,33 @@ public override Task<ResponseCommit> Commit(RequestCommit request, ServerCallCon
Log.Information($"ABCI Connector - Commit");

var chain = _nexus.RootChain as Chain;
var attempts = 2;

// Is signed by me and I am the proposer
if ( chain.CurrentBlock != null)
Log.Information("Block {Height} is signed by {Address}", chain.Height, chain.CurrentBlock.Validator);

if (chain.CurrentBlock.Validator == chain.ValidatorAddress)
{
Log.Information("Block {Height} Is Being Validated by me.");
chain.Commit();
}
else
if (chain.CurrentBlock != null)
{
var attempts = 2;
while (chain.CurrentBlock != null && attempts-- > 0)
Log.Information("Block {Height} is signed by {Address}", chain.Height, chain.CurrentBlock.Validator);
if (chain.CurrentBlock.Validator == chain.ValidatorAddress)
{
Log.Information("Block {Height} Is Being Validated by me.");
chain.Commit();
}
else
{
AttemptRequestBlock(chain);
while (chain.CurrentBlock != null && attempts-- > 0)
{
AttemptRequestBlock(chain);

Thread.Sleep(_delayRequests);
Thread.Sleep(_delayRequests);
}
//var data = chain.Commit();
}
//var data = chain.Commit();
}
else
{
Log.Error("Block {Height} Is Null.", chain.Height);
}

var response = new ResponseCommit();

//response.Data = ByteString.CopyFrom(data); // this would change the app hash, we don't want that
Expand Down
Loading