Skip to content

Commit

Permalink
*: use official neo-go release with --relative-path support (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje authored Nov 28, 2023
1 parent 7544bc2 commit 1c68b6f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/validate-pr-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ jobs:
- if: matrix.os != 'windows-latest'
name: build patched neo-go for Unix
run: |
git clone https://github.com/ixje/neo-go.git
git clone https://github.com/nspcc-dev/neo-go.git
cd neo-go
git checkout 61d9eda9932519d7f6c4c61daaecfd675df4a72a
git checkout tags/v0.104.0
make
mv bin/neo-go ../boatest/boaconstructor/data/neogo
- if: matrix.os == 'windows-latest'
name: build patched neo-go for Windows
run: |
git clone https://github.com/ixje/neo-go.git
git clone https://github.com/nspcc-dev/neo-go.git
cd neo-go
git checkout 61d9eda9932519d7f6c4c61daaecfd675df4a72a
git checkout tags/v0.104.0
make
mv bin/neo-go.exe ../boatest/boaconstructor/data/neogo.exe
- name: prep for persist
Expand Down
12 changes: 0 additions & 12 deletions boaconstructor/data/protocol.unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ ProtocolConfiguration:
ValidatorsCount: 1
VerifyTransactions: true
P2PSigExtensions: true
NativeActivations:
ContractManagement: [0]
StdLib: [0]
CryptoLib: [0]
LedgerContract: [0]
NeoToken: [0]
GasToken: [0]
PolicyContract: [0]
RoleManagement: [0]
OracleContract: [0]
Notary: [0]
Hardforks:
Aspidochelone: 25

Expand Down Expand Up @@ -49,7 +38,6 @@ ApplicationConfiguration:
UnlockWallet:
Path: "wallet1_solo.json"
Password: "one"
Relative: true
P2PNotary:
Enabled: false
UnlockWallet:
Expand Down
2 changes: 1 addition & 1 deletion boaconstructor/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def start(self):
prog += ".exe"
posix = False

cmd = f"{self.data_dir}/{prog} node --config-file {self.config_path} --relative-path {self.consensus_wallet_path}"
cmd = f"{self.data_dir}/{prog} node --config-file {self.config_path} --relative-path {self.data_dir}"

self._process = subprocess.Popen(
shlex.split(cmd, posix=posix),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build-backend = "setuptools.build_meta"
target-version = ['py310']

[tool.neogo]
tag = "v0.102.0"
tag = "v0.104.0"

[tool.mypy]
check_untyped_defs = true
Expand Down
7 changes: 2 additions & 5 deletions scripts/download-node.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os
import stat
import pathlib
from importlib import machinery
from tomlkit import parse

logging.getLogger("requests").setLevel(logging.WARNING)
Expand Down Expand Up @@ -52,11 +51,9 @@ def main():
f"Found release! Downloading {asset['browser_download_url']}...",
end="",
)

module_path = (
machinery.PathFinder().find_spec("boaconstructor").origin
data_dir = pathlib.Path(__file__).parent.parent.joinpath(
"boaconstructor/data"
)
data_dir = pathlib.Path(module_path).parent.joinpath("data")
binary_filename = f"{data_dir}/neogo"
if system == "windows":
binary_filename += ".exe"
Expand Down
2 changes: 1 addition & 1 deletion scripts/fix-wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This script is a helper script to correctly rename wheels.
While the boaconstructor package is all in Python, it relies on a platform specific executable (neo-go) in the background.
The CI setup will build the platform specific neo-go executable and place it in the correct directory where it will be
The CI setup will fetch the platform specific neo-go executable and place it in the correct directory where it will be
picked up when packaging. `python -m build` creates a universal wheel and that needs to be fixed to include the correct
platform tag before uploading to PyPi. This cannot be done by simply renaming the file, it also does internal changes in
the wheel hence this script.
Expand Down

0 comments on commit 1c68b6f

Please sign in to comment.