Giter VIP home page Giter VIP logo

concordium-net-sdk's People

Contributors

3schwartz avatar abizjak avatar bargsteen avatar limemloh avatar pavlop-tacans avatar rasmus-kirk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

concordium-net-sdk's Issues

Implement gRPC calls for managing the node.

Task description

Implement the missing gRPC calls for managing the node.

Sub-tasks

  • GetPeersInfo
  • GetBannedPeers
  • PeerConnect
  • PeerDisconnect
  • BanPeer
  • UnbanPeer
  • DumbStart
  • DumbStop
  • Shutdown

Implement account related gRPC queries

Task description

Implement the missing account related gRPC queries listed below:

Sub-tasks

  • GetAccountNonFinalizedTransactions
  • GetAccountTransactionSignHash

Implement missing block gRPC queries

Task description

Implement the missing block gRPC queries listed below:

Sub-tasks

  • GetBlocks
  • GetFinalizedBlocks
  • GetBranches
  • GetAncestors
  • GetBlockPendingUpdates
  • GetBlockItems (The return type is fairly big for this one)

Using schema to support smart contract JSON parameters

Task description

Add functionality for using the smart contract schema to convert bytes to and from JSON.
This is relevant for smart contract parameters, events and return types.

Sub-tasks

  • Extract schema bytes from a smart contract module source (embedding).
  • Functionality for turning bytes and the schema into JSON.
  • Functionality for turning JSON and the schema into bytes.

Support JSON (with schema) for constructing parameters

Task description

Support using a smart contract schema to construct smart contract parameters, for both init and update transactions.

Sub-tasks

  • Provide a method on the Parameter class to construct it from a schema and JSON.
  • Provide an example using the above method to mint some CIS-2 tokens, confirming the minting by checking the resulting events from the transaction.

Implement protocol related gRPC queries

Task description

Implement the missing protocol related gRPC queries listed below:

Sub-tasks

  • GetCryptographicParameters
  • GetElectionInfo
  • GetAnonymityRevokers

Support dotnet 6.0 default image

Description

The .NET SDK doesn’t work on docker image with Debian 11. The rust binaries for the .NET SDK are build on Ubuntu 22.04
https://github.com/Concordium/concordium-net-sdk/actions/runs/7209178248/job/19639595963

This compilation adds a dependency to libc which is higher than 2.31. 2.31 is the highest supported version of libc in Debian 11.

When looking at shared object dependencies of the file librust_bindings.so inside an image using Debian 11 we have

./librust_bindings.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./librust_bindings.so)
./librust_bindings.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./librust_bindings.so)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00000040028f2000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000000400290c000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000004002a50000)
	/lib64/ld-linux-x86-64.so.2 (0x0000004000000000)

Changing to an image using either Debian 12 or Ubuntu 22.02, then shared object dependencies reports no errors

	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000004002901000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000004002921000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000004002a08000)
	/lib64/ld-linux-x86-64.so.2 (0x0000004000000000)

After discussion with @limemloh it may be possible to have compilation with static linking using musl instead of dynamic linking using glibc.
Best long term solution would be to compile for different runtimes and OS like in this example https://nuget.info/packages/librdkafka.redist/2.3.0.

Pros and cons and best solutions however needs to be investigated.

Workaround is to bump to image using either Ubuntu 22.04 or Debian 12 (hence use either 6.0-bookworm-slim which uses Debian 12 or 6.0-jammy which uses Ubuntu 22.04 https://github.com/dotnet/dotnet-docker/blob/main/README.runtime.md#full-tag-listing)

Steps to Reproduce

Build a docker image which uses Debian 11 and trigger interop calls to rust binaries. One can do this by using image mcr.microsoft.com/dotnet/sdk:6.0 and then run the .NET SDK test suite inside the image.

The docker build fails due to test failing. Error message

System.DllNotFoundException: Unable to load shared library 'rust_bindings' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: librust_bindings: cannot open shared object file: No such file or directory

which is the same error message observed in environment which used the image and .NET SDK.

Expected Result
The .NET SDK works with default image mcr.microsoft.com/dotnet/sdk:6.0.

Actual Result
Fails due to missing shared object dependency linking.

Versions

  • Software Version: .NET SDK 4.2.1
  • OS: Debian 11

Implement baker related gRPC queries

Task description

Implement the missing baker related gRPC queries listed below:

Sub-tasks

  • GetBakerList
  • GetPassiveDelegationInfo
  • GetPoolDelegators
  • GetPoolDelegatorsRewardPeriod
  • GetPassiveDelegators
  • GetPassiveDelegatorsRewardPeriod

Implement smart contract gRPC queries

Task description

Implement the smart contract gRPC queries listed below. This list excludes the queries related to smart contract state, which is tracked in #67.

Queries

  • GetModuleList
  • GetInstanceList
  • GetModuleSource
  • GetInstanceInfo

Generate .NET SDK for GRPC API V2

Description

The current .NET SDK is unmaintained and leverages the older GRPC API V1 served by Concordium nodes. The SDK should be rewritten to use the newer node GRPC API V2.

Changes

  • Generate GRPC client for the GRPC V2 API.
  • Expose RPC calls.
  • Write helpers for:
    • Account transfer without memo.
    • Account transfer with memo.
    • Register data.
  • Write tests for helpers.
  • Import genesis and browser wallets.
  • Add examples.
  • Write docs for methods.
  • Add documentation and examples to README.
  • Add CI jobs.
  • Generate documentation.

Implement smart contract transactions.

Task description

Add support for deploy module, initialize contract and update contract transactions. This does not include functionality for parameter serialization and deserialization with schemas, but rather just uses binary representations.

Implement

  • Deploy module.
  • Initialize contract. #89
  • Update contract. #91

Support arm64 apple target in published package

Description

The currently published nuget package supports linux x86-64, windows and mac x86-64. In particular on mac the users of the published package must use the dotnet runtime for the Intel (x86-64), otherwise they get an error about missing shared libraries.

Since apple's devices now exclusively use arm chips in new models we should also support that platform in the package.

The current workaround is for users to build their own package on the arm platform.

Versions

  • Software Version: 4.2.0, 4.2.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.