A system to establish consensus between trusted execution environments (416A-P; 516 A-Z, 536 A-Z; 1052, 1016B-N; 1316), the system comprising: memory; and one or more processors coupled to the memory, the one or more processors configured to execute the trusted execution environments, the trusted execution environments including at least a first trusted execution environment (1016A; 1316) and a second trusted execution environment , the second trusted execution environment included in a consensus group that does not include the first trusted execution environment, the first trusted execution environment configured to: obtain a secret key (1064; 1364), which is usable to gain access to a shared state of the consensus group, from the second trusted execution environment; receive an invitation (1048; 1348) to join the consensus group from a consensus algorithm ; and trigger inclusion of the first trusted execution environment in the consensus group by accepting (1050; 1350) the invitation based at least in part on the secret key being obtained from the second trusted execution environment, wherein the first trusted execution environment is further configured to delay acceptance of the invitation to join the consensus group until (a) the secret key is received from the second trusted execution environment, (b) the secret key is validated, and (c) a version number of the shared state of the consensus group and a reference version number are confirmed to be same. memory; and one or more processors coupled to the memory, the one or more processors configured to execute the trusted execution environments, the trusted execution environments including at least a first trusted execution environment (1016A; 1316) and a second trusted execution environment , the second trusted execution environment included in a consensus group that does not include the first trusted execution environment, the first trusted execution environment configured to: obtain a secret key (1064; 1364), which is usable to gain access to a shared state of the consensus group, from the second trusted execution environment; receive an invitation (1048; 1348) to join the consensus group from a consensus algorithm ; and trigger inclusion of the first trusted execution environment in the consensus group by accepting (1050; 1350) the invitation based at least in part on the secret key being obtained from the second trusted execution environment, wherein the first trusted execution environment is further configured to delay acceptance of the invitation to join the consensus group until (a) the secret key is received from the second trusted execution environment, (b) the secret key is validated, and (c) a version number of the shared state of the consensus group and a reference version number are confirmed to be same. obtain a secret key (1064; 1364), which is usable to gain access to a shared state of the consensus group, from the second trusted execution environment; receive an invitation (1048; 1348) to join the consensus group from a consensus algorithm ; and trigger inclusion of the first trusted execution environment in the consensus group by accepting (1050; 1350) the invitation based at least in part on the secret key being obtained from the second trusted execution environment, wherein the first trusted execution environment is further configured to delay acceptance of the invitation to join the consensus group until (a) the secret key is received from the second trusted execution environment, (b) the secret key is validated, and (c) a version number of the shared state of the consensus group and a reference version number are confirmed to be same. <EOS>