Skip to main content

23 posts tagged with "Sui"

View All Tags

Why Sui Blockchain is a Promising Platform for Fast and Efficient Processing of Transactions

· 3 min read
Dora Noda
Software Engineer

In the world of blockchain, speed and efficiency are vital for the success of any platform. Enter Sui Blockchain, a platform that promises to deliver low latency transaction processing and smart contract execution.

Sui and BlockEden.xyz

One of the unique features of Sui Blockchain is its ability to distinguish between different kinds of object ownership. Unlike other blockchain platforms where every contract and object is mutably shared, Sui allows an object to be owned by an address and can be mutably owned, immutably owned, or mutably shared. This feature is leveraged for parallel execution of smart contracts and asset management.

Sui uses a decentralized permissionless smart contract platform, biased towards low-latency management of assets. It uses the Move programming language to define assets as objects that may be owned by an address. The platform is maintained by a permissionless set of authorities that play a role similar to validators or miners in other blockchain systems.

To achieve low latency, Sui separates transaction processing into two phases: 1) acquiring distributed locks at the granularity of objects and 2) executing the transaction and committing its effects.

Phase one is performed through a reliable broadcast primitive that requires no global synchronization within the authority, allowing for scalability through sharding. For transactions involving shared objects, sequencing is required using a consensus protocol.

Sui aggressively reduces bottlenecks and points of synchronization requiring global locks within authorities, allowing for quasi-linear scaling with increased resources. The platform also allows for parallel execution of smart contracts, with Move virtual machines on multiple cores or physical machines reading versioned input objects, executing, and writing resulting objects from and to stores.

The consistency requirements on stores for objects and transactions are very loose, allowing scalable distributed key-value stores to be used internally by each authority. Sui uses a Byzantine consistent broadcast protocol between authorities to ensure the safety of common operations on assets, ensuring lower latency and better scalability as compared to Byzantine agreement.

Overall, Sui Blockchain's design choices and optimizations make it a promising platform for applications that require fast and efficient processing of transactions. Its ability to 1) distinguish between different kinds of object ownership, 2) acquiring distributed locks at the granularity of objects, and 3) parallel execution of smart contracts are key features that set it apart from other blockchain platforms. With Sui Blockchain, the future of fast and efficient transaction processing is here.

BlockEden.xyz is riding Sui testnet wave 2

· 3 min read
Dora Noda
Software Engineer

On January 25, the second wave of the Sui testnet went live and it would endure for 2 to 3 weeks. As part of this wave, BlockEden.xyz is helping hundreds of projects test and build on a secure and high-performance Sui network. This latest wave will bring more clarity to developers and users as they get ready for full deployment of the Sui network. Let’s take a closer look at what makes this testnet wave so important.

What is Testnet Wave 2?

Testnet Wave 2 is the second phase of testing for Sui, a blockchain platform that enables developers to easily create decentralized applications (dApps) with smart contracts, deploy them on its public blockchain and leverage its built-in tools to keep their applications secure, fast and reliable. During this phase, hundreds of projects are now able to test and build on the secure, high-performance Sui Network using BlockEden.xyz.

Testnet Wave 2 has 39 validators plus 2 Mysten Labs-operated validators, which are geographically distributed. The network's epoch duration is approximately 24 hours based on 28800 checkpoints and its reference gas price fluctuates from epoch to epoch. The network is updated only as necessary and data would only be wiped in required recovery scenarios. Mysten Labs provides incident support, including oncall support and incident management protocol with necessary coordination with selected validators.

How can I connect to Sui Testnet?

The network is permissionless. Although anyone can engage with the testnet, awards are exclusively given to program participants.

For an end user or crypto holder:

  1. Sui Web wallet can be downloaded here
  2. Open Sui wallet -> Setting (3 lines) -> Network -> Sui testnet
  3. Use Sui Discord #testnet-faucet channel to receive testnet tokens on Sui testnet.
  4. On testnet, Capy NFT can be tested by visiting https://testnet.capy.art/

The deployment of Dapps will take a few days as the Testnet has just recently launched.

The testnet SUI coins and staking rewards are exclusively used for testing and have no monetary value.

For a developer,

Grab a free public API key along with the endpoint from https://blockeden.xyz/keys and apply it to your SDK or HTTP clients. If you need a dedicated key, please sign up and it's free.

Sui RPC keys

What Does Testnet Wave 2 Mean for Developers?

For developers who are building on Sui or plan to do so in the future, Testnet Wave 2 means more clarity about how their applications will perform when fully deployed onto the main blockchain network. They can use this opportunity to gain insight into how their application works under different conditions before going live in production mode which could result in fewer surprises once they launch their project publicly. With improved security features such as enhanced privacy options available during this testing phase along with advanced analytics capabilities being provided by BlockEden.xyz, developers have everything they need to make sure their applications are running smoothly before taking them live onto the main blockchain network.

Source Link: https://blockeden.xyz/blog/2023/01/30/riding-sui-testnet-wave-2/

Sui WebSocket now available at BlockEden.xyz

· 3 min read
Jack Sim
Web3 Builder

Note: This post was written during the Sui devnet phase and some details may be outdated.

We were among the first Sui Devnet JSON-RPC providers. Now we are excited to expand our API Service to WebSocket too. WebSocket would be useful to those dApps that need to take action on real-time on-chain events.

How to get started?

Step 1. Go to https://blockeden.xyz/dash/. Please sign up if you haven’t done so.

Step 2. Input your name for the API key, select Sui Devnet Websocket, and then click + Create key.

create sui ws key

Step 3. Grab your access URL by clicking Copy to copy it to the clipboard.

Step 4. Use the access URL in your project like the following. Remember to replace <access_key> with your own key.

How to use WebSocket?

To quickly play around WebSocket endpoint in the command line, you could use wscat. To download it, run the following command:

npm install -g wscat

Then, run the following command to connect to the WebSocket endpoint (remember replacing with your own API key):

wscat -c wss://sui-devnet.blockeden.xyz/kjz2sTknHkNE9aXQ6j1N

Now in the session, you could give the command. For example, you could say subscribing events that matchin some cerntain criteria:

Connected (press CTRL+C to quit)
> {"jsonrpc":"2.0", "id": 1, "method": "sui_subscribeEvent", "params": [{"All":[{"EventType":"MoveEvent"}, {"Package":"0x2"}, {"Module":"devnet_nft"}]}]}
< {"jsonrpc":"2.0","result":6240320950310564,"id":1}

And you would also observe events being streamed to your console:

< {"jsonrpc":"2.0","method":"sui_subscribeEvent","params":{"subscription":6240320950310564,"result":{"timestamp":1672211297607,"txDigest":"PDPBHEo5pmMeLK8Dc4226MZxUA2dkQK91W2ECHFgN1a","id":{"txSeq":1471806,"eventSeq":2},"event":{"moveEvent":{"packageId":"0x0000000000000000000000000000000000000002","transactionModule":"devnet_nft","sender":"0x35a09652085b5c4c178d9cfe234d8c1a6b89306b","type":"0x2::devnet_nft::MintNFTEvent","fields":{"creator":"0x35a09652085b5c4c178d9cfe234d8c1a6b89306b","name":"Example NFT","object_id":"0x7631724b6eb066b8514c6159f716a8826055ee5e"},"bcs":"djFyS26wZrhRTGFZ9xaogmBV7l41oJZSCFtcTBeNnP4jTYwaa4kwawtFeGFtcGxlIE5GVA=="}}}}}
< {"jsonrpc":"2.0","method":"sui_subscribeEvent","params":{"subscription":6240320950310564,"result":{"timestamp":1672211297614,"txDigest":"XcTtaU28vUsR18ZMRhE7XuMadeUfCj8kTZfHD1Xs8H7","id":{"txSeq":1471807,"eventSeq":2},"event":{"moveEvent":{"packageId":"0x0000000000000000000000000000000000000002","transactionModule":"devnet_nft","sender":"0xc9a7020d260599e06b63baae7504b2ead68a580a","type":"0x2::devnet_nft::MintNFTEvent","fields":{"creator":"0xc9a7020d260599e06b63baae7504b2ead68a580a","name":"Example NFT","object_id":"0xdc2961ac31f550fcae6ac050c4cc5c364f3736c3"},"bcs":"3ClhrDH1UPyuasBQxMxcNk83NsPJpwINJgWZ4Gtjuq51BLLq1opYCgtFeGFtcGxlIE5GVA=="}}}}}
< {"jsonrpc":"2.0","method":"sui_subscribeEvent","params":{"subscription":6240320950310564,"result":{"timestamp":1672211297617,"txDigest":"ZpnGea1XkkzfsBeSCnR37xKvkdCSgjcfp81owD6QS4i","id":{"txSeq":1471808,"eventSeq":2},"event":{"moveEvent":{"packageId":"0x0000000000000000000000000000000000000002","transactionModule":"devnet_nft","sender":"0x96e31283ad37fe2ebbdff635501c9feaa2bd8af7","type":"0x2::devnet_nft::MintNFTEvent","fields":{"creator":"0x96e31283ad37fe2ebbdff635501c9feaa2bd8af7","name":"Wizard Land","object_id":"0xe63f7ee979d23d4ab60b598529dc4136d33f07a8"},"bcs":"5j9+6XnSPUq2C1mFKdxBNtM/B6iW4xKDrTf+Lrvf9jVQHJ/qor2K9wtXaXphcmQgTGFuZA=="}}}}}
...

For more details of subscribing Sui events via WebSocket, please refer to the offical doc.

Misc

To prevent too many outstanding idle connections, we will drop any WebSocket connection that hasn't exchanged data in the past 5 minutes. Client will receive an error code: 1006.

BlockEden.xyz becomes one of the first Sui Devnet API providers

· 3 min read
Jack Sim
Web3 Builder

Note: This post references the early Sui devnet and may contain outdated instructions.

BlockEden.xyz is now offering an RPC connection to the Sui devnet, allowing Web3 developers and apps to easily communicate with the new Move-based blockchain.

Sui API

This service is compatible with the Sui SDK, enabling more streamlined development. Keep reading to learn more about what this means for you and your blockchain needs!

How to get started?

Step 1. Go to https://blockeden.xyz/dash/. Please sign up if you haven’t done so.

Step 2. Input your name for the API key, select Sui Devnet, and then click + Create key.

Create key for Sui API

Step 3. Grab your access URL by clicking it and copying it to the clipboard.

Step 4. Use the access URL in your project like the following. Remember to replace <access_key> with your own key.

Using CURL to connect Sui

curl -X POST https://sui-devnet.blockeden.xyz/<access_key> \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"rpc.discover","id":1}'

Using TypeScript SDK to connect Sui

const { JsonRpcProvider } = require("@mysten/sui.js");

(async () => {
const providerUrl = "https://sui-devnet.blockeden.xyz/<access_key>"
const provider = new JsonRpcProvider(providerUrl);
const totalTxNumber = await provider.getTotalTransactionNumber();
console.log(`${providerUrl} getTotalTransactionNumber: ` + totalTxNumber);
})()

What is the Sui Blockchain?

The Sui blockchain is a next-generation, high performance blockchain designed to support a wide range of use cases with advanced features such as accounts, identifiers, and resources. It uses the Move programming language which enables developers to build custom logic into their smart contracts. The Sui team aims to make it the most developer friendly blockchain yet by providing extensive documentation, support, and tools. And they’re off to a great start – BlockEden.xyz is one of the first Web3 infrastructure providers to introduce a new commercial RPC service for this highly anticipated platform!

Builders with Sui

Sui is a blockchain with a lot of potential. There are projects like DEXs, games, launchpads, NFT projects, social networks and wallets building on it.

Why Use BlockEden.yxz?

We listen to Aptos and Sui developers every day and are fully committed to serving the best infra for them.

If you’re a Web3 developer or app owner in need of an RPC connection for the Sui devnet, look no further than BlockEden.xyz! We are proud to be one of the first infrastructure providers offering this service for this highly anticipated new blockchain. In addition to our RPC connection, we will also offer a variety of other essential services and features for any Web3 project. Learn more about us today and see how we can help you succeed in the blockchain space!