
English: 
Hello everyone.
In this video of the dfuse architecture overview,
we're gonna dive deeper into the deepmind
instrumentation and the dfuse data model.
Now, quick introduction to deepmind. deepmind is the modification -- that secret sauce, remember --
the modification that we made to nodeos to be able to take data out of the nodeos node
and into the dfuse platform, the dfuse data model and services.
Which all flow through gRPC endpoints, and
all use protobuf definitions, we're gonna
dive into that a little bit.
Now, if you run nodeos, with --deepmind
enabled, you will see a lot of information
being spewed out and let me show you a little
bit how this looks.
Because it might be intimidating, but 
I'll give you the purpose for that.
So if you look at the terminal here, we're
seeing a sample output. And these look

Chinese: 
大家好
在 dfuse 架构的视频中
我们将深入地了解 deepmind 工具和 dfuse 地数据模型
好，快速介绍一下 deepmind
deepmind 是我们所作的修改，
记住，这就是 dfuse 的秘方
是我们对 nodeos 所做的修改
让它能够将数据从 nodeos 的 节点中取出，
输入进 dfuse 平台
也就是的 dfuse 数据模型和服务中
所有这些都流经 gRPC 端点
而且都用了 protobuf 定义，
我们会深入讲解这个
好，如果你运行的 nodeos 启用了 --deepmind
你会看到很多信息喷涌而出，
让我来具体给你展示下
因为它看着好像挺吓人的，
但是我会告诉你（这些数据）有什么用
你看一下我这个 Terminal，
这是个输出的示例

Chinese: 
这往下滚着看更吓人，
我都能想象你的表情
但基本上这每一行展露的是
操作在执行的时候所发生的事情
所有的交易痕迹，数据库更改
它们都通过叫 “mindreader” 的这个读取进程
接入到了标准输出，被读取
然后我们慢慢地，但也是以最快速度，
建立一个 protobuf 对象或 Go 对象
我们将这些东西缝合在一起
我给你看看这部分的代码，
叫 ConsoleReader
这个 ConsoleReader 慢慢地建立一个区块，
读取这些行数据
累积所有交易痕迹
并将它们按区块顺序排列
然后，这个区块对象通过 gRPC 进入整个系统
走的是 protobuf 定义
每个系统都是一个 gRPC 流端点

English: 
even more intimidating when they scroll like
that, crazy in your face.
But basically, they're line-based and they
exfiltrate all of the things that happen during
execution.
All the transaction traces, the database changes... 
And they're all then, through the reading
process, which we call mindreader, linked
through that standard output, they're read.
And we slowly build, well, as fast as possible,
build a protobuf object, or a Go object,
where we stitch these things back together.
Let me show you the code there, it's called
the ConsoleReader.
This is the ConsoleReader that slowly builds
a block and reads these lines and then
accumulates all the transaction traces
and puts them in the order of the block.
And then, this block object is what flows
into the whole system through gRPC,
through protobuf definitions.
Every system is a streaming gRPC endpoint, so
the merger, the relayer, mindreader is the

Chinese: 
所以 merger、relayer、mindreader 
是从 eosws、FluxDB、查询索引器等等中
出来的第一个区块服务器
每个都被输入这种 protobuf 格式的区块信息
这种处理方式很利落，它还能有很多延展性的工具
你还可以把它接入到不同的语言中
这是数据模型，我再给你快速看下这里的 proto 定义
这是在 proto-eosio 软件包里的，
所有 EOSIO 特有的东西和 dfuse 的堆栈
不同的（协议）部署之间也有一些共同点，
比如搜索引擎调用
还有 bstream 机制，这我们会在另一个视频中具体讲
但是 proto-eosio 是针对 EOSIO 特定的东西
你知道，区块，对于那些熟悉 EOSIO 的人，
你会看到那些出块节点签名
这是已知的东西，比如块状态
还有一些其他的东西，比如交易，隐藏的交易，
这个你通常是看不到的

English: 
first server of blocks that flows out to eosws,
FluxDB, the search indexer and all these things,
everyone is fed with blocks in this format,
this profobuf.
Which is very neat, it has a lot of extensive
tooling around. You can use it to plug into
all sorts of different languages.
This is the data model and also let me show
you quickly the proto definitions here.
This is in the package proto-eosio,
all the things that are specific to EOSIO
and the dfuse stack.
There are things that are common to the different implementations,
like the search engine calls, and
bstream machinery, which we'll get to in another
video.
The proto-eosio are things that are specific
to EOSIO.
You know, the block, and for those who are
already well versed in EOSIO you'll see those
producer signatures, this is known stuff like the block state.
And there's some additional
things, like the transaction, the implicit
transactions,

English: 
which you don't normally see. The rate limiting
variables that are extracted in addition to
the rest.
So these are not things that nodes normally
spew out.
You don't have APIs to read these things,
but with the instrumentation we built, we
can get that, and take decisions that we normally
wouldn't have the information for,
like rate limiting.
And the most important thing is the
transaction trace.
These things are the actual meat of the execution
of the chain.
And in there, the important bit, action traces,
where we actually see, you know, things that
you might have actually seen before.
The receiver, the action, the time it was
elapsed, and whatever side effects it could have caused.
The transaction trace will also hold,
sort of in a tree fashion, all the actions
that occurred, who triggered what, and all
that.
This is what you get when you query the GraphQL
endpoint when you go to eosq and you see those
nested things.
This is the transaction trace, there you have
a list of such transaction traces and a block,

Chinese: 
这么多提取出来的东西，还有限速变量
这些信息通常不是节点能输出的
（原生的）API 不可以读取这些内容
但是有了我们搭建的仪器，我们就可以拿到这个信息了
做出通常你没有足够信息去做的决定
比如速率上的限制
这里最重要的是交易痕迹
这些都是链执行的实际痕迹
而在这里面，重要的是操作痕迹
我们可以在这里看到你之前可能看到过的信息
receiver、action、（操作）所用的时间，
还有它可能造成的任何副作用
交易的痕迹其实也是一个树状的结构
所有出现的操作、谁触发了什么，等等
这是查询 GraphQL 端点时能得到的信息
你在 eosq 上看到那些嵌套的数据（也是这么获取的）
这是交易痕迹，
里面有交易痕迹列表和一个区块

English: 
and the block is the top-level component that
flows through the system.
So, hopefully this gives you a little
better understanding of what deepmind is.
And also, let me show you this PR, here,
that's the PR that merged inside of nodeos.
So it's coming to the version 2.something
probably higher than 2.0.
It's not in the release by Block.one in 2.0,
we do have the releases in our repository
so you can get the debian, or for Mac or
Linux.
The release that are already instrumented
with the deepmind. It's merged into the nodeos
codebase now, so you will get it with the
next revision.
I'm not sure the version that is going to
be out by Block.one, we'll see that.
But, it's gonna have deepmind directly inside
it, so you won't need to install it separately.
And you'll be able to work with dfuse on top,
get all the benefits there.

Chinese: 
而区块是流经系统是顶层组件
希望这帮助你更好的理解了 deepmind 是什么
还有，让我给你们看看这个 PR
这是直接合并到 nodeos 内部的一个 PR
它会在2.几的版本中发布
应该会在2.0以上
它不在 Block.one 发布的 2.0 版中，
但确实在我们的存储库中发布了
这样你就可以拿到 debian，或 Mac 和 Linux 版本
发布的版本中已经结合了 deepmind，
现已合并到 nodeos 的代码中了
你会在下一个修订版中看到它
我不确定要 Block.one 会把它发布在哪个版本中，
让我们试目以待吧
但是，它确实是直接把 deepmind 部署在内部的，
你不需要再去专门安装它
而且，你可以在它之上再加上 dfuse，
得到所有的好处

English: 
Ok, hopefully, this is helpful. If you have
any comments put them in there, in our Telegram
channel, and we'll see you next time.

Chinese: 
好的，希望这会有所帮助
如果你有任何意见都可以通过我们的电报群（和微信群）找到我们
我们下次见。
