designated verifier
for any slashing. It therefore doesn’t matter how many middleware instances are running for an SBP because only a known entity identified by an ECDSA can represent an SBP in the verification of a network fault (liveness or corruption) which would lead to the slashing of earnings for restaked economic security.
example-
) are expected to take on their own logic specific to the restaking application. These components are:
5
:
5
as a nonce, many reporters could curate the same liveness fault report but only one report will be accepted by the smart contract
since once a nonce (for a given service provider) is consumed by the K2 smart contracts, it will not be accepted again.
Therefore, if you imagine more complex definition of liveness events or more than one liveness events, you will need to generate
appropriate nonces.
It is possible to generate and use nonces on-chain to avoid having to build complex systems to generate them off chain.
In order to do this one needs to take advantage of a K2 contract feature for SBP positions: hooks. Hooks allow an SBP
position to define a hook that will receive notifications after certain events have taken place related to an SBP. One
of those events could be for example slashing
where notification of a slashing could cause a nonce to be incremented
as per the following diagram:
env/
of the middleware and the env/
of the individual service.
serverless
project that aims to make spinning up the software locally or hosting on AWS as simple
and as straightforward as possible even going as far as to provide Github actions that instantiate the lambdas. The
provided Dockerfile(s) help serverless but also allow a non-serverless approach to be taken by using simpler docker
containers.
The root of the repository contains the core middleware logic. All the example microservices (in directories pre-pended
with example-
) and the core middleware can be spun up in the same way following the steps below.
config.local.json
file.
.github
folder contains the actions that will use serverless
to deploy to AWS.