diff --git a/CHANGELOG.md b/CHANGELOG.md index 606d4ee2..ebff5a00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/DOCKER/DockerfileTestnet b/DOCKER/DockerfileTestnet index 21d39c31..225add70 100644 --- a/DOCKER/DockerfileTestnet +++ b/DOCKER/DockerfileTestnet @@ -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"] diff --git a/DOCKER/DockerfileTestnetDebug b/DOCKER/DockerfileTestnetDebug index 18490825..979ead13 100644 --- a/DOCKER/DockerfileTestnetDebug +++ b/DOCKER/DockerfileTestnetDebug @@ -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 diff --git a/Phantasma.Node/src/ABCIConnector.cs b/Phantasma.Node/src/ABCIConnector.cs index c3784b3b..ee416def 100644 --- a/Phantasma.Node/src/ABCIConnector.cs +++ b/Phantasma.Node/src/ABCIConnector.cs @@ -293,27 +293,33 @@ public override Task 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