diem/diem

Diem core repo for Rust

Diem is a user focused blockchain application, that has increased in popularity significantly in the crypto / blockchain space

Note to readers: On December 1, 2020, the Libra Association was renamed to Diem Association. The project repos are in the process of being migrated. All projects will remain available for use here until the migration to a new GitHub Organization is complete.


Diem Core implements a decentralized, programmable database which provides a financial infrastructure that can empower billions of people.

Note to Developers

  • Diem Core is a prototype.
  • The APIs are constantly evolving and designed to demonstrate types of functionality. Expect substantial changes before the release.
  • We’ve launched a testnet that is a live demonstration of an early prototype of the Diem Blockchain software.

Contributing

To begin contributing, sign the CLA. You can learn more about contributing to the Diem project by reading our Contribution Guide and by viewing our Code of Conduct.

Getting Started

Learn About Diem

  • Welcome
  • Diem Protocol: Key Concepts
  • Life of a Transaction
  • JSON-RPC SPEC

Try Diem Core

  • My First Transaction
  • Getting Started With Move

Technical Papers

  • The Diem Blockchain
  • Move: A Language With Programmable Resources
  • State Machine Replication in the Diem Blockchain

Blog

  • Diem: The Path Forward

Community

  • Join us on the Diem Discourse.
  • Ask a question on Stack Overflow.
  • Get the latest updates to our project by signing up for our newsletter.

License

Diem Core is licensed as Apache 2.0.

Issues

Collection of the latest Issues

tanshuai

tanshuai

bug
Comment Icon0

🐛 Bug

diem% transfer 0 1 10 XUS

Transferring [ERROR] Failed to perform transaction: Error { inner: Inner { kind: JsonRpcError, source: None, json_rpc_error: Some(JsonRpcError { code: -32001, message: "Server error: VM Validation error: BAD_CHAIN_ID", data: Some(StatusCode(BAD_CHAIN_ID)) }) } }

To reproduce

Stack trace/error message

Expected Behavior

Transfer XUS to another account.

Additional context

Follow the doc https://developers.diem.com/docs/tutorials/tutorial-my-first-transaction/

ShuaoZhang

ShuaoZhang

bug
Comment Icon1

🐛 Bug

Wrong command to install Move CLI here in the documentation.

Steps to reproduce

The book suggest to run $ cargo install --git https://github.com/diem/diem move-cli to install move client.

output

Expected Behavior

I'm not sure.

System information

MacOS Monterey Version 12.3.1

fCorleone

fCorleone

bug
Comment Icon0

🐛 Bug

I start a swarm with 10 nodes and I set 3 of the nodes as malicious ones. The malicious node can modify the values of some fields of sending packets to make a chaos in the system. However, I found that all the nodes stop producing new blocks after reaching to the height of 358. And the mint command reports some errors. I think some transactions cannot be processed correctly. I attached the log files too.

To reproduce

  1. Start a new swarm with 10 nodes by using diem-swarm tool.

  2. Start to mint by

  3. The bug occurs

Stack trace/error message

And after a period, it shows:

Expected Behavior

I think all the transactions should be processed correctly under this situation.

System information

Please complete the following information:

  • Diem: branch testnet
  • Rust version: cargo 1.61.0-nightly
  • Ubuntu 20.04

Additional context

Screenshot from 2022-04-05 19-36-16 Screenshot from 2022-04-05 19-34-21

Log Files

0.zip 1.zip 2.zip 3.zip 4.zip 5.zip 6.zip 7.zip 8.zip 9.zip

PinkDiamond1

PinkDiamond1

bug
Comment Icon3

🐛 Bug

Steps to reproduce

** Error message or problem **

// ws://xdai.poanetwork.dev:8546
``

Expected Behavior

<!-- A clear and concise description of what you expected to happen. -->

System information

Please complete the following information:

  • <!-- Browser type and version -->

Additional context

<!-- Add any other context about the problem here. -->

gelash

gelash

enhancement
Comment Icon0

Integration tests:

  • cover cases when write set (both paths and values) changes based on the reads.
  • cover stop versions, i.e. when only a prefix of transactions in the block should be executed.
  • enable as a test (not as a benchmark, as is currently)

Unit tests:

  • MVHashMap proptest should consider deletions, different incarnations.
  • Scheduler unit test should consider stop version
gelash

gelash

enhancement
Comment Icon0

Currently parallel execution abandons a speculative VM execution of a transaction immediately when it encounters a dependency (i.e. an entry marked as Estimate in the shared MVMemory data-structure). This is an optimization that avoids aborts, as the transaction is then re-executed after the dependency is resolved. However, the re-execution starts from scratch, when in theory, it could have continued exactly from the prior state when the dependency was observed.

Way to solve this could involve some continuations / async programming and managing suspended execution tasks alongside dependencies in executor/scheduler. Exact performance gains need to be investigated, but it's promising.

gelash

gelash

enhancement
Comment Icon0

🚀 Feature Request

MvHashMapView is used by only a single thread during parallel execution to interface with the multi-version data-structure and capture the read set and dependencies. It currently has to be Sync due to some StateSync/VersionedView trait bounds.

Then read_dependency member can be RefCell and captured reads can also be a RefCell instead of a mutex.

Motivation

Is your feature request related to a problem? Please describe.

Pitch

Describe the solution you'd like

Describe alternatives you've considered

Are you willing to open a pull request? (See CONTRIBUTING)

Additional context

Information - Updated Jun 21, 2022

Stars: 16.4K
Forks: 2.6K
Issues: 370

Repositories & Extras

Solana blockchain repo and docs

Please make sure you are always using the latest stable rust version as this is a crypto library and require safe code

Solana blockchain repo and docs

Blockchain Commons torgap-sig

torgap-sig is a fork of spdx:BSD-2-Clause Plus Patent License

Blockchain Commons torgap-sig

Blockchain Commons torgap-sig-cli-rust

torgap-sig-cli-rust is a fork of Minisign, with support for

Blockchain Commons torgap-sig-cli-rust

Phala Blockchain

pRuntime (Phala Network Secure Enclave Runtime) is a runtime to execute confidential smart contracts, based on confidential computing

Phala Blockchain

A Blockchain implementation in Rust

MIT (c) Doublify Technologies

A Blockchain implementation in Rust

Simple Blockchain

cargo run para ejecutar la app, cargo build para crear un ejecutable

Simple Blockchain

A Blockchain implementation in pure Rust

Below find an example usage of the library:

A Blockchain implementation in pure Rust

rusted-blockchain

Wanted a better understanding of blockchain, and practice more rust

rusted-blockchain

NEAR Blockchain | Rust Smart Contract: K Nearest Neighbours Machine Learning Algo

This contract is written in Rust programming language, and was developed using the Visual Studio Code IDE

NEAR Blockchain | Rust Smart Contract: K Nearest Neighbours Machine Learning Algo

Bitcoin blockchain indexing and notification node

It may be considered electrum

Bitcoin blockchain indexing and notification node
Facebook Instagram Twitter GitHub Dribbble
Privacy