Viewing and publishing ledger data using data manager for Azure Blockchain Service.

Viewing and publishing ledger data using data manager for Azure Blockchain Service.


hi my name is Dan royal and I’m a
program manager on the Azure Blockchain engineering team hi my name is Kei
Yoshikoshi and I’m a software engineer on the Azure Blockchain team and we’re here
today to announce the delivery of blockchain data manager a new capability for Azure Blockchain Service so what is blockchain data manager it’s a
production grade capability to capture ledger data from Azure blockchain
Service to then transform that data for example decode your emitted events and
properties from ethereum smart contracts and then deliver a ledger data in real
time to your configured destinations we built-in support to create connections
directly to event grid topics which provides a lot of connectivity options
across the entire cloud that’s right Dan and by providing a direct connection to
Event Grid for all data in a transaction node we’ve enabled seamless integration
for a wide array of services such as Flow Logic Apps or Azure functions
integration scenarios as well as enabled delivery to cloud databases through the
use of well-documented connectors so this is really fantastic
it goes up until now developers building end to end solutions using Azure blockchain Service I’ve had to rely on custom built solutions or have had to manually set up
maintain connectors for each event for each contract Kei what would you say
are some of the biggest advantages with blockchain data manager there are a few
important characteristics and advantages that we’re delivering now with the
release of blockchain data manager the seamless production grade and scalable
data publishing of ledger data from Azure Blockchain Service with a few simple clicks
and because we use Service Bus within the architecture of blockchain data
manager and because we’re highly integrated with the Azure Blockchain
Service we can ensure all ledger data is delivered for every transaction so you
don’t even have to worry about the liveliness of your data publishing we
also built in support to dynamically discover your contract addresses so
there’s no need for you to provide a contract address also we support
decoding of emitted events and properties safer transactions so you get
the state data that you need for business application integration
scenarios thanks Kei and I would add that we only charge for what you use
there are no fixed fees and you only pay for the transactions collected by blockchain data manager making this an incredibly power of
solution for all scenarios from devtest all the way to full-scale production use
cases so let’s take a look under the hood at provisioning a blockchain data
manager but then use this capability to capture transform and deliver ledger
data to the cloud ok so this is a probably a familiar page if you use Azure Blockchain Service this is your blockchain member now if you noticed with
this new capability that we have the blockchain data manager tab on the left
side let’s see what this does so here we have a list of all the blockchain data
managers that are connected to this transaction node or to this member and
it is very easy to provision a blockchain data manager so you can click Add you
can select a name of your choosing and then you can choose a specific
transaction no do you like and because of the nature of ABS you might have
different transactions that are private to certain transaction notes and here
you can select any transaction notice for your flexibility so for the purposes
of the demo I’ve already created a demo blockchain data manager let’s go and see
what it’s doing so when you provision it to blockchain data manager you’ll see
this main page and you’ll see the status where it’s where it’s located the
subscription as well as the member and the transaction node it belongs to
basically this is saying this blockchain data manager is pointed to this
transaction node and reading out data now what you’ll need to configure here
is at least outbound connections let’s take a look what this means is that this
blockchain data manager will read from the transaction node that you selected an
output data to this list of event grids event grid topics here we have one and you can
have one or more a event grid topics and it’s very easy to add one you can click
Add choose a name and choose from a list of event grid topics you can see that
we’ve already created one here and you can see that we can jump directly to the
banker topic and see the data is being streamed out now what
this minimal setting what you’ll get is the raw block and transactions but
probably you might want data on specific blockchain scenarios like contracts and
events specific to your application and we’ve allowed that capability as well by
allowing you to upload your contract ABI and your bi code through blotching
applications here you see that we have four contracts that we’ve uploaded
because we want to be tracking these contracts and it is also very easy to
add a new one you can provide a name a link to your contract ABI and your byte
code and both of these have to be publicly accessible so we can access it
and use it for our decoding once you have all this set up now you’ll be able
to get data for your contract your decoded events and properties as well as
we’ll also discover new contract addresses for you now after you have the
setup you’ll probably want to look at your data and see what’s going on and
what kind of data you’re getting and there’s an easy way to do that you can
see that this event event grid topic has a bunch of messages you can actually
there are many ways to do this you can create code to pull from this event good
topic you can also write a lot of gap connector and that’s what we did so we
have a logic app connector here where we say if there’s an event in the benkard
topic then please create a document in the cosmos DB very simple now if we go
to the cosmos DB here we have a bunch of the documents it’s basically one
document per message that we received and you can see that we have a bunch of
different types of messages here this example is the raw block and transaction
message which is basically talking about the block and all the transactions in
that block we can also have other messages like roll a transaction
contract creation which just means that every time there’s a new contract
created we can send you a message notifying you of that fact with the
given ABI and by code we can actually also track the contract events and
decode it for you so every time there’s an events we’ll send you that events
with all the parameters and at that event as well as the capability
to send you the contract properties if there’s any changes in the property of a
contract we can send you that detail as well so okay are you getting through
blotching Data Manager this information for all transactions on the transaction
yes for as long as we have a contract ABI in a byte code for a contract if
you’re choosing we can decode it for you even if we don’t have any baby eyes will
at least tell you that we have a transaction in the block icing so this
is pretty powerful because up until now you’ve had to create a connector for
every single event for every contract right exactly okay that’s fantastic
yeah so after you get the data you’ll probably want to look at the data and
you know try to do some analysis so that’s exactly what we did we actually
connected this power this cosmos DB to a power bi and this is what we have so you
can see here this is a very simple dashboard of the data that is in cosmos
CP you can see that we started tracking this transaction node at block number 23
61 and right now we’re at 65,000 we have two blocks and data managers they’re
watching this transaction node and as you can see here these are the number of
unique contract addresses that are created while we’re while we’ve been
watching this from Jass transaction and what this means is that if you had to
used a lot of gap connector those then you had to get you had to make the
connector 50 thousand times here we’ve already dynamically tracked this
contract address for you and delivered the events you and as you can see as
well we have a lot of transactions events property changes in the hundreds
of thousands so this is pretty interesting this is very similar to what
you’d normally see from a block Explorer I’m source right yeah but what else can
we see here and also maybe you know what is this type of contract that we’re
watching our contracts that are watching through bloch a tour manager in this
case yeah so this is a test contract that we have basically we have a
contract from a decentralized exchange that is actually being used we took that
and we started generating a bunch of random data to kind of test the the
capabilities of our system so as you can see here we have over time the kind of
messages and you see that we are getting transactions decode events and
properties and then we actually on the weekend we actually turned this watcher
off so that we don’t get billed and then you notice that a few hours ago we turn
it back on and now we’re getting data again so this is the overview of what
kind of data we’re getting but you’ll probably want to do it more deeper
analysis on the specific events or the properties that are happening and this
is just as easy to do so here’s an example of what you can see at the
bottom you see that these are the number of these are the different events that
we’re seeing over time and the reason that the number of events are constant
over time is because of our generators so usually in a real life scenario
you’ll probably see this be more variable with a bunch of interesting
patterns and then you can do some data analysis from here but for the purposes
of the demo we’ve generated a very constant load yeah I can see so it looks
like we have a constant load of marketplace type of events being emitted
here but I could imagine that in a real marketplace there would be a lot of
dynamic kind of changes in differences over time from different actors and
players in that marketplace exactly okay so other estate information can we
extract here in this view yeah so we can actually see the specific events and
then the for each event as you know in solidity you can have different
parameters so here for each of the events we show you the parameters that
are included in the event and also value so for this view we’ve just chosen an
example value of each the parameters so in this case there is in order to buy a
thousand in order to sell a thousand and then this is a cancel event and of
course in the real context this might not make as much sense but this is a
test case scenario so you can have any data there that you’re submitting sebuah
Qing so these are events and this is if your contract uses the emitting event
capability but sometimes you also might want to track how properties on a
contract changes as well and we provide that capability so here it’s a very
similar graph to the previous one except this time these are properties of the
contract that we’re tracking and how it changed over time so these are accounts
so this is again constant because we’re submitting constant load changing the
properties you know in a constant manner over time similarly we can see the
different properties that have changed and then also an example value that we
observed over time obviously if you deep dive into one of the properties you’ll
see various types of various combinations of values and then you can
probably use that to run some interesting analytics thank you Kay so
this is fantastic and we’re really excited to bring to you blockchain Data
Manager and this is just a quick introduction we’ll be providing a lot
more documentation and also doing more blog talks on other application
integration scenarios as well as other integration scenarios with other
services and components in the cloud and so with that thank you and look forward
to providing watching Data Manager for you you

You May Also Like

About the Author: Maximilian Kuhn

Leave a Reply

Your email address will not be published. Required fields are marked *